sorbetto.ranking.ranking_score module

class sorbetto.ranking.ranking_score.RankingScore(importance: Importance, constraint=None, name: str | None = None, abbreviation: str | None = None, symbol: str | None = None)[source]

Bases: AbstractScore

drawInROC(fig, ax, priorPos: float, show_values_map: bool = True, show_iso_value_lines: bool = True, show_colorbar: bool = True, show_no_skills: bool = True, show_priors: bool = True, show_unbiased: bool = True) None[source]

See https://en.wikipedia.org/wiki/Receiver_operating_characteristic

Parameters:
  • fig (_type_) – _description_

  • ax (_type_) – _description_

  • priorPos (float) – prior of the positive class \(\pi_+ \in (0,1)\)

  • show_values_map (bool, optional) – _description_. Defaults to True.

  • show_iso_value_lines (bool, optional) – _description_. Defaults to True.

  • show_colorbar (bool, optional) – _description_. Defaults to True.

  • show_no_skills (bool, optional) – _description_. Defaults to True.

  • show_priors (bool, optional) – _description_. Defaults to True.

  • show_unbiased (bool, optional) – _description_. Defaults to True.

static equivalent(p1: TwoClassClassificationPerformance, p2: TwoClassClassificationPerformance) Conic[source]

Computes, on the Tile with the default parameterization, the locus of performance orderings for which the performances p1 and p2 are equivalent. This locus is a curve, a conic section.

Parameters:
Returns:

the conic section.

Return type:

Conic

static getAccuracy() RankingScore[source]
static getBalancedAccuracy(priorPos: float) RankingScore[source]
static getCriticalSuccessIndex() RankingScore[source]
static getCzekanowskiBinaryIndex() RankingScore[source]
static getDetectionRate(priorPos: float) RankingScore[source]
static getDiceSorensenCoefficient() RankingScore[source]
static getF(beta=1.0) RankingScore[source]
static getIntersectionOverUnion() RankingScore[source]

Intersection over Union (IoU). Synonyms: Jaccard index, Jaccard similarity coefficient, Tanimoto coefficient, similarity, critical success index (CSI), threat score.

static getInverseF(beta=1.0) RankingScore[source]
static getInverseIntersectionOverUnion() RankingScore[source]
static getInverseJaccard() RankingScore[source]
static getInversePrecision() RankingScore[source]
static getInverseRecall() RankingScore[source]
static getJaccard() RankingScore[source]
static getNegativePredictiveValue() RankingScore[source]

Negative Predictive Value (NPV). Synonym: inverse precision

getPencilInROC(priorPos) PencilOfLines[source]
static getPositivePredictiveValue() RankingScore[source]

Positive Predictive Value (PPV). Synonym: precision

static getPrecision() RankingScore[source]
static getProbabilityFalseNegativeComplenent(priorPos: float) RankingScore[source]
static getProbabilityFalsePositiveComplenent(priorPos: float) RankingScore[source]
static getProbabilityTrueNegative(priorPos: float) RankingScore[source]
static getProbabilityTruePositive(priorPos: float) RankingScore[source]
static getRecall() RankingScore[source]
static getRejectionRate(priorPos: float) RankingScore[source]
static getSelectivity() RankingScore[source]
static getSensitivity() RankingScore[source]
static getSimilarity() RankingScore[source]
static getSkewInsensitiveVersionOfF(priorPos: float) RankingScore[source]

The skew-insensitive version of \(\scoreFOne\). Defined in cite:t:Flach2003TheGeometry.

static getSpecificity() RankingScore[source]
static getTanimotoCoefficient() RankingScore[source]
static getTrueNegativeRate() RankingScore[source]

True Negative Rate (TNR). Synonyms: specificity, selectivity, inverse recall.

static getTruePositiveRate() RankingScore[source]

True Positive Rate (TPR). Synonyms: sensitivity, recall.

static getWeightedAccuracy(priorPos: float, weightPos: float) RankingScore[source]
static getZijdenbosSimilarityIndex() RankingScore[source]
property importance: Importance
isCanonical(tol=1e-08) bool[source]

See Piérard et al. [16], Definition 1.