pysad.transform.postprocessing.RunningMaxPostprocessor
- class pysad.transform.postprocessing.RunningMaxPostprocessor(window_size)[source]
A postprocessor that convert a score to the maximum of of all previous scores in the window. :param window_size: Length of the window :type window_size: int
Methods
__init__(window_size)fit(scores)Shortcut method that iteratively applies fit_partial to all instances in order.
fit_partial(score)Fits the windowed 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 using the window.
- 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,)