recpack.pipelines.HyperoptInfo

class recpack.pipelines.HyperoptInfo(space: Dict[str, Any], timeout: Optional[int] = None, max_evals: Optional[int] = None)

Information for hyperopt parameter optimisation

Either specify a minimum number of evaluations using max_evals or specify a max amount of seconds to run optimisation for timeout. If both are specified, the first condition met will cause the optimisation to stop.

For a detailed tutorial on using hyperopt see How to use Hyperopt to Optimise Hyperparameters in a RecPack Pipeline

Parameters
  • space (Dict[str, Any]) – hyperopt parameter space, should be a dict from hyper_parameter to the hp definition of its value (eg. hp.uniformint)

  • timeout (int, optional) – Number of seconds to optimise before stopping, defaults to None

  • max_evals (int, optional) – Maximum number of parameter combinations to try, defaults to None

Raises

ValueError – When both timeout or max_evals are None, avoiding an infinite optimisation loop.

Methods