IAutoMLModel<T, TInput, TOutput>

Interfaces · AiDotNet.Interfaces

Defines the contract for AutoML models that automatically search for optimal model configurations.

Implements: IFullModel<T, TInput, TOutput>

Known implementations: AutoMLModelBase<T, TInput, TOutput>, IMapElitesAutoMLModel<T, TInput, TOutput>

How It Works

AutoML (Automated Machine Learning) models automatically search through different model types, hyperparameters, and architectures to find the best configuration for a given dataset. This interface extends IFullModel to provide AutoML-specific functionality like search space configuration, trial management, and optimization settings.

Properties

Property Summary
AutoMLStatus Status { get; } Gets the current optimization status
IFullModel<T, TInput, TOutput> BestModel { get; } Gets the best model found so far
TimeSpan TimeLimit { get; set; } Gets or sets the time limit for the AutoML search
double BestScore { get; } Gets the best score achieved
int TrialLimit { get; set; } Gets or sets the maximum number of trials to run

Methods

Method Summary
IFullModel<T, TInput, TOutput> SearchBestModel(TInput inputs, TOutput targets, TInput validationInputs, TOutput validationTargets) Searches for the best model configuration (synchronous version)
List<TrialResult> GetResults() Gets the results of all trials performed during search
List<TrialResult> GetTrialHistory() Gets the history of all trials
Task ReportTrialResultAsync(Dictionary<string, object> parameters, double score, TimeSpan duration) Reports the result of a trial
Task<Dictionary<int, double>> GetFeatureImportanceAsync() Gets feature importance from the best model
Task<Dictionary<string, object>> SuggestNextTrialAsync() Suggests the next hyperparameters to try
Task<IFullModel<T, TInput, TOutput>> SearchAsync(TInput inputs, TOutput targets, TInput validationInputs, TOutput validationTargets, TimeSpan timeLimit, CancellationToken cancellationToken) Searches for the best model configuration asynchronously
void ConfigureSearchSpace(Dictionary<string, ParameterRange> searchSpace) Configures the search space for hyperparameter optimization
void EnableEarlyStopping(int patience, double minDelta) Enables early stopping
void EnableNAS(bool enabled) Enables Neural Architecture Search (NAS) for automatic network design
void Run(TInput inputs, TOutput targets, TInput validationInputs, TOutput validationTargets) Runs the AutoML optimization process (alternative name for Search)
void Search(TInput inputs, TOutput targets, TInput validationInputs, TOutput validationTargets) Performs the AutoML search process (synchronous version)
void SetCandidateModels(List<Type> modelTypes) Sets the models to consider in the search
void SetConstraints(List<SearchConstraint> constraints) Sets constraints for the search
void SetModelsToTry(List<Type> modelTypes) Sets which model types should be considered during the search
void SetOptimizationMetric(MetricType metric, bool maximize) Sets the optimization metric
void SetSearchSpace(Dictionary<string, ParameterRange> searchSpace) Sets the search space for hyperparameters
void SetTimeLimit(TimeSpan timeLimit) Sets the time limit for the AutoML search process
void SetTrialLimit(int maxTrials) Sets the maximum number of trials to execute during search