arundo / adtk

A Python toolkit for rule-based/unsupervised anomaly detection in time series
https://adtk.readthedocs.io
Mozilla Public License 2.0
1.06k stars 143 forks source link

PcaAD Returning Different Results for Same Inputs #143

Open halexanderlumen opened 1 year ago

halexanderlumen commented 1 year ago

Hello,

I do not know why exactly this is occurring, but when using the PcaAD method and the same K and c values, I am receiving different outputs for labeled anomalies. Has anyone else experienced this?

It almost appears as if there is randomness being incorporated. I believe the sklearn library PCA does include random_state as one of the parameters due to the randomness used in it's SVD. See link: https://gregorygundersen.com/blog/2019/01/17/randomized-svd/ .

Is there a random state parameter? I did not see one in the documentation.