HyperparameterTrial<T>
Models & Types · AiDotNet.Models
Represents a single trial in hyperparameter optimization.
How It Works
For Beginners: A trial is one attempt at training with a specific set of hyperparameters. The optimizer tries many trials to find the best hyperparameter values.
Constructors
| Constructor | Summary |
|---|---|
HyperparameterTrial(int trialNumber) |
Initializes a new instance of the HyperparameterTrial class. |
Properties
| Property | Summary |
|---|---|
DateTime StartTime { get; set; } |
Gets or sets the start time of the trial. |
DateTime? EndTime { get; set; } |
Gets or sets the end time of the trial. |
Dictionary<int, T> IntermediateValues { get; set; } |
Gets or sets intermediate values logged during training. |
Dictionary<string, object> Parameters { get; set; } |
Gets or sets the hyperparameter values for this trial. |
Dictionary<string, object> SystemAttributes { get; set; } |
Gets or sets system attributes for the trial. |
Dictionary<string, object> UserAttributes { get; set; } |
Gets or sets user attributes for the trial. |
T ObjectiveValue { get; set; } |
Gets or sets the objective value achieved (e.g., validation accuracy). |
TrialStatus Status { get; set; } |
Gets or sets the status of the trial. |
int TrialNumber { get; set; } |
Gets the trial number (sequential). |
string TrialId { get; set; } |
Gets the unique identifier for this trial. |
Methods
| Method | Summary |
|---|---|
TimeSpan? GetDuration() |
Gets the duration of the trial. |
void Complete(T objectiveValue) |
Marks the trial as complete with the final objective value. |
void Fail() |
Marks the trial as failed. |
void Prune() |
Marks the trial as pruned (stopped early). |
void ReportIntermediateValue(int step, T value) |
Reports an intermediate value for a training step. |