Trainer<T>

Models & Types · AiDotNet.Training

Default trainer that delegates to the model’s built-in Train() method each epoch.

Inheritance: TrainerBase<T> → Trainer<T>

For Beginners

This is the standard trainer for models that know how to train themselves (e.g., time series models like ARIMA and ExponentialSmoothing). Each epoch it calls model.Train(features, labels), then measures how well the model predicts by computing the loss.

How It Works

Example usage from YAML:

Example usage with in-memory data:

Custom logging:

Constructors

Constructor Summary
Trainer(TrainingRecipeConfig config) Creates a trainer from a TrainingRecipeConfig object.
Trainer(string yamlFilePath) Creates a trainer from a TrainingRecipeConfig object.