autoprognosis.explorers.core.optimizers.bayesian module

class BayesianOptimizer

Bases: object

Optimization helper based on Bayesian Optimization.

Parameters:
  • patience – int maximum iterations without any gain

  • random_state – int random seed

create_study(study_name: str, direction: str = 'maximize', load_if_exists: bool = True, storage_type: str = 'redis', patience: int = 100) Tuple[optuna.Study, ParamRepeatPruner]

Helper for creating a new study.

Parameters:
  • study_name – str Study ID

  • direction – str maximize/minimize

  • load_if_exists – bool If True, it tries to load previous trials from the storage.

  • storage_type – str redis/none

  • patience – int How many trials without improvement to accept.

evaluate() Tuple[List[float], List[dict]]
evaluate_ensemble() Tuple[float, dict]
class EarlyStoppingExceeded(*args: Any, **kwargs: Any)

Bases: OptunaError

class ParamRepeatPruner(study: optuna.study.Study, patience: int)

Bases: object

Prunes reapeated trials, which means trials with the same paramters won’t waste time/resources.

check_patience(trial: optuna.trial.Trial) None
check_trial(trial: optuna.trial.Trial) None
register_existing_trials() None
report_score(score: float) None