bencher.results.optuna_result
Classes
Functions
|
Evaluate worker across all combinations of non-optimized vars and return mean results. |
|
Group DataFrame by optimized vars and average target columns over non-optimized vars. |
|
True when the study has >1 trial parameter, making importance meaningful. |
Module Contents
- bencher.results.optuna_result._evaluate_over_non_optimized(worker, opt_kwargs, non_opt_vars, result_vars)
Evaluate worker across all combinations of non-optimized vars and return mean results.
- bencher.results.optuna_result._aggregate_non_optimized(df, opt_vars, non_opt_vars, target_names)
Group DataFrame by optimized vars and average target columns over non-optimized vars.
- bencher.results.optuna_result._study_has_multiple_params(study)
True when the study has >1 trial parameter, making importance meaningful.
- class bencher.results.optuna_result.OptunaResult(bench_cfg: bencher.bench_cfg.BenchCfg)
Bases:
bencher.results.bench_result_base.BenchResultBase- to_optuna_plots(**kwargs) list[panel.pane.panel]
Create an optuna summary from the benchmark results
- Returns:
A list of optuna plot summarising the benchmark process
- Return type:
list[pn.pane.panel]
- to_optuna_from_results(worker, n_trials=100, extra_results: list[OptunaResult] | None = None, sampler=None)
- bench_results_to_optuna_trials(include_meta: bool = True) list
Convert an xarray dataset to optuna trials so optuna can further optimise or plot.
- Parameters:
include_meta (bool) – When True, include all variables (inputs + meta like repeat and over_time) as trial parameters for importance analysis. When False, use only input variables with partition/aggregation via the optimize flag.
- Returns:
Optuna trials derived from benchmark results.
- Return type:
list[optuna.trial.FrozenTrial]
- bench_result_to_study(include_meta: bool) optuna.Study
- get_best_trial_params(canonical=False)
- get_pareto_front_params()
- collect_optuna_plots(pareto_width: float | None = None, pareto_height: float | None = None) panel.pane.panel
Use optuna to plot various summaries of the optimisation.
- Parameters:
pareto_width – Optional width for the pareto front plot.
pareto_height – Optional height for the pareto front plot.
- Returns:
A panel with optuna visualisations.
- Return type:
pn.pane.panel
- deep() OptunaResult
Return a deep copy of these results
- get_best_holomap(name: str | None = None)