Code Documentation: Hyperparameter Optimization

mastml.hyper_opt Module

This module contains methods for optimizing hyperparameters of models

HyperOptUtils:

This class contains various helper utilities for setting up and running hyperparameter optimization

GridSearch:

This class performs a basic grid search over the parameters and value ranges of interest to find the best set of model hyperparameters in the provided grid of values

RandomizedSearch:

This class performs a randomized search over the parameters and value ranges of interest to find the best set of model hyperparameters in the provided grid of values. Often faster than GridSearch. Instead of a grid of values, it takes a probability distribution name as input (e.g. “norm”)

BayesianSearch:

This class performs a Bayesian search over the parameters and value ranges of interest to find the best set of model hyperparameters in the provided grid of values. Often faster than GridSearch.

Classes

BayesSearchCV(estimator, search_spaces[, ...])

Bayesian optimization over hyper parameters.

BayesianSearch(param_names, param_values[, ...])

Class to conduct a Bayesian search to find optimized model hyperparameter values

Categorical(categories[, prior, transform, name])

Search space dimension that can take on categorical values.

GridSearch(param_names, param_values[, ...])

Class to conduct a grid search to find optimized model hyperparameter values

GridSearchCV(estimator, param_grid, *[, ...])

Exhaustive search over specified parameter values for an estimator.

HyperOptUtils(param_names, param_values)

Helper class providing useful methods for other hyperparameter optimization classes.

Integer(low, high[, prior, base, transform, ...])

Search space dimension that can take on integer values.

Metrics(metrics_list[, metrics_type])

Class containing access to a wide range of metrics from scikit-learn and a number of MAST-ML custom-written metrics

RandomizedSearch(param_names, param_values)

Class to conduct a randomized search to find optimized model hyperparameter values

RandomizedSearchCV(estimator, ...[, n_iter, ...])

Randomized search on hyper parameters.

Real(low, high[, prior, base, transform, ...])

Search space dimension that can take on any real value.

SklearnModel(model, **kwargs)

Class to wrap any sklearn estimator, and provide some new dataframe functionality

Class Inheritance Diagram

Inheritance diagram of mastml.hyper_opt.BayesianSearch, mastml.hyper_opt.GridSearch, mastml.hyper_opt.HyperOptUtils, mastml.hyper_opt.RandomizedSearch