BaseDiscriminativePower#

class scio.eval.BaseDiscriminativePower[source]#

Bases: ParamClass

Base class for discriminative power metrics.

Metrics used when thresholding score \(S\) with \(S\leqslant\tau\) for threshold \(\tau\). Positive examples should verify this inequality and thus have low score.

A discriminative power is defined through:

  • a computation procedure, from a ROC instance;

  • optionally, parameters checks.

These should respectively been carried out in from_roc() and _check_params() (see source code for examples).

Discriminative power classes are paramclasses and hyperparameters are defined as their parameters.

Useful methods defined here

__call__(labels, scores)

Compute discriminative power for given labels and scores.

from_roc(roc)

Compute discriminative power from ROC.

__call__(labels, scores)[source]#

Compute discriminative power for given labels and scores.

It is a simple shorthand:

self(labels, scores)                # Use this...
self.from_roc(ROC(labels, scores))  # ...instead of this
abstractmethod from_roc(roc)[source]#

Compute discriminative power from ROC.

Returns:

discriminative_power (float)