HybridSampling<T>
Models & Types · AiDotNet.ActiveLearning
Implements Hybrid Sampling that combines multiple active learning strategies.
Implements: IActiveLearningStrategy<T>
For Beginners
Hybrid sampling combines the benefits of multiple active learning strategies. For example, uncertainty sampling might select many similar samples near the decision boundary, while diversity sampling ensures good coverage. Combining them gets the best of both worlds.
How It Works
How it works:
Common combinations:
Reference: Settles, “Active Learning Literature Survey” (2009).
Constructors
| Constructor | Summary |
|---|---|
HybridSampling(IEnumerable<ValueTuple<IActiveLearningStrategy<T>, double>> strategies, CombinationMethod<T> method) |
Initializes a new instance of the HybridSampling class. |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<ValueTuple<IActiveLearningStrategy<T>, double>> Strategies { get; } |
Gets the strategies used in this hybrid sampler. |
bool UseBatchDiversity { get; set; } |
|
string Name { get; } |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T> GetSelectionStatistics() |
|
HybridSampling<T> CreateUncertaintyDiversity(double uncertaintyWeight, double diversityWeight) |
Creates a default hybrid strategy combining uncertainty sampling and diversity sampling. |
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) |