SubmodularBatchStrategy<T, TInput, TOutput>
Models & Types · AiDotNet.ActiveLearning.Batch
Submodular batch selection strategy using facility location objectives.
Implements: ISubmodularBatchStrategy<T, TInput, TOutput>
For Beginners
Submodular functions have a special property called “diminishing returns” - adding more similar samples provides less and less benefit. This naturally encourages selecting diverse, representative samples.
How It Works
How It Works:
Facility Location Objective:
F(S) = Σ max_{s∈S} sim(x, s) for all x in the data
This objective ensures selected samples cover the entire data space well.
Advantages:
Reference: Wei et al. “Submodularity in Data Subset Selection and Active Learning” (ICML 2015)
Constructors
| Constructor | Summary |
|---|---|
SubmodularBatchStrategy() |
Initializes a new SubmodularBatchStrategy with default settings. |
SubmodularBatchStrategy(SubmodularObjective objective, double lambda) |
Initializes a new SubmodularBatchStrategy with specified parameters. |
Properties
| Property | Summary |
|---|---|
T DiversityTradeoff { get; set; } |
|
string Name { get; } |
Methods
| Method | Summary |
|---|---|
T ComputeDiversity(TInput sample1, TInput sample2) |
|
T ComputeMarginalGain(IReadOnlyList<int> currentSelection, int candidateIndex, IDataset<T, TInput, TOutput> unlabeledPool) |
|
int[] GreedyMaximization(int[] candidateIndices, IDataset<T, TInput, TOutput> unlabeledPool, int batchSize) |
|
int[] SelectBatch(int[] candidateIndices, Vector<T> scores, IDataset<T, TInput, TOutput> unlabeledPool, int batchSize) |