ClusteredBatchStrategy<T, TInput, TOutput>

Models & Types · AiDotNet.ActiveLearning.Batch

Clustering-based batch selection strategy using k-means clustering.

Implements: IClusteringBatchStrategy<T, TInput, TOutput>

For Beginners

This strategy first groups similar samples into clusters, then selects the most informative sample from each cluster. This ensures the batch covers different regions of the data space.

How It Works

How It Works:

Advantages:

Considerations:

Constructors

Constructor Summary
ClusteredBatchStrategy() Initializes a new ClusteredBatchStrategy with default settings.
ClusteredBatchStrategy(int numClusters, int maxIterations, double diversityTradeoff) Initializes a new ClusteredBatchStrategy with specified parameters.

Properties

Property Summary
T DiversityTradeoff { get; set; }
int NumClusters { get; }
string Name { get; }

Methods

Method Summary
T ComputeDiversity(TInput sample1, TInput sample2)
int[] ClusterSamples(IDataset<T, TInput, TOutput> unlabeledPool)
int[] SelectBatch(int[] candidateIndices, Vector<T> scores, IDataset<T, TInput, TOutput> unlabeledPool, int batchSize)
int[] SelectFromClusters(int[] clusterAssignments, Vector<T> scores, int batchSize)