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)
OptunaOptimizerReturn the best parameters found during optimization.
get_model(self)
OptunaOptimizerGet the model with the best set of hyperparameters found
get_trials_values(self)
OptunaOptimizerGet the trial values from the hyperparameter optimization process
optimize(self, model, input_dataset, output_dataset, parameters, metric, task)
OptunaOptimizerOptimization process
contour_plot(self, trials, goal_metric)
BaseOptimizerContour plot between two hyperparameters and the goal metric achieved in the search space.
create_plots(self, trials, run_id, n_params, goal_metric)
BaseOptimizerList of available plots.
get_schema(cls) -> dict
ConfigObjectGenerates the component related Json Schema.
Returns
- dict
- Dictionary representing the Json Schema of the component.
history_objective_plot(self, trials, goal_metric)
BaseOptimizerPlot for the goal metric achieved per trial.
importance_plot(self, trials, goal_metric)
BaseOptimizerPlot to obtain the importance between all the hyperparameters involved in hyperparameter optimization.
slice_plot(self, trials, goal_metric)
BaseOptimizerPlot that compares the performance in the search space of one hyperparameter.
validate_and_transform(self, raw_data: dict) -> dict
ConfigObjectIt 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.