pysad.transform.postprocessing.ZScorePostprocessor

class pysad.transform.postprocessing.ZScorePostprocessor[source]

A postprocessor that normalize the score via Z-score normalization.

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:

object

fit_partial(score)[source]

Fits the postprocessor to the (next) timestep’s score.

Parameters:

score (float) – Input score.

Returns:

self.

Return type:

object

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.

Parameters:

score (float) – Input score.

Returns:

Processed score.

Return type:

float

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,)

transform_partial(score)[source]

Applies postprocessing to the score.

Parameters:

score (float) – The input score.

Returns:

Transformed score.

Return type:

float