mlquantify.utils#
Get the real prevalence of each class in the target array. |
|
Load a quantifier from a file. |
|
Generate a list of n_dim values uniformly distributed between 0 and 1 that sum exactly to 1. |
|
Perform cross-validation and return predictions with true labels for each fold. |
|
Generates n_prev prevalence vectors of n_dim classes uniformly distributed on the simplex, with optional lower and upper bounds. |
|
Efficiently generates artificial prevalence vectors that sum to 1 and respect min_val ≤ p_i ≤ max_val for all i. |
|
Generates uniformly distributed prevalence vectors within the simplex, constrained by min_val ≤ p_i ≤ max_val. |
|
Get indexes for a stratified sample based on the prevalence of each class. |