dataeval.core.ber_mst¶
- dataeval.core.ber_mst(data, labels)¶
An estimator for Multi-class Bayes error rate using FR with a minimum spanning tree (MST) test statistic basis.
- Parameters:¶
- data : NDArray[np.float64]¶
Array of image embeddings
- labels : NDArray[np.intp]¶
Array of labels for each image
- Returns:¶
The upper and lower bounds, respectively, of the Bayes Error Rate
- Return type:¶
tuple[float, float]
References
[1] Learning to Bound the Multi-class Bayes Error (Th. 3 and Th. 4)
Examples
>>> import sklearn.datasets as dsets >>> from dataeval.core._ber import ber_mst>>> images, labels = dsets.make_blobs(n_samples=50, centers=2, n_features=2, random_state=0) >>> ber_mst(images, labels) (0.04, 0.020416847668728033)