InformationDensity<T>
Models & Types · AiDotNet.ActiveLearning
Implements information density sampling for active learning.
Implements: IActiveLearningStrategy<T>
For Beginners
Information density measures how representative a sample is of the overall data distribution by computing its average similarity to all other samples in the pool. This helps select informative samples that are also typical of the data.
How It Works
Formula: ID(x) = Uncertainty(x) × [1/|U| × Σ sim(x, x’)]^β
where sim(x, x’) is the similarity between samples (typically cosine or RBF kernel).
Intuition: A sample is information-dense if:
Advantages:
Reference: McCallum, A. & Nigam, K. (1998). “Employing EM and Pool-Based Active Learning for Text Classification.”
Constructors
| Constructor | Summary |
|---|---|
InformationDensity(double beta, SimilarityMeasure<T> similarityMeasure, double rbfGamma) |
Initializes a new instance of the InformationDensity 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) |