Module threshold

Module threshold 

Source
Expand description

Threshold optimization module

This module provides functions for optimizing threshold values in binary classification and computing precision-recall curves. These metrics are useful for understanding classifier performance across different decision thresholds and finding optimal operating points.

§Precision-Recall Curves

Precision-recall curves show the tradeoff between precision and recall at different threshold values. They are particularly useful for imbalanced classification problems.

§Optimal Threshold Finding

These functions help to determine the optimal decision threshold based on various criteria such as F1 score, G-means, or custom cost functions.

Functions§

average_precision_score
Compute the average precision score for binary classification.
average_precision_score_from_curve
Calculate the average precision score from a precision-recall curve.
find_optimal_threshold
Find the optimal threshold to maximize a given score function.
find_optimal_threshold_g_means
Find the optimal threshold to maximize G-means score.
g_means_score
Compute G-means score for binary classification.
precision_recall_curve
Calculates the precision-recall curve for a binary classification problem.