Table of Contents

Class MultiFidelityAutoML<T, TInput, TOutput>

Namespace
AiDotNet.AutoML
Assembly
AiDotNet.dll

Built-in AutoML strategy that uses multi-fidelity (successive halving) and ASHA scheduling.

public sealed class MultiFidelityAutoML<T, TInput, TOutput> : BuiltInSupervisedAutoMLModelBase<T, TInput, TOutput>, IAutoMLModel<T, TInput, TOutput>, IFullModel<T, TInput, TOutput>, IModel<TInput, TOutput, ModelMetadata<T>>, IModelSerializer, ICheckpointableModel, IParameterizable<T, TInput, TOutput>, IFeatureAware, IFeatureImportance<T>, ICloneable<IFullModel<T, TInput, TOutput>>, IGradientComputable<T, TInput, TOutput>, IJitCompilable<T>

Type Parameters

T

The numeric type used for calculations.

TInput

The input data type.

TOutput

The output data type.

Inheritance
AutoMLModelBase<T, TInput, TOutput>
SupervisedAutoMLModelBase<T, TInput, TOutput>
MultiFidelityAutoML<T, TInput, TOutput>
Implements
IAutoMLModel<T, TInput, TOutput>
IFullModel<T, TInput, TOutput>
IModel<TInput, TOutput, ModelMetadata<T>>
IParameterizable<T, TInput, TOutput>
ICloneable<IFullModel<T, TInput, TOutput>>
IGradientComputable<T, TInput, TOutput>
Inherited Members
Extension Methods

Remarks

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.

For Beginners: This is a "try cheap first, then spend more on the best" strategy:

  1. Try many models quickly (small subset).
  2. Keep the best few.
  3. Re-train those on more data.
  4. Repeat until full training data.

Constructors

MultiFidelityAutoML(IModelEvaluator<T, TInput, TOutput>?, Random?, AutoMLMultiFidelityOptions?)

public MultiFidelityAutoML(IModelEvaluator<T, TInput, TOutput>? modelEvaluator = null, Random? random = null, AutoMLMultiFidelityOptions? options = null)

Parameters

modelEvaluator IModelEvaluator<T, TInput, TOutput>
random Random
options AutoMLMultiFidelityOptions

Methods

CreateInstanceForCopy()

Factory method for creating a new instance for deep copy. Derived classes must implement this to return a new instance of themselves. This ensures each copy has its own collections and lock object.

protected override AutoMLModelBase<T, TInput, TOutput> CreateInstanceForCopy()

Returns

AutoMLModelBase<T, TInput, TOutput>

A fresh instance of the derived class with default parameters

Remarks

When implementing this method, derived classes should create a fresh instance with default parameters, and should not attempt to preserve runtime or initialization state from the original instance. The deep copy logic will transfer relevant state (trial history, search space, etc.) after construction.

SearchAsync(TInput, TOutput, TInput, TOutput, TimeSpan, CancellationToken)

Searches for the best model configuration

public override Task<IFullModel<T, TInput, TOutput>> SearchAsync(TInput inputs, TOutput targets, TInput validationInputs, TOutput validationTargets, TimeSpan timeLimit, CancellationToken cancellationToken = default)

Parameters

inputs TInput
targets TOutput
validationInputs TInput
validationTargets TOutput
timeLimit TimeSpan
cancellationToken CancellationToken

Returns

Task<IFullModel<T, TInput, TOutput>>

SuggestNextTrialAsync()

Suggests the next hyperparameters to try

public override Task<Dictionary<string, object>> SuggestNextTrialAsync()

Returns

Task<Dictionary<string, object>>