- Installation
- Usage
- Returned Model Structure
-- Examples
- Other Utilities
+- Examples
- Additional Information
each class. Note that the order of classes here is the same as 'Label'
field in the model structure.
-Examples
-========
-
-Train and test on the provided data heart_scale:
-
-matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale');
-matlab> model = train(heart_scale_label, heart_scale_inst, '-c 1');
-matlab> [predict_label, accuracy, dec_values] = predict(heart_scale_label, heart_scale_inst, model); % test the training data
-
-Note that for testing, you can put anything in the testing_label_vector.
-
-For probability estimates, you need '-b 1' for training and testing:
-
-matlab> [predict_label, accuracy, prob_estimates] = predict(heart_scale_label, heart_scale_inst, model, '-b 1');
-
Other Utilities
===============
libsvmwrite('data.txt', label_vector, instance_matrix]
The instance_matrix must be a sparse matrix. (type must be double)
+For windows, `libsvmread.mexw32' and `libsvmwrite.mexw32' are ready in
+the directory `..\windows'.
+
These codes are prepared by Rong-En Fan and Kai-Wei Chang from National
Taiwan University.
+Examples
+========
+
+Train and test on the provided data heart_scale:
+
+matlab> [heart_scale_label, heart_scale_inst] = libsvmread('../heart_scale');
+matlab> model = train(heart_scale_label, heart_scale_inst, '-c 1');
+matlab> [predict_label, accuracy, dec_values] = predict(heart_scale_label, heart_scale_inst, model); % test the training data
+
+Note that for testing, you can put anything in the testing_label_vector.
+
+For probability estimates, you need '-b 1' for training and testing:
+
+matlab> [predict_label, accuracy, prob_estimates] = predict(heart_scale_label, heart_scale_inst, model, '-b 1');
+
Additional Information
======================