MultiFidelityAutoML<T, TInput, TOutput>
Models & Types · AiDotNet.AutoML
Built-in AutoML strategy that uses multi-fidelity (successive halving) and ASHA scheduling.
Inheritance: AutoMLModelBase<T, TInput, TOutput> → SupervisedAutoMLModelBase<T, TInput, TOutput> → BuiltInSupervisedAutoMLModelBase<T, TInput, TOutput> → MultiFidelityAutoML<T, TInput, TOutput>
For Beginners
This is a “try cheap first, then spend more on the best” strategy:
- Try many models quickly (small subset).
- Keep the best few.
- Re-train those on more data.
- Repeat until full training data.
How It Works
This strategy evaluates many candidate configurations on a reduced training budget first (for example, a smaller subset of rows), then promotes only the most promising trials to higher budgets.
ASHA (Asynchronous Successive Halving Algorithm) extends this with:
- Parallel trial execution at each fidelity rung.
- Per-trial early stopping of underperforming configurations.
- Grace periods to allow trials to “warm up” before stopping.
Enable ASHA via EnableAsyncExecution.
Example
var valTargets = new Vector<double>(new double[] { 0.0, 1.0, 0.0, 1.0 });
var valInputs = new Matrix<double>(new double[,] { { 1.0, 2.0 }, { 3.0, 4.0 }, { 5.0, 6.0 }, { 7.0, 8.0 } });
var trainTargets = new Vector<double>(new double[] { 0.0, 1.0, 0.0, 1.0 });
var trainInputs = new Matrix<double>(new double[,] { { 1.0, 2.0 }, { 3.0, 4.0 }, { 5.0, 6.0 }, { 7.0, 8.0 } });
var automl = new MultiFidelityAutoML<double, Matrix<double>, Vector<double>>();
var bestModel = await automl.SearchAsync(
trainInputs, trainTargets,
valInputs, valTargets,
timeLimit: TimeSpan.FromMinutes(20));
Constructors
| Constructor | Summary |
|---|---|
MultiFidelityAutoML(Random random, AutoMLMultiFidelityOptions options) |
Methods
| Method | Summary |
|---|---|
Task<Dictionary<string, object>> SuggestNextTrialAsync() |
|
Task<IFullModel<T, TInput, TOutput>> SearchAsync(TInput inputs, TOutput targets, TInput validationInputs, TOutput validationTargets, TimeSpan timeLimit, CancellationToken cancellationToken) |