Table of Contents

Class TrialResult

Namespace
AiDotNet.AutoML
Assembly
AiDotNet.dll

Represents the result of a single trial during AutoML search.

public sealed class TrialResult
Inheritance
TrialResult
Inherited Members

Remarks

This type is used by internal AutoML implementations to track trial execution outcomes. When accessed via public APIs (for example, through GetTrialHistory()), sensitive fields like raw hyperparameter values must be redacted to align with the AiDotNet facade/IP goals.

For Beginners: AutoML runs many small experiments called "trials". Each trial:

  • Tries one model family with one set of settings.
  • Trains the model and scores it.
  • Records whether it succeeded and how well it did.
This class stores the outcome of one of those experiments.

Properties

CandidateModelType

Gets or sets the candidate model family used for the trial, when known.

public ModelType? CandidateModelType { get; set; }

Property Value

ModelType?

Remarks

This value is safe to expose in redacted summaries and helps users understand which high-level model family was tried without exposing proprietary hyperparameter values or internal configuration details.

Duration

Gets or sets the duration of the trial.

public TimeSpan Duration { get; set; }

Property Value

TimeSpan

ErrorMessage

Gets or sets an error message if the trial failed.

public string? ErrorMessage { get; set; }

Property Value

string

Metadata

Gets or sets additional metadata about the trial.

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

Property Value

Dictionary<string, object>

Remarks

Treat this as sensitive unless explicitly documented otherwise. Public APIs should avoid returning raw metadata by default.

Parameters

Gets or sets the hyperparameters used in this trial.

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

Property Value

Dictionary<string, object>

Remarks

This dictionary is considered sensitive for IP protection. Public APIs should return a redacted copy that does not expose raw values (and may omit keys entirely), while internal AutoML implementations may keep the full dictionary for search logic.

Score

Gets or sets the score achieved by this trial.

public double Score { get; set; }

Property Value

double

Success

Gets or sets a value indicating whether the trial completed successfully.

public bool Success { get; set; }

Property Value

bool

Timestamp

Gets or sets the UTC timestamp when the trial was completed.

public DateTime Timestamp { get; set; }

Property Value

DateTime

TrialId

Gets or sets the unique identifier for the trial.

public int TrialId { get; set; }

Property Value

int

Methods

Clone()

Creates a deep copy of this trial result including sensitive parameters.

public TrialResult Clone()

Returns

TrialResult

CloneRedacted()

Creates a deep copy of this trial result with sensitive fields redacted.

public TrialResult CloneRedacted()

Returns

TrialResult

Remarks

This method exists to support the AiDotNet facade/IP policy: users should be able to understand what happened during AutoML without being able to reconstruct proprietary models from raw hyperparameter values.