UPP#
- class mlquantify.evaluation.protocol.UPP(batch_size, n_prevalences, repeats=1, random_state=None)[source]#
Uniform Prevalence Protocol (UPP) for evaluation. An extension of the APP that generates artificial prevalence distributions uniformly across all classes utilizing the kraemer sampling method.
- Parameters:
- batch_sizeint or list of int
The size of the batches to be used in the evaluation.
- n_prevalencesint
The number of artificial prevalences to generate.
- repeatsint
The number of times to repeat the evaluation with different random seeds.
- random_stateint, optional
The random seed for reproducibility.
- Attributes:
- n_prevalencesint
The number of artificial prevalences to generate.
- repeatsint
The number of times to repeat the evaluation with different random seeds.
- random_stateint
The random seed for reproducibility.
Examples
>>> protocol = UPP(batch_size=100, n_prevalences=5, repeats=3, random_state=42) >>> for train_idx, test_idx in protocol.split(X, y): ... # Train and evaluate model ... pass