HyperbandOptimizer<T, TInput, TOutput>
Models & Types · AiDotNet.HyperparameterOptimization
Implements Hyperband optimization for hyperparameter tuning with early stopping.
Inheritance: HyperparameterOptimizerBase<T, TInput, TOutput> → HyperbandOptimizer<T, TInput, TOutput>
How It Works
For Beginners: Hyperband is a smart resource allocation strategy that:
- Trains many configurations with minimal resources initially
- Progressively eliminates poorly performing configurations
- Allocates more resources to promising configurations
- Uses “successive halving” to efficiently explore the search space
Key concepts:
- Resource (R): Training budget (e.g., epochs, iterations, data samples)
- Configuration: A specific set of hyperparameter values
- Bracket: A group of configurations competing via successive halving
- Successive Halving: Repeatedly train, evaluate, and keep top half
Hyperband runs multiple brackets with different exploration/exploitation trade-offs, combining the best properties of random search with aggressive early stopping.
Constructors
| Constructor | Summary |
|---|---|
HyperbandOptimizer(bool maximize, int maxResource, int reductionFactor, int minResource, int? seed) |
Initializes a new instance of the HyperbandOptimizer class. |
Properties
| Property | Summary |
|---|---|
int NumBrackets { get; } |
Gets the number of brackets in this Hyperband configuration. |
Methods
| Method | Summary |
|---|---|
Dictionary<string, object> SuggestNext(HyperparameterTrial<T> trial) |
Suggests the next hyperparameter configuration to try. |
HyperparameterOptimizationResult<T> Optimize(Func<Dictionary<string, object>, T> objectiveFunction, HyperparameterSearchSpace searchSpace, int nTrials) |
Searches for the best hyperparameter configuration using Hyperband. |
List<BracketInfo> GetBracketInfo() |
Gets detailed information about the bracket structure. |
int GetTotalConfigurationCount() |
Gets the total number of configurations that would be evaluated in a full Hyperband run. |