Table of Contents

Class HyperparameterOptimizationResult<T>

Namespace
AiDotNet.Models.Results
Assembly
AiDotNet.dll

Contains the results of a hyperparameter optimization process.

public class HyperparameterOptimizationResult<T>

Type Parameters

T

The numeric data type used for calculations.

Inheritance
HyperparameterOptimizationResult<T>
Inherited Members

Remarks

For Beginners: This stores everything about a hyperparameter search, including the best hyperparameters found and all the trials that were run.

Constructors

HyperparameterOptimizationResult()

Initializes a new instance of the HyperparameterOptimizationResult class.

public HyperparameterOptimizationResult()

Properties

AllTrials

Gets or sets all trials performed.

public List<HyperparameterTrial<T>> AllTrials { get; set; }

Property Value

List<HyperparameterTrial<T>>

BestObjectiveValue

Gets or sets the best objective value achieved.

public T? BestObjectiveValue { get; set; }

Property Value

T

BestParameters

Gets or sets the best hyperparameter values.

public Dictionary<string, object> BestParameters { get; set; }

Property Value

Dictionary<string, object>

BestTrial

Gets or sets the best trial found during optimization.

public HyperparameterTrial<T>? BestTrial { get; set; }

Property Value

HyperparameterTrial<T>

CompletedTrials

Gets or sets the number of completed trials.

public int CompletedTrials { get; set; }

Property Value

int

EndTime

Gets or sets the end time of optimization.

public DateTime EndTime { get; set; }

Property Value

DateTime

FailedTrials

Gets or sets the number of failed trials.

public int FailedTrials { get; set; }

Property Value

int

PrunedTrials

Gets or sets the number of pruned trials.

public int PrunedTrials { get; set; }

Property Value

int

SearchSpace

Gets or sets the search space that was used.

public HyperparameterSearchSpace SearchSpace { get; set; }

Property Value

HyperparameterSearchSpace

StartTime

Gets or sets the start time of optimization.

public DateTime StartTime { get; set; }

Property Value

DateTime

TotalTime

Gets or sets the total optimization time.

public TimeSpan TotalTime { get; set; }

Property Value

TimeSpan

TotalTrials

Gets or sets the total number of trials run.

public int TotalTrials { get; set; }

Property Value

int

Methods

GetOptimizationHistory()

Gets the optimization history as a list of (trial number, objective value) pairs.

public List<(int TrialNumber, T ObjectiveValue)> GetOptimizationHistory()

Returns

List<(int TrialNumber, T ObjectiveValue)>

GetTopTrials(int, bool)

Gets the top N trials by objective value.

public List<HyperparameterTrial<T>> GetTopTrials(int n, bool maximize = true)

Parameters

n int
maximize bool

Returns

List<HyperparameterTrial<T>>