evaluate_thresholds#
- mlquantify.adjust_counting.evaluate_thresholds(y, probabilities: ndarray) tuple[source]#
Evaluate a range of classification thresholds to compute the corresponding True Positive Rate (TPR) and False Positive Rate (FPR) for a binary quantification task.
- Parameters:
- ynp.ndarray
The true labels.
- probabilitiesnp.ndarray
The predicted probabilities (scores) for the positive class.
- classesnp.ndarray
The unique classes in the dataset.
- Returns:
- tuple
A tuple of (thresholds, tprs, fprs), where: - thresholds is a numpy array of evaluated thresholds, - tprs is a numpy array of corresponding True Positive Rates, - fprs is a numpy array of corresponding False Positive Rates.