I am creating a system using C++(DX11) and i'm reading raw data into my program, i want to classify what the 3D data-set i'm reading in is and detect any anomalies it may have when compared to a database of the same types of item. I've not really done much in regards to machine learning aside from simple KMeans and linear regression solutions, what would be the best approach to implementing something like classification and anomaly detection in my program and what background reading/research might be required?

Currently, the program can display the raw data as a 3D image.


1 Answer 1


You can try using SVM if your dataset is medium-sized or small (500-10000). You train the model with two classes: normal or anomaly (your output would be the probability of being of one class or the other).

A great library in C++ is libSVM (https://www.csie.ntu.edu.tw/~cjlin/libsvm/) which allows to perform classification or regression tasks.

There is a grest section of Dr NG's coursera ml class that focuses on anomaly detection. I would expect your classes to be imbalanced (you have much more normal cases than anomalies so you need to think about how to deal with this issue, also how do you choose the probability threshold to classify data as anomaly or not)

There are other choices of course: K-means can be used + some rule or another classifier. I would suggest you watch the Andrew NG class try his method (pdf kernel estimation) and once you got the hang of it try another model (such as SVM).

  • $\begingroup$ Thank you for the reply! Do you happen to have a link to his course or something? $\endgroup$
    – Sskaara
    Sep 5, 2019 at 10:40
  • $\begingroup$ here you go: coursera.org/learn/machine-learning (it's week 9) $\endgroup$ Sep 5, 2019 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.