Description
Because of some suspicious results in attempting to use OneClassSVM with linear kernel, I constructed a toy example which is solveable without error, but despite svmtrain claiming convergence, the solution was incorrect.
I double-checked by projecting the problem into a 2-class one and running svmtrain with (default) SVC and the correct solution was quickly found by the routine. This is an acceptable workaround but much slower, especially for large datasets.
It looks to me like OneClassSVM has a fundamental bug.
Here is how to reproduce:
generate 500 random 2-vectors x standard normal, and keep only the ones for which x1-x2 >1 [there should be 120 to 130 of them]. Next, run OneClassSVM on these which should be able to bound all of the observations by a plane, but it does not, despite claiming convergence.
I would appreciate someone verifying this bug (and hopefully it being put on the 'to-do' list).
Thank you!