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
1
vote
0 answers
HyperOptSearch and ray.tune
I'm trying to do parameter optimisation with HyperOptSearch and ray.tune. The code works with hyperopt (without tune) but I wanted it to be faster and therefore use tune. Unfortunately I could not find many examples, so I am not sure about the code.…

corianne1234
- 634
- 9
- 23
1
vote
1 answer
ValueError: learning_rate must be greater than 0 but was 0
i tried to tune hyperparameters of scikit GradientBoostingRegressor model using the Hyperopt optimizer. I set search space for learning_rate parameter in the range [0.01, 1] by many ways (for example :
'learning_rate': hp.quniform('learning_rate',…

duskotovilovic
- 13
- 5
1
vote
1 answer
Duplicated trials in Hyperopt library
I'm using hyperopt library to tune my model.
This is my search space:
search_space = {
'max_df': hp.choice('max_df', [1, 0.95, 0.9]),
'cls': hp.choice('cls', ['A', 'B', 'C', 'D', 'E', 'F', 'G',
…

Minions
- 5,104
- 5
- 50
- 91
1
vote
1 answer
Hyperas not returning best result
I'm using hyperas to optimize a function and it is not returning the best result. During the run the print out reads as follows
100%|██████████| 100/100 [7:01:47<00:00, 411.15s/it, best loss: 5.1005506645909895e-05]
but afterwards when I print the…

Novice
- 855
- 8
- 17
1
vote
1 answer
I have a big with the fmin() function using the hyperopt package for Xgboost
Using databricks I have basically copied and pasted the same code from here: https://www.dataiku.com/learn/guide/code/python/advanced-xgboost-tuning.html
I am getting this bug:
train = data.sample(frac=0.70, random_state=123)
valid =…

afolabiayoola
- 11
- 1
1
vote
0 answers
Use hyperopt (or hyperas) with Keras and ImageDataGenerator "flow_from_directory"
I'm making a code to train a CNN (using Keras) with an hyperparameters search using Hyperas. To train the model, I'm using flow_from_directory function of ImageDataGenerator.
I read a lot of posts and documentation I found on internet but my code…

rmarion37
- 73
- 7
1
vote
0 answers
Hyperopt on text train data: ValueError: zero-dimensional arrays cannot be concatenated
I'm using the hyperopt package (version 0.1.2) and I figure out the following error:
Traceback (most recent call last):
File "C:Users\PycharmProjects\script\my_script.py", line 34, in
estim.fit(xTrain, yTrain)
File…

La_haine
- 339
- 1
- 6
- 18
1
vote
0 answers
Unable to run SVC no errors but it just stuck, any way to have a time out?
Unable to run code at the fit of SVC don't know what is causing the problem looking for a solution to fit in SVC with no hang or a way to time out and skip.
if i do more evaluation the more likely it will hang.
I have to restart Jupyter notebook…

Unknown
- 723
- 1
- 6
- 9
1
vote
0 answers
Hyperopt deterministic model Keras with seed
I am trying to use hyperopt for a classification deep learning model with keras:
import numpy as np
import tensorflow as tf
import random as rn
# The below is necessary for starting Numpy generated random numbers
# in a well-defined initial…

iraciv94
- 782
- 2
- 11
- 26
1
vote
1 answer
How to put KerasClassifier, Hyperopt and Sklearn cross-validation together
I am performing a hyperparameter tuning optimization (hyperopt) tasks with sklearn on a Keras models. I am trying to optimize KerasClassifiers using the Sklearn cross-validation, Some code follows:
def create_model():
model = Sequential()
…

JING
- 27
- 5
1
vote
1 answer
Error while trying to tune nearest neighbors with hyperopt in python
I'm trying for the first time to tune KNeighbors parameters with hyperopt but I am getting a werid error. Not sure where is the problem but hoping for a fix. Here is more details on this issue:
Code:
from sklearn.neighbors import…

mj1261829
- 1,200
- 3
- 26
- 53
1
vote
1 answer
TypeError: "set_postfix() argument after ** must be a mapping, not str" using Hyperopt
I try to run this simple example:
from hyperopt import fmin, tpe, hp
best = fmin(
fn=lambda x: (x-1)**2,
space=hp.uniform('x', -2, 2),
algo=tpe.suggest,
max_evals=100)
print(best)
But this is what i get in the…

crystal
- 103
- 6
1
vote
1 answer
How to find the source of a MemoryError in Python?
I'm running a hyperparameter optimization using Hyperopt for a Neural Network. While doing so, after some iterations, I get a MemoryError exception
So far, I tried clearing all variables after they had been used (assigning None or empty lists to…

bleand
- 366
- 2
- 14
1
vote
2 answers
Decoding problem when using hyperas to find parameters of Keras model, maybe due to the `Trial` function in `hyperopt`
I am using hyperas module to tune my Keras model and return the error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 4785: ordinal not in range(128)
The error occurred at calling place, the syntax of trials:
if __name__ ==…

Minghao
- 31
- 4
1
vote
0 answers
AttributeError: 'hyperopt_estimator' object has no attribute '_best_preprocs'
I'm trying to optimize the performance of a sklearn.svm.LinearSVC using hyperopt-sklearn. I'm using the LinearSVC to predict image labels of the CIFAR-10 dataset, and am hoping through hyperopt I'll get improved performance.
However, despite…

krustybek
- 187
- 1
- 2
- 8