Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One-Class SVM Rho Value #169

Open
robin-tukl opened this issue May 20, 2020 · 0 comments
Open

One-Class SVM Rho Value #169

robin-tukl opened this issue May 20, 2020 · 0 comments

Comments

@robin-tukl
Copy link

robin-tukl commented May 20, 2020

Hey Everyone,

I'm currently working on One-Class SVMs in Java and I came across the following problem.

When I finish training and for whatever reason try to classify my training data, it appears that only half of the samples become classified correctly.

`
wekaSVM = new LibSVM();

wekaSVM.setKernelType(new SelectedTag(LibSVM.KERNELTYPE_RBF, LibSVM.TAGS_KERNELTYPE));

wekaSVM.setSVMType(new SelectedTag(LibSVM.SVMTYPE_ONE_CLASS_SVM, LibSVM.TAGS_SVMTYPE));

wekaSVM.buildClassifier(dataInst);

double[][] normData = wekaSVM.distributionsForInstances(dataInst);
`

I have tested the same data with my Matlab Code(all parameter(nu = 0.5, cache size, epsilon) the same) and It seems that the model is similar (same SVs and coefficients) expect the bias. Here they differ from -10.52 (Matlab) to -42.89 (Java). Furthermore, I have checked the output of the Kernels and they also seem to match perfectly, but because of the different biases, I have a 100% accuracy on my training data for Matlab, but only 50% in Java.

Therefore my questions, is there an error in my setup and have anyone encountered similar issues?
Does the libsvm code finish as soon as it reaches the 50% mark (nu)?

Best regards
Yannick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant