BadgeEstimator

class probly.evaluation.active_learning.strategies.BadgeEstimator(*args, **kwargs)[source]

Bases: Estimator, Protocol

Protocol for estimators usable by BADGEQuery.

Extends Estimator with an embed method that returns penultimate-layer features used to build BADGE gradient embeddings.

embed(x: ArrayLike) → ArrayLike[source]

Return penultimate-layer embeddings of shape (n, emb_dim).

fit(x: ArrayLike, y: ArrayLike) → None[source]

Fit the estimator on labeled data.

predict(x: ArrayLike) → ArrayLike[source]

Return class predictions.

predict_proba(x: ArrayLike) → ArrayLike[source]

Return class probabilities.

Examples using probly.evaluation.active_learning.strategies.BadgeEstimator

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