You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the BaseDetector does nothing with regards to .fit(X, y) and .decision_function(X). When implementing a new detector, the user has to do all the checks manually (is valid array, transform to np array, check if fitted). The beginning of each implemented .fit(X, y) and .decision_function(X) is therefore almost identical.
This issue can be resolved by taking an approach similar to the Preprocessor or Metric classes, with additional methods ._fit(X, y) and _decision_function(X), which effectively implement the anomaly detector. The original .fit(X, y) and .decision_function(X) then simply perform the necessary checks and formatting, and then call these new functions.
In addition, a method is_fitted() could be added to the BaseDetector, which returns whether the detector has been initilialized. This can be done by a simple boolean property or by checking if all properties with a trailing underscore have been instantiated.
The text was updated successfully, but these errors were encountered:
Currently, the
BaseDetector
does nothing with regards to.fit(X, y)
and.decision_function(X)
. When implementing a new detector, the user has to do all the checks manually (is valid array, transform to np array, check if fitted). The beginning of each implemented.fit(X, y)
and.decision_function(X)
is therefore almost identical.This issue can be resolved by taking an approach similar to the
Preprocessor
orMetric
classes, with additional methods._fit(X, y)
and_decision_function(X)
, which effectively implement the anomaly detector. The original.fit(X, y)
and.decision_function(X)
then simply perform the necessary checks and formatting, and then call these new functions.In addition, a method
is_fitted()
could be added to theBaseDetector
, which returns whether the detector has been initilialized. This can be done by a simple boolean property or by checking if all properties with a trailing underscore have been instantiated.The text was updated successfully, but these errors were encountered: