active_learning.strategies¶
Active learning query strategies with backend dispatch for NumPy and PyTorch.
Submodules¶
Classes¶
Protocol for estimators usable by |
|
Selects a diverse uncertain batch via BADGE gradient embedding k-means++. |
|
Selects unlabeled samples with the highest prediction entropy. |
|
Protocol for estimators usable by query strategies. |
|
Selects unlabeled samples where the model is least confident in its top prediction. |
|
Selects unlabeled samples with the smallest margin between top-2 class probs. |
|
Protocol for active learning query strategies. |
|
Selects unlabeled samples uniformly at random. |
|
Protocol for estimators that provide uncertainty scores. |
|
Selects samples with the highest estimator-provided uncertainty scores. |
Functions¶
Extract embeddings for BADGE selection. |
|
Select n indices via BADGE gradient embedding k-means++. |
|
Compute the entropy of a distribution. |
|
Score each sample by 1 - max(prob). |
|
Score each sample by negative margin. |
|
Select n unique random indices, returning the backend's native index type. |
|
Select n indices with the highest scores. |