pysad.evaluation.AUPRMetric

class pysad.evaluation.AUPRMetric[source]

Area under PR curve wrapper class for sklearn.

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

Gets the current value of the score.

Returns:

The current score.

Return type:

float

update(y_true, y_pred)

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.