Hyperopt is a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions
Questions tagged [hyperopt]
128 questions
3
votes
1 answer
XGBoost Loss not changing with HyperOpt
I'm trying to optimize the hyperparameters on my XGBoost model using HyperOpt, but the loss is not changing with every iteration. You can find my code below:
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2,…

JHWCHUNG
- 31
- 1
3
votes
1 answer
How can I use Hyperopt with MLFlow within a pandas_udf?
I'm building multiple Prophet models where each model is passed to a pandas_udf function which trains the model and stores the results with MLflow.
@pandas_udf(result_schema, PandasUDFType.GROUPED_MAP)
def forecast(data):
......
with…

nescobar
- 81
- 1
- 5
3
votes
1 answer
Hyperopt Integration With Spark MlLib
Does anyone have a good example of integrate Hyperopt into Spark's MlLib? I have been trying to do so on Databricks and continue to get the same error. I am not sure if this is an issue with my objective function or instead if it's something with…

JD Haddon
- 31
- 2
3
votes
2 answers
AttributeError: module 'hyperopt' has no attribute 'uniform'
I am trying to define a parameter space in hyperopt. However, when I run:
import hyperopt as hp
SPACE = {'d1': hp.uniform('d1',-1000000,-0.5),
'd2': hp.uniform('d2',0,1),
'd3': hp.uniform('d3',0,1)}
I receive the error in the title. The only thing…

natedjurus
- 319
- 3
- 11
3
votes
0 answers
Unable to reproduce result obtained from hyperparameter tuning using hyperopt
I have built a Pytorch model and performed hyperparameters tuning using library Hyperopt. The result obtained is not reproducible despite I have already call the below seeding function at the beginning of each run:
util.py
def…

jimmystackoverflowjiim
- 151
- 1
- 2
- 10
3
votes
2 answers
hyperopt result exceeds my hp.choice restriction, why? (XGBoost)
I met a strange problem:
I defined my XGB hyper-parameter 'max_depth' by hyperopt
hp.choice('max_depth',range(2,20))
But I got 'max_depth' = 0 or 1 result, which is not within [2,20) restriction. Why?
Anything I missed?
Thanks.
Error…

Ayung
- 31
- 3
3
votes
1 answer
ap_uniform_sampler() missing 1 required positional argument: 'high' in Ray Tune package for python
I am trying to use the Ray Tune package for hyperparameter tuning of a LSTM implemented using pure Tensorflow. I used the hyperband scheduler and HyperOptSearch algorithms for this and I am also using the trainable class method. When I try to run it…

Suleka_28
- 2,761
- 4
- 27
- 43
3
votes
1 answer
Pandas : Key error while slicing Pandas Dataframe
I am trying to split the Pandas Dataframe into Train and Test.
Example:
Y = final_dataset['Species']
X = final_dataset[X_best_features]
X_train = X[0:120]
X_test = X[120:150]
y_train = Y[0:120]
y_test = Y[120:150]
Now I am using Hyperopt to get…

shre2306
- 65
- 2
- 8
2
votes
1 answer
Optimal solution with Gekko
I want to use the hyperparameters optimization using hyperopt, but I have a problem finding the right formulation of the search space for the hyperparameters. the optimal solution of my problem is [0,4050,2100,2100,1200,0,0,450,150].My attempt…

Chaymae Makri
- 77
- 4
2
votes
0 answers
How to select hyperparameters for Kernel PCA in python using hyperopt?
I am looking into applying Kernel Principal Component Analysis (KPCA) to reduce the dimensionality of my feature matrix set to obtain a cluster of datapoints. I went through the parameters used in KPCA in scikit learn package and understood that…

WDpad159
- 359
- 3
- 15
2
votes
1 answer
Using hyperopt with constraints
To create search space for hyperopt, we can simply do:
space = {
'x': hp.uniform('x', -10, 10),
'y': hp.uniform('y', -10, 10)
}
However, how can I do this when I want a condition like x + y = 1? And extend it to many variables like x+y+z+t…

Minh-Long Luu
- 2,393
- 1
- 17
- 39
2
votes
1 answer
What should go first: automated xgboost model params tuning (Hyperopt) or features selection (boruta)
I classify clients by many little xgboost models created from different parts of dataset.
Since it is hard to support many models manually, I decided to automate hyperparameters tuning via Hyperopt and features selection via Boruta.
Would you advise…

Alex Ivanov
- 657
- 1
- 8
- 17
2
votes
1 answer
How to tune hyperparameters over a hyperparameter space using Bayesian Optimization (in Python)?
I am trying to tune hyperparameters using bayesian optimization for random forest regression over a hyperparameter space using the code below, but I get an error that says
TypeError: init() got an unexpected keyword argument 'min_samples'
I got…

SR92
- 23
- 2
2
votes
1 answer
Hyperopt failed to execute mlflow.end_run() with tracking URI: databricks
I'm using Azure Databricks + Hyperopt + MLflow for some hyperparameter tuning on a small dataset. Seem like the job is running, and I get output in MLflow, but the job ends with the following error message:
Hyperopt failed to execute…

yeamusic21
- 276
- 3
- 11
2
votes
1 answer
Hyperopt classification task raises error "TypeError: __init__() got an unexpected keyword argument 'n_iter' "
I am trying to use Hyperopt to optimize a classification task on my dataset using Google Colab. However, one of its utilities, cross-validation does not work and raises this error :
TypeError: init() got an unexpected keyword argument…

Beg
- 405
- 1
- 5
- 18