Skip to main content

Easy hyperparameter optimization and automatic result saving across machine learning algorithms and libraries

Project description


HyperparameterHunter provides wrappers for executing machine learning algorithms that
automatically save the testing conditions/hyperparameters, results, predictions, and
other data for a wide range of algorithms from many different libraries in a unified
format. HyperparameterHunter aims to simplify the experimentation and hyperparameter
tuning process by allowing you to spend less time doing the annoying tasks, and more time
doing the important ones.

* Truly informed hyperparameter optimization that automatically uses past Experiments
* Eliminate boilerplate code for cross-validation loops, predicting, and scoring
* Stop worrying about keeping track of hyperparameters, scores, or re-running the same Experiments

Getting Started
Set up an Environment to organize Experiments and Optimization
from hyperparameter_hunter import Environment, CrossValidationExperiment
import pandas as pd
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import StratifiedKFold
from xgboost import XGBClassifier

data = load_breast_cancer
df = pd.DataFrame(, columns=data.feature_names)
df['target'] =

env = Environment(
cross_validation_params=dict(n_splits=5, shuffle=2, random_state=32)
Individual Experimentation
experiment = CrossValidationExperiment(
model_init_params=dict(objective='reg:linear', max_depth=3, subsample=0.5)
Hyperparameter Optimization
from hyperparameter_hunter import BayesianOptimization, Real, Integer, Categorical

optimizer = BayesianOptimization(
iterations=100, read_experiments=True, dimensions=[
Integer(name='max_depth', low=2, high=20),
Real(name='learning_rate', low=0.0001, high=0.5),
Categorical(name='booster', categories=['gbtree', 'gblinear', 'dart'])
model_init_params=dict(n_estimators=200, subsample=0.5, learning_rate=0.1)
Plenty of examples for different libraries, and algorithms, as well as more advanced
HyperparameterHunter features can be found in the

Tested Libraries
* [Keras](
* [scikit-learn](
* [LightGBM](
* [CatBoost](
* [XGBoost](
* [rgf_python](
* ... More on the way


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hyperparameter-hunter, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size hyperparameter_hunter-0.0.1-py3-none-any.whl (108.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size hyperparameter_hunter-0.0.1.tar.gz (88.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page