pysad.transform.postprocessing.MedianPostprocessor¶
- class pysad.transform.postprocessing.MedianPostprocessor[source]¶
A postprocessor that convert a score to the median of of all previous scores.
Methods
__init__
()fit
(scores)Shortcut method that iteratively applies fit_partial to all instances in order.
fit_partial
(score)Fits the postprocessor to the (next) timestep's score.
fit_transform
(scores)Shortcut method that iteratively applies fit_transform_partial to all instances in order.
fit_transform_partial
(score)Shortcut method that iteratively applies fit_partial and transform_partial, respectively.
transform
(scores)Shortcut method that iteratively applies transform_partial to all instances in order.
transform_partial
([score])Applies postprocessing to the score.
- fit(scores)¶
Shortcut method that iteratively applies fit_partial to all instances in order.
- Parameters:
shape (np.float64 array of) – Input scores.
- Returns:
self.
- Return type:
- fit_transform(scores)¶
Shortcut method that iteratively applies fit_transform_partial to all instances in order.
- Parameters:
shape (np.float64 array of) – Input scores.
- Returns:
Processed scores.
- Return type:
np.float64 array of shape (num_instances,)
- fit_transform_partial(score)¶
Shortcut method that iteratively applies fit_partial and transform_partial, respectively.
- transform(scores)¶
Shortcut method that iteratively applies transform_partial to all instances in order.
- Parameters:
shape (np.float64 array of) – Input scores.
- Returns:
Processed scores.
- Return type:
np.float64 array of shape (num_instances,)