@@ -76,8 +76,8 @@ carefully.
76
76
>>> prob = svm_problem([1,-1], [{1:1, 3:1}, {1:-1,3:-1}])
77
77
>>> param = svm_parameter('-c 4')
78
78
>>> m = libsvm.svm_train(prob, param) # m is a ctype pointer to an svm_model
79
- # Convet a Python-fromat instance to svm_node_array , a ctypes structure
80
- >>> x0, max_idx = gen_svm_node_array ({1:1, 3:1})
79
+ # Convet a Python-fromat instance to svm_nodearray , a ctypes structure
80
+ >>> x0, max_idx = gen_svm_nodearray ({1:1, 3:1})
81
81
>>> label = libsvm.svm_predict(m, x0)
82
82
83
83
Design Description
@@ -118,13 +118,13 @@ LIBSVM shared library:
118
118
119
119
val: a float indicates the feature value.
120
120
121
- - Function: gen_svm_node_array (xi [,feature_max=None [,issparse=False]])
121
+ - Function: gen_svm_nodearray (xi [,feature_max=None [,issparse=False]])
122
122
123
123
Generate a feature vector from a Python list/tuple or a dictionary:
124
124
125
- >>> xi, max_idx = gen_svm_node_array ({1:1, 3:1, 5:-2})
125
+ >>> xi, max_idx = gen_svm_nodearray ({1:1, 3:1, 5:-2})
126
126
127
- xi: the returned svm_node_array (a ctypes structure)
127
+ xi: the returned svm_nodearray (a ctypes structure)
128
128
129
129
max_idx: the maximal feature index of xi
130
130
0 commit comments