cjlin1 / libsvm

LIBSVM -- A Library for Support Vector Machines
https://www.csie.ntu.edu.tw/~cjlin/libsvm/
BSD 3-Clause "New" or "Revised" License
4.54k stars 1.64k forks source link

One-class classification examples #130

Closed human098 closed 5 years ago

human098 commented 5 years ago

Hi, sorry if this is the wrong place to post. Very new to SVM, was wondering if there were any examples of a one-class classifier (ie. trained on normal data, tested on normal and novel data) using LibSVM in Java. Is the only thing we need to set to make it a one-class classifier "param.svm_type = svm_parameter.ONE_CLASS;"?

Also, are there any tools to make one-class classification selection of parameters easier? (Similar to easy.py for what I'm assuming is multi-class or binary classification). Thank you.

cjlin1 commented 5 years ago

Please check README. If you write a java code to call libsvm, besides svm_type you also need to choose some parameters such as nu, kernel, kernel parameters etc.