pysad.evaluation.BaseSKLearnMetric

class pysad.evaluation.BaseSKLearnMetric[source]

Abstract base class to wrap the sklearn metrics.

Methods

__init__()

get()

Gets the current value of the score.

update(y_true, y_pred)

Updates the metric with given true and predicted value for a timestep.

get()[source]

Gets the current value of the score.

Returns:

The current score.

Return type:

float

update(y_true, y_pred)[source]

Updates the metric with given true and predicted value for a timestep.

Parameters:
  • y_true (int) – Ground truth class. Either 1 or 0.

  • y_pred (float) – Predicted class or anomaly score. Higher values correspond to more anomalousness and lower values correspond to more normalness.