BADGEQuery¶
- class probly.evaluation.active_learning.strategies.BADGEQuery(seed: int | None = None)[source]¶
Bases:
objectSelects a diverse uncertain batch via BADGE gradient embedding k-means++.
Implements Batch Active learning by Diverse Gradient Embeddings (Ash et al., 2020). If the estimator implements
BadgeEstimator(has anembedmethod) it is used for embeddings; otherwisepool.x_unlabeledis used directly and aUserWarningis emitted.- Parameters:
seed – Seed for the k-means++ initialization. Pass None for non-deterministic selection.
Store the seed used for k-means++ initialization.
- Parameters:
seed – Seed for the random number generator. Pass None for non-deterministic selection.
- select(estimator: Estimator, pool: ActiveLearningPool, n: int) ArrayLike[source]¶
Return n indices chosen by BADGE k-means++ on gradient embeddings.