Skip to main content

OptunaOptimizer

Optimizer
DashAI.back.optimizers.OptunaOptimizer

Abstract class of all hyperparameter's Optimizers.

All models must extend this class and implement optimize method.

Parameters

n_trials : integer, default=10
The quantity of trials per study. It must be of type positive integer.
sampler : string, default=TPESampler
The sampler algorithm to use for hyperparameter optimization. Different samplers use different strategies for exploring the hyperparameter space.
pruner : string, default=None
The pruner to use for early stopping of unpromising trials. 'MedianPruner' stops trials below the median. 'None' disables pruning.

Methods

get_best_params(self)

Defined on OptunaOptimizer

Return the best parameters found during optimization.

get_model(self)

Defined on OptunaOptimizer

Get the model with the best set of hyperparameters found

get_trials_values(self)

Defined on OptunaOptimizer

Get the trial values from the hyperparameter optimization process

optimize(self, model, input_dataset, output_dataset, parameters, metric, task)

Defined on OptunaOptimizer

Optimization process

contour_plot(self, trials, goal_metric)

Defined on BaseOptimizer

Contour plot between two hyperparameters and the goal metric achieved in the search space.

create_plots(self, trials, run_id, n_params, goal_metric)

Defined on BaseOptimizer

List of available plots.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

history_objective_plot(self, trials, goal_metric)

Defined on BaseOptimizer

Plot for the goal metric achieved per trial.

importance_plot(self, trials, goal_metric)

Defined on BaseOptimizer

Plot to obtain the importance between all the hyperparameters involved in hyperparameter optimization.

slice_plot(self, trials, goal_metric)

Defined on BaseOptimizer

Plot that compares the performance in the search space of one hyperparameter.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.

Compatible with