ActiveLearner<T, TInput, TOutput>

Models & Types · AiDotNet.ActiveLearning.Core

Core implementation of the active learner that orchestrates the active learning loop.

Implements: IActiveLearner<T, TInput, TOutput>

For Beginners

The ActiveLearner is the main orchestrator that runs the active learning process. It manages the labeled and unlabeled pools, coordinates with the query strategy to select informative samples, and trains the model iteratively.

How It Works

Active Learning Workflow:

Example Usage:

Constructors

Constructor Summary
ActiveLearner(IFullModel<T, TInput, TOutput> model, IQueryStrategy<T, TInput, TOutput> queryStrategy, ActiveLearnerConfig<T> config) Initializes a new ActiveLearner with the specified model, strategy, and configuration.

Properties

Property Summary
ActiveLearnerConfig<T> Configuration { get; }
IDataset<T, TInput, TOutput> LabeledPool { get; }
IDataset<T, TInput, TOutput> UnlabeledPool { get; }
IFullModel<T, TInput, TOutput> Model { get; }
IQueryStrategy<T, TInput, TOutput> QueryStrategy { get; }
int IterationsCompleted { get; }
int TotalQueries { get; }

Methods

Method Summary
ActiveLearningIterationResult<T> RunIteration(IOracle<TInput, TOutput> oracle)
ActiveLearningResult<T> Run(IOracle<TInput, TOutput> oracle, IStoppingCriterion<T> stoppingCriterion)
EvaluationMetrics<T> Evaluate(IDataset<T, TInput, TOutput> testData)
LearningCurve<T> GetLearningCurve()
TrainingMetrics<T> TrainModel()
int[] SelectNextBatch()
void AddLabeledSamples(int[] indices, TOutput[] labels)
void Initialize(IDataset<T, TInput, TOutput> initialLabeled, IDataset<T, TInput, TOutput> unlabeledPool)