hi all,


I want to export the svm parameters and apply it in a c++ svm implementation at 
 https://github.com/yctung/AndroidLibSvm.  after grid search, SVC with 
C=1.0,gamma =10.0 get  92% accuracy,  but unfortunately, SVC model does't  
contains the paratmeters needed by the c++ model, which take as input the 
low-level svm params, ie sv_coef,probA ..., the returns of low level svm api 
,'libsvm.fit', match the requirement, but the prediction result is different 
from SVC model:


The code :
model = 
libsvm.fit(X_data.astype(np.float64),Y_data.astype(np.float64),svm_type=0,kernel='rbf',C
 = 1.0,gamm= 10.0)
pred = libsvm.predict(X_data.astype(np.float64), *model,kernel='rbf')

print "hello mean " + sa tr(np.mean(pred == Y_data)) # result "hello mean 
0.570588235294"
can somebody give some suggestion on this problem,thanks!




 
_______________________________________________
scikit-learn mailing list
[email protected]
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to