:mod:`lookout.style.format.optimizer` ===================================== .. py:module:: lookout.style.format.optimizer .. autoapi-nested-parse:: Optimize base model hyper-parameters. Module Contents --------------- .. py:class:: Optimizer(cv:int, n_iter:int, n_jobs:Optional[int], random_state:int, base_model_name_categories:Sequence[str], max_depth_categories:Sequence[Optional[int]], max_features_categories:Sequence[Optional[str]], min_samples_leaf_min:int, min_samples_leaf_max:int, min_samples_split_min:int, min_samples_split_max:int) Optimize base model hyper-parameters. .. attribute:: _log .. method:: optimize(self, X:csr_matrix, y:numpy.ndarray) Conduct hyper-parameters search to find the best base model given the data. :param X: Sparse feature matrix. :param y: Labels numpy array. :return: Best base model score and parameters. .. method:: _cost(self, *, X:csr_matrix, y:numpy.ndarray, **params) .. py:class:: _VerboseLogCallback(log) Callback to control the verbosity and log output properly. Adopted from skopt library, VerboseCallback class. .. method:: __call__(self, res) Call callback method. :param res: The optimization as a OptimizeResult object. :return: None