libsvm and matlab - Programmers Heaven

Howdy, Stranger!

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


libsvm and matlab

darbondarbon Posts: 1Member
I need to use matlab with a support vector machine (
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']);
An m by 1 vector of training labels (type must be double).
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');

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.