Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

libsvm and matlab

darbondarbon Posts: 1Member
I need to use matlab with a support vector machine (http://www.csie.ntu.edu.tw/~cjlin/libsvm/).
Into the downloaded package exist a Readme file that explain the usage of the functions.

matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale');

heart_scale is a coloumn vector of 270 elements
heart_scale_inst is a matrix of 270x13

i can see in the Readme file that:

svmtrain(training_label_vector, training_instance_matrix [, 'libsvm_options']);
-training_label_vector:
An m by 1 vector of training labels (type must be double).
-training_instance_matrix:
An m by n matrix of m training instances with n features.
It can be dense or sparse (type must be double).

but when i try:

matlab> model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07');

error:
Y must be a vector or a character array.

I can't understand why.
Thank you in advance and sorry for my english.
Sign In or Register to comment.