]> granicus.if.org Git - liblinear/commitdiff
matlab/README is slightly modified. (Section 'Other Utilities' and 'Examples' are...
authorpopo <popo@16e7d947-dcc2-db11-b54a-0017319806e7>
Sat, 26 Feb 2011 00:09:48 +0000 (00:09 +0000)
committerpopo <popo@16e7d947-dcc2-db11-b54a-0017319806e7>
Sat, 26 Feb 2011 00:09:48 +0000 (00:09 +0000)
matlab/README

index 7ede401d24e1f87bd3ac27dbc40e4d3e98a8d1f7..226693f1d99e6cf267e3a5623e4d470caa090258 100644 (file)
@@ -9,8 +9,8 @@ Table of Contents
 - Installation
 - Usage
 - Returned Model Structure
-- Examples
 - Other Utilities
+- Examples
 - Additional Information
 
 
@@ -133,21 +133,6 @@ each row contains k values indicating the probability that the testing instance
 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
 ===============
 
@@ -163,9 +148,27 @@ A matlab function libsvmwrite writes Matlab matrix to a file in LIBSVM format:
 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
 ======================