one class SVM libSVM

时光怂恿深爱的人放手 提交于 2019-12-22 18:25:03

问题


Lets say my feature vector is (x1, x2, ...xn)

Could anyone give me a code to train one-class SVM using libSVM?

How should I learn the parameters using cross validation.


回答1:


This may help you

label=ones(Number Of your training instances,1); % You should generate labels for your only class!
model = svmtrain( label, Training Data , '-s 2 -t 2  -n 0.5' ) ; % You can change the parameters
[predicted_label,accuracy]=svmpredict(TestLabels,Test Set, model);


来源:https://stackoverflow.com/questions/14588967/one-class-svm-libsvm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!