]> granicus.if.org Git - liblinear/commitdiff
fix typos in python/README. v191
authorpopo <popo@16e7d947-dcc2-db11-b54a-0017319806e7>
Thu, 26 Apr 2012 02:57:08 +0000 (02:57 +0000)
committerpopo <popo@16e7d947-dcc2-db11-b54a-0017319806e7>
Thu, 26 Apr 2012 02:57:08 +0000 (02:57 +0000)
python/README

index d2ce9e817b425ed8db0ca825c69cfcd779e6dd3e..40fe87d1e2ffc0e81f0bf9f8c06baef8589c4507 100644 (file)
@@ -63,7 +63,7 @@ in liblinearutil.py and the usage is the same as the LIBLINEAR MATLAB interface.
 >>> save_model('heart_scale.model', m)
 >>> m = load_model('heart_scale.model')
 >>> p_label, p_acc, p_val = predict(y, x, m, '-b 1')
->>> ACC, MSE, SCC = evaluations(y, p_val)
+>>> ACC, MSE, SCC = evaluations(y, p_label)
 
 # Getting online help
 >>> help(train)
@@ -76,7 +76,7 @@ carefully.
 >>> prob = problem([1,-1], [{1:1, 3:1}, {1:-1,3:-1}])
 >>> param = parameter('-c 4')
 >>> m = liblinear.train(prob, param) # m is a ctype pointer to a model
-# Convet a Python-fromat instance to feature_nodearray, a ctypes structure
+# Convert a Python-format instance to feature_nodearray, a ctypes structure
 >>> x0, max_idx = gen_feature_nodearray({1:1, 3:1})
 >>> label = liblinear.predict(m, x0)
 
@@ -110,7 +110,7 @@ LIBLINEAR shared library:
 
 - class feature_node:
 
-    Construct an feature_node.
+    Construct a feature_node.
 
     >>> node = feature_node(idx, val)
 
@@ -136,9 +136,9 @@ LIBLINEAR shared library:
 
 - class problem:
 
-    Construct an problem instance
+    Construct a problem instance
 
-    >>> prob = problem(y, x, [bias=-1])
+    >>> prob = problem(y, x [,bias=-1])
 
     y: a Python list/tuple of l labels (type must be int/double).
 
@@ -148,7 +148,7 @@ LIBLINEAR shared library:
     bias: if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term 
           added (default -1)
 
-    You can alos modify the bias value by
+    You can also modify the bias value by
 
     >>> prob.set_bias(1)
 
@@ -157,7 +157,7 @@ LIBLINEAR shared library:
 
 - class parameter:
 
-    Construct an parameter instance
+    Construct a parameter instance
 
     >>> param = parameter('training_options')
 
@@ -210,7 +210,7 @@ To use utility functions, type
     >>> from liblinearutil import *
 
 The above command loads
-    train()            : train an linear model
+    train()            : train a linear model
     predict()          : predict testing data
     svm_read_problem() : read the data from a LIBSVM-format file.
     load_model()       : load a LIBLINEAR model.
@@ -233,10 +233,10 @@ The above command loads
     training_options: a string in the same form as that for LIBLINEAR command
                       mode.
 
-    prob: an problem instance generated by calling
+    prob: a problem instance generated by calling
           problem(y, x).
 
-    param: an parameter instance generated by calling
+    param: a parameter instance generated by calling
            parameter('training_options')
 
     model: the returned model instance. See linear.h for details of this
@@ -273,7 +273,7 @@ The above command loads
     predicting_options: a string of predicting options in the same format as
                         that of LIBLINEAR.
 
-    model: an model instance.
+    model: a model instance.
 
     p_labels: a list of predicted labels
 
@@ -284,7 +284,7 @@ The above command loads
     p_vals: a list of decision values or probability estimates (if '-b 1' 
             is specified). If k is the number of classes, for decision values,
             each element includes results of predicting k binary-class
-            SVMs. if k = 2 and solver is not MCSVM_CS, only one decision value 
+            SVMs. If k = 2 and solver is not MCSVM_CS, only one decision value 
             is returned. For probabilities, each element contains k values 
             indicating the probability that the testing instance is in each class.
             Note that the order of classes here is the same as 'model.label'