BADGEQuery

class probly.evaluation.active_learning.strategies.BADGEQuery(seed: int | None = None)[source]

Bases: object

Selects 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 an embed method) it is used for embeddings; otherwise pool.x_unlabeled is used directly and a UserWarning is 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.

Examples using probly.evaluation.active_learning.strategies.BADGEQuery

Active Learning with sklearn - Margin vs Random

Active Learning with sklearn - Margin vs Random

Active Learning with PyTorch - BADGE Selection

Active Learning with PyTorch - BADGE Selection