The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: with cell array of strings as Y
Replies: 8   Last Post: May 8, 2013 4:39 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Weiss

Posts: 1,430
Registered: 11/27/08
Re: with cell array of strings as Y
Posted: May 7, 2013 12:55 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 5/7/2013 11:07 AM, Jay wrote:
>> I am not sure where in the documentation you found your statement 1.
>> Here's what I see when I look at the current documentation:
>> Y - Grouping variables of response values with the same number of
>> elements (rows) as X. Each entry in Y is the response to the data in
>> the corresponding row of X.
>> This does not say that the variable must be a numeric vector, but a
>> grouping variable

> Hm, yes, correct. Here is what I was referring to:
> Y Numeric vector of response values with the same number of rows as
> X. Each entry in Y is the response to the data in the corresponding
> row of X.

>> As far as your problem 2, I am not sure what is going on. I wonder if
>> your function myDistance is giving you a problem somehow.

> So you believe everything should work fine when using a cell array of
> strings. I don't see how my distance function could cause such an
> error. My distance function is defined as [ distance ] = myDistance(
> obj1, objects)
> and will always return at least "distance = zeros(size(objects, 1),1);
> " or higher values.

There must be something strange about the German web site, because when
I try to look at the documentation page for the ClassificationKNN class,
I do not see the "Numeric vector..." that you do, even when I look at
the R2012b version of the documentation. I will try to investigate this
discrepancy. Thanks for reporting the issue.

And, as I said, I really do not know what is going on with the predict
method that is causing those errors. I will try to look into it, but it
might take a few days.

Alan Weiss
MATLAB mathematical toolbox documentation

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.