Closed roadrunner-gs closed 1 month ago
Thank you for your issue. We are currently discussing this in the team; will let you know of the result.
We decided to change the PyODAdapter
to be unsupervised and semi-supervised at the same time, meaning it supports both conventions:
fit_predict(X)
on the same input data Xfit(X_train, y)
to build the normal behavior model on some data X_train
, ignoring y
predict(X_target)
to get the anomaly scores on different data X_target
For the semi-supervised case, most PyOD models can actually deal with somewhat dirty data (non-annotated). So, it does not fit the definition fully.
Describe the bug
The PyODAdapter currently does not support predict() on test-data, only decisionscores on data classifier was fitted on is available. https://pyod.readthedocs.io/en/latest/pyod.models.html#module-pyod.models.lof (...) decisionscoresnumpy array of shape (n_samples,) The outlier scores of the training data. The higher, the more abnormal. Outliers tend to have higher scores. This value is available once the detector is fitted. (...) I would expect to fit on train-data and predict on test-data. Furthermore fit_predict of PyOD is deprecated and therefore should not be used by an adapter as to not elicit unexpected behaviour for persons versed with the underlying PyOD.
Output:
Steps/Code to reproduce the bug
Expected results
Ability to use test-sets and getting scores for the test-set returned, see below for comparison.
Actual results
Versions
No response