2
$\begingroup$

Very new to ML. I am trying to create an anomaly detector. I have thousands of graphs like the one I have attached. I am interested in the pink line. If the pink line's behavior changes drastically from the overall pattern of the line (i.e. the black circle), the graph needs to be flagged. While I am only interested in the pink line's behavior, I have included the blue line because it seems in every graph when the pink line dips downwards, the blue line dips upward.

I was thinking to use KNN, but I am not sure.

Any tips or guidance would be very appreciated! Thanks :)

Graph

$\endgroup$
2
$\begingroup$

It really depends on your data. First, you should also keep in mind that you have to define what is a "drastic change" and if it is just a simple number or threshold then you might not even need an ML algorithm to solve this, you can easily have some conditions to check the values or do it threshold-based.

But, if you want to use an ML algorithm then I would suggest that you take a look at Novelty and Outlier Detection tools provided by Scikit-Learn here:

https://scikit-learn.org/stable/modules/outlier_detection.html

In particular, you can try "Isolation Forest" and "One-class SVM". For me in many cases "Isolation Forest" is the best fit, but try them out and see which one works the best for you.

Let me know if this is helpful.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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