EntropySampling<T>
Models & Types · AiDotNet.ActiveLearning
Implements entropy sampling for active learning sample selection.
Implements: IActiveLearningStrategy<T>
For Beginners
Entropy sampling selects samples where the prediction entropy is highest. High entropy means the probability distribution is spread out across classes, indicating the model is uncertain about which class the sample belongs to.
How It Works
Formula: H(y|x) = -Σ P(yᵢ|x) × log P(yᵢ|x)
Interpretation:
Advantages:
Complexity: O(n × c) where n=pool size, c=number of classes.
Reference: Shannon, C.E. (1948). “A Mathematical Theory of Communication.”
Constructors
| Constructor | Summary |
|---|---|
EntropySampling() |
Initializes a new instance of the EntropySampling class. |
Properties
| Property | Summary |
|---|---|
bool UseBatchDiversity { get; set; } |
|
string Name { get; } |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T> GetSelectionStatistics() |
|
Vector<T> ComputeInformativenessScores(IFullModel<T, Tensor<T>, Tensor<T>> model, Tensor<T> unlabeledPool) |
|
int[] SelectSamples(IFullModel<T, Tensor<T>, Tensor<T>> model, Tensor<T> unlabeledPool, int batchSize) |