NEW
An open-source Python library for serial and parallel hyperparameter optimization over complex search spaces using TPE, random search, and more.
DESCRIPTION
Hyperopt provides algorithms and abstractions to optimize hyperparameters for ML pipelines and other black-box functions. It supports real-valued, discrete, and conditional spaces via a declarative API. The Tree-structured Parzen Estimator and random search are common strategies, with trials stored to resume or distribute runs. Hyperopt integrates with libraries like scikit-learn and can parallelize across compute backends. It remains a practical baseline for HPO alongside modern alternatives.
ALTERNATIVE DEFINITIONS
Hyperopt
Hyperopt is a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions.
Highlights support for complex search spaces and parallel execution.
Journal of Machine Learning Research
We describe Hyperopt, a Python library for optimizing over real-valued, discrete, and conditional search spaces, using Bayesian optimization algorithms.
Academic framing emphasizing Bayesian optimization and conditional spaces.
RELATED TERMS
Bayesian Optimization Tree-structured Parzen Estimator Grid Search Random Search scikit-learn Hyperparameter Tuning Search Space Objective Function
COMPETING TERMS
KNOWLEDGE AREAS
AI Data Science MLOps Platform & Tooling
TARGET AUDIENCE
Data Scientist AI Engineer MLOps Engineer Data Engineer
EXTERNAL SOURCES
- Hyperopt - Documentation of core optimization API
- scikit-learn - Baseline comparison: randomized search
- Optuna - Alternative HPO framework for comparison
TOP QUESTIONS
When should I use Hyperopt for hyperparameter tuning?
Use it when you need robust HPO over complex, conditional spaces with lightweight setup and Python-native APIs.
Category: HowTo
How does Hyperopt’s TPE differ from Gaussian Process Bayesian optimization?
TPE models densities of good vs. bad configurations, scaling better to high dimensions than GP-based methods in many cases.
Category: Example
What are common mistakes with Hyperopt?
Under-specifying search space bounds, too few trials, or missing reproducibility controls (seeds, logging) can skew results.
Category: Mistakes
How can I parallelize Hyperopt experiments?
Use MongoTrials or Spark/Ray integrations to distribute trials across workers.
Category: HowTo
What metrics should I track during Hyperopt runs?
Objective values, trial parameters, convergence curves, time per trial, and best configurations with seeds.
Category: BestPractices
How does Hyperopt compare to Optuna?
Optuna offers more built-in visualizations and pruning; Hyperopt remains simple and battle-tested with TPE and conditional spaces.
Category: Alternatives
What is a good starting number of trials in Hyperopt?
Begin with 50–200 trials depending on model cost, then scale based on early convergence behavior.
Category: Requirements
Can Hyperopt tune non-ML systems?
Yes, any black-box objective with a definable search space can be optimized, including simulation and system parameters.
Category: Example
How do I ensure reproducibility with Hyperopt?
Fix random seeds, log all trials, pin package versions, and export final configurations with code snapshots.
Category: BestPractices