@@ -63,7 +63,7 @@ in liblinearutil.py and the usage is the same as the LIBLINEAR MATLAB interface.
6363>>> save_model('heart_scale.model', m)
6464>>> m = load_model('heart_scale.model')
6565>>> p_label, p_acc, p_val = predict(y, x, m, '-b 1')
66- >>> ACC, MSE, SCC = evaluations(y, p_val )
66+ >>> ACC, MSE, SCC = evaluations(y, p_label )
6767
6868# Getting online help
6969>>> help(train)
@@ -76,7 +76,7 @@ carefully.
7676>>> prob = problem([1,-1], [{1:1, 3:1}, {1:-1,3:-1}])
7777>>> param = parameter('-c 4')
7878>>> m = liblinear.train(prob, param) # m is a ctype pointer to a model
79- # Convet a Python-fromat instance to feature_nodearray, a ctypes structure
79+ # Convert a Python-format instance to feature_nodearray, a ctypes structure
8080>>> x0, max_idx = gen_feature_nodearray({1:1, 3:1})
8181>>> label = liblinear.predict(m, x0)
8282
@@ -110,7 +110,7 @@ LIBLINEAR shared library:
110110
111111- class feature_node:
112112
113- Construct an feature_node.
113+ Construct a feature_node.
114114
115115 >>> node = feature_node(idx, val)
116116
@@ -136,9 +136,9 @@ LIBLINEAR shared library:
136136
137137- class problem:
138138
139- Construct an problem instance
139+ Construct a problem instance
140140
141- >>> prob = problem(y, x, [ bias=-1])
141+ >>> prob = problem(y, x [, bias=-1])
142142
143143 y: a Python list/tuple of l labels (type must be int/double).
144144
@@ -148,7 +148,7 @@ LIBLINEAR shared library:
148148 bias: if bias >= 0, instance x becomes [x; bias]; if < 0, no bias term
149149 added (default -1)
150150
151- You can alos modify the bias value by
151+ You can also modify the bias value by
152152
153153 >>> prob.set_bias(1)
154154
@@ -157,7 +157,7 @@ LIBLINEAR shared library:
157157
158158- class parameter:
159159
160- Construct an parameter instance
160+ Construct a parameter instance
161161
162162 >>> param = parameter('training_options')
163163
@@ -210,7 +210,7 @@ To use utility functions, type
210210 >>> from liblinearutil import *
211211
212212The above command loads
213- train() : train an linear model
213+ train() : train a linear model
214214 predict() : predict testing data
215215 svm_read_problem() : read the data from a LIBSVM-format file.
216216 load_model() : load a LIBLINEAR model.
@@ -233,10 +233,10 @@ The above command loads
233233 training_options: a string in the same form as that for LIBLINEAR command
234234 mode.
235235
236- prob: an problem instance generated by calling
236+ prob: a problem instance generated by calling
237237 problem(y, x).
238238
239- param: an parameter instance generated by calling
239+ param: a parameter instance generated by calling
240240 parameter('training_options')
241241
242242 model: the returned model instance. See linear.h for details of this
@@ -273,7 +273,7 @@ The above command loads
273273 predicting_options: a string of predicting options in the same format as
274274 that of LIBLINEAR.
275275
276- model: an model instance.
276+ model: a model instance.
277277
278278 p_labels: a list of predicted labels
279279
@@ -284,7 +284,7 @@ The above command loads
284284 p_vals: a list of decision values or probability estimates (if '-b 1'
285285 is specified). If k is the number of classes, for decision values,
286286 each element includes results of predicting k binary-class
287- SVMs. if k = 2 and solver is not MCSVM_CS, only one decision value
287+ SVMs. If k = 2 and solver is not MCSVM_CS, only one decision value
288288 is returned. For probabilities, each element contains k values
289289 indicating the probability that the testing instance is in each class.
290290 Note that the order of classes here is the same as 'model.label'
0 commit comments