Bayes Error Rate
Tutorials
Check out this tutorial to begin using the BER class
How To Guides
There are currently no how to’s for BER. If there are scenarios that you want us to explain, contact us!
DataEval API
- class dataeval.metrics.BER(data: ArrayLike, labels: ArrayLike, method: Literal['MST', 'KNN'] = 'KNN', k: int = 1)
An estimator for Multi-class Bayes Error Rate using FR or KNN test statistic basis
- Parameters:
data (np.ndarray) – Array of images or image embeddings
labels (np.ndarray) – Array of labels for each image or image embedding
method (Literal["MST", "KNN"], default "KNN") – Method to use when estimating the Bayes error rate
k (int, default 1) – number of nearest neighbors for KNN estimator – ignored by MST estimator
- evaluate() Dict[str, float]
Calculates the Bayes Error Rate estimate using the provided method
- Returns:
- berfloat
The estimated lower bounds of the Bayes Error Rate
- ber_lowerfloat
The estimated upper bounds of the Bayes Error Rate
- Return type:
Dict[str, float]
- Raises:
ValueError – If unique classes M < 2