Reputation: 1655
I am running
SVMStruct = svmtrain(xTrain, yTrain);
and the error I get is
Undefined function or method 'svmtrain' for input arguments of type 'double'
I am pretty sure xTrain and yTrain are matrices though:
size(xTrain)
ans =
544 28
size(yTrain)
ans =
544 1
Any idea what's going on here?
Upvotes: 0
Views: 6414
Reputation: 16207
It might be that you are missing the bioinformatics toolbox as others have said. But it could also be that you want the LibSVM library. This was the case in third-party code I had to run. Get the library here: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
Upvotes: 1
Reputation: 111
yes the bioinformatics toolbox is the key point! install it using a longer key! you will see it in your custom intall selection!
Upvotes: 0
Reputation: 4388
It sounds like the svmtrain
function isn't on your path. If
which svmtrain
displays "svmtrain not found", then you should make sure that you have the bioinformatics toolbox (type ver
and see if it is in the list) and it is in your path.
Upvotes: 3
Reputation: 3690
The second argument to svmtrain
should be a vector of integers or logicals, where the value in each row corresponds to the values in the same row of the training matrix/vector. It sounds like your case may be more regression if you're trying to output double values for the training data. In that case, you may want to look into regression algorithms. If you still want multi-class classification, you need to adjust your output accordingly.
Upvotes: 0