pyod
pyod copied to clipboard
Fitting has no meaning in SOS
Dear contributor(s),
During code reviewing I found some behaviour in SOS which needs some clarification.
After using the fit()
function it is expected that the model has learned/inferred some parameters from the train set. Even in the code you clearly stated that fitting is required:
https://github.com/yzhao062/pyod/blob/3336c9dfe9ebaf7df685ac81316a4cb79d6abbd8/pyod/models/sos.py#L301
However, the code below this line in decision_function(X)
you see that no 'fitted parameters' are used to determine the outlier scores for a potential (new) test set:
https://github.com/yzhao062/pyod/blob/3336c9dfe9ebaf7df685ac81316a4cb79d6abbd8/pyod/models/sos.py#L301-L307
This behavior should not be allowed in my view, since users might think they have fitted the model on their train set, while in practice this is not the case.
Kind regards