sharpness

pycalib.scoring.sharpness(y, p_pred, ddof=1)[source]

Computes the empirical sharpness of a classifier.

Computes the empirical sharpness of a classifier by computing the sample variance of a vector of confidence estimates.

Parameters
  • y (array-like) – Ground truth labels. Dummy argument for consistent cross validation.

  • p_pred (array-like) – Array of confidence estimates

  • ddof (int, optional, default=1) – Degrees of freedom for the variance estimator.

Returns

Sharpness

Return type

float