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.