sorbetto.ranking package
- class sorbetto.ranking.AbstractRanking(entities, performance_ordering, name=None)[source]
Bases:
ABCSee Axiom 1 in Piérard et al. [17].
- draw(fig: Figure | None = None, ax: Axes | None = None, value_axis_label: str = '') tuple[Figure, Axes][source]
- property entities: Iterable
- property name
- property performance_ordering
- abstract property values: ndarray
- class sorbetto.ranking.RankingInducedByScore(entities, score, name=None)[source]
Bases:
AbstractRankingSee Axiom 1 in Piérard et al. [17].
- draw(fig: Figure | None = None, ax: Axes | None = None, value_axis_label: str = '') tuple[Figure, Axes][source]
- getEntitiesAtRank(rank: int) list[source]
- Parameters:
rank – an integer between 1 and the number of entities.
- Returns:
The list of all entities e such that min_rank(e) <= rank <= max_rank(e)
- property values: ndarray
- class sorbetto.ranking.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:
p1 (TwoClassClassificationPerformance) – _description_
p2 (TwoClassClassificationPerformance) – _description_
- Returns:
the conic section.
- Return type:
- 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