IActiveLearner<T, TInput, TOutput>

Interfaces · AiDotNet.ActiveLearning.Interfaces

Interface for active learners.

Known implementations: ActiveLearner<T, TInput, TOutput>

For Beginners

An active learner is a machine learning system that actively selects which data points should be labeled. Instead of labeling all data, it strategically chooses the most informative samples to learn from.

How It Works

Active Learning Workflow:

When to Use Active Learning:

Properties

Property Summary
ActiveLearnerConfig<T> Configuration { get; } Gets the configuration for this active learner.
IDataset<T, TInput, TOutput> LabeledPool { get; } Gets the current labeled dataset.
IDataset<T, TInput, TOutput> UnlabeledPool { get; } Gets the current unlabeled pool.
IFullModel<T, TInput, TOutput> Model { get; } Gets the underlying model being trained.
IQueryStrategy<T, TInput, TOutput> QueryStrategy { get; } Gets the query strategy used for sample selection.
int IterationsCompleted { get; } Gets the number of active learning iterations completed.
int TotalQueries { get; } Gets the number of queries (labeling requests) made so far.

Methods

Method Summary
ActiveLearningIterationResult<T> RunIteration(IOracle<TInput, TOutput> oracle) Runs a single iteration of active learning.
ActiveLearningResult<T> Run(IOracle<TInput, TOutput> oracle, IStoppingCriterion<T> stoppingCriterion) Runs active learning until a stopping criterion is met.
EvaluationMetrics<T> Evaluate(IDataset<T, TInput, TOutput> testData) Evaluates the model on a test dataset.
LearningCurve<T> GetLearningCurve() Gets the learning curve (performance vs.
TrainingMetrics<T> TrainModel() Trains the model on the current labeled dataset.
int[] SelectNextBatch() Selects the next batch of samples to query.
void AddLabeledSamples(int[] indices, TOutput[] labels) Adds newly labeled samples to the training set.
void Initialize(IDataset<T, TInput, TOutput> initialLabeled, IDataset<T, TInput, TOutput> unlabeledPool) Initializes the active learner with labeled and unlabeled data.