Optuna

Ver. 1.1.1 (2022-10-17)

This module provides a wrapper class for hyperparameter tuning by reusing Optuna framework.

See also: https://pypi.org/project/optuna/

class mlpro.wrappers.optuna.WrHPTOptuna(p_logging=True, p_ids=None, p_visualization=False)

Bases: Wrapper, HyperParamTuner, ScientificObject

This class is a ready to use wrapper class for Optuna framework. Objects of this type can be treated as a hyperparameter tuner object.

Parameters:
  • p_logging (Log) – Log level (see constants for log levels)

  • p_ids (list of str, optional) – List of hyperparameter ids to be tuned, otherwise all hyperparameters, default: None

  • p_visualization (boolean) – enable visualization at the end of the tuning, default: False

C_NAME

Name of the class.

Type:

str

C_NAME = 'Optuna'
C_WRAPPED_PACKAGE = 'optuna'
C_SCIREF_TYPE = 'Proceedings'
C_SCIREF_AUTHOR = 'Akiba, Takuya and Sano, Shotaro and Yanase, Toshihiko and Ohta, Takeru and Koyama, Masanori'
C_SCIREF_TITLE = 'Optuna: A Next-Generation Hyperparameter Optimization Framework'
C_SCIREF_YEAR = '2019'
C_SCIREF_ISBN = '9781450362016'
C_SCIREF_PUBLISHER = 'Association for Computing Machinery'
C_SCIREF_CITY = 'New York'
C_SCIREF_COUNTRY = 'USA'
C_SCIREF_URL = 'https://doi.org/10.1145/3292500.3330701'
C_SCIREF_DOI = '10.1145/3292500.3330701'
C_SCIREF_PAGES = '2623–2631'
C_SCIREF_BOOKTITLE = 'Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining'
C_LOG_SEPARATOR = '------------------------------------------------------------------------------'
get_parameters(trial)

This method is used to get parameters within boundaries. The hyperparameter should be bounded both above and below. For different parameter expressions, please redefined this method and check https://optuna.readthedocs.io/en/stable/reference/generated/optuna.trial.Trial.html! For big data handling, please redifined this method!

Parameters:

trial (object) – Suggest hyperparameters using a trial object.

Returns:

parameters – List of parameter expressions.

Return type:

list

Cross Reference