BALDStrategy<T, TInput, TOutput>

Models & Types · AiDotNet.ActiveLearning.Strategies.Bayesian

Bayesian Active Learning by Disagreement (BALD) strategy.

Implements: IBayesianStrategy<T, TInput, TOutput>

For Beginners

BALD uses Bayesian principles to select samples that would provide the most information about the model’s parameters. It measures the mutual information between predictions and model parameters.

How It Works

How BALD Works:

When to Use:

Reference: Gal et al. “Deep Bayesian Active Learning with Image Data” (ICML 2017)

Constructors

Constructor Summary
BALDStrategy() Initializes a new BALD strategy with default parameters.
BALDStrategy(int mcSamples, double dropoutRate, ActiveLearnerConfig<T> config) Initializes a new BALD strategy with specified parameters.

Properties

Property Summary
int MonteCarloSamples { get; }
string Description { get; }
string Name { get; }

Methods

Method Summary
T ComputeMutualInformation(IFullModel<T, TInput, TOutput> model, TInput input)
T ComputePredictiveEntropy(IFullModel<T, TInput, TOutput> model, TInput input)
Vector<T> ComputeScores(IFullModel<T, TInput, TOutput> model, IDataset<T, TInput, TOutput> unlabeledPool)
int[] SelectSamples(IFullModel<T, TInput, TOutput> model, IDataset<T, TInput, TOutput> unlabeledPool, int batchSize)
void Reset()
void UpdateState(int[] newlyLabeledIndices, TOutput[] labels)