Hi all, I have to train a one class SVM for anomaly detection. I have a dataset with two features. I trained the model on normal instances with ocsvm function. What I don't understand are the contour lines for the ocsvm scores... I do not expect those to be like that. In the figure are represented the normal instances in the space (feature1, feature2) and the contour lines corresponding to some values of ocsvm score. They are simply absurd, not like the example see on the matlab guide. I would expect ellipsoidal contour lines, not these! Any help? Thank you!

5 commentaires

Andrea Lanza
Andrea Lanza le 27 Nov 2023
No one? I really need to understand this thing for my master degree thesis
the cyclist
the cyclist le 27 Nov 2023
Can you upload the data and code you used to generate the figure? You can use the paper clip icon in the INSERT section of the toolbar.
If you cannot load all the data, perhaps a subset that shows the same behavior?
Andrea Lanza
Andrea Lanza le 27 Nov 2023
Sure! This is a subsample of the dataset, I kept a data point every 5. It's a 250000x2 matrix. First columns is feature 1 and second column is feature2 :)
Lorenzo Zarantonello
Lorenzo Zarantonello le 29 Nov 2023
I'm having the same problem too
Andrea Lanza
Andrea Lanza le 29 Nov 2023
fitcsvm with one class option makes the contour lines normal, so I would say that there is definitely something wrong in the ocsvm function

Connectez-vous pour commenter.

 Réponse acceptée

Angelo Yeo
Angelo Yeo le 30 Nov 2023
Modifié(e) : Angelo Yeo le 30 Nov 2023

1 vote

Thank you for reporting this. I can see that something is broken in ocsvm. Can you please contact Technical Support and report this issue?

4 commentaires

Andrea Lanza
Andrea Lanza le 30 Nov 2023
Done! Thank you!
Lorenzo Zarantonello
Lorenzo Zarantonello le 30 Nov 2023
Plz, let know if there are developments about this issue, im interested
Angelo Yeo
Angelo Yeo le 8 Déc 2023
@Lorenzo Zarantonello, please reach out to Technical Support if you need further explanation on the issue and workaround. I don't think I'm allowed to share it on public technical forums.
Lorenzo Zarantonello
Lorenzo Zarantonello le 9 Déc 2023
I will do so, thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Version

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by