Questions tagged [hyperopt]

Hyperopt is a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions

Resources and Tutorials:

128 questions
0
votes
1 answer

H2OTypeError: Argument should be an ?integer, got int64 [3.30.1.1]

I'm trying a simple use of hyperopt with H2O XGBoost for which I'm taking elements out of a numpy array for the parameters, but I'm getting this H2OTypeError and I don't understand why the condition of ?integer isn't met by int64. To simplify the…
Andrew
  • 13
  • 4
0
votes
1 answer

Imblearn Pipeline and HyperOpt Issue

Currently I am trying to oversample with SMOTE and then run my XGBClassifier in the Pipeline. For some reason I cannot get HyperOpt to play nice with the Pipeline. The two below examples both run properly: smote = SMOTE(random_state = 42) model =…
0
votes
1 answer

tuning neural network parameter via Hyperopt: how to dump trials

When I try to save hyperopt.trials object, which contains information about auto params tuning in neural network, best = fmin(fn = objective, space = space, algo = tpe.suggest, # or rand.suggest for random params selection…
Alex Ivanov
  • 657
  • 1
  • 8
  • 17
0
votes
1 answer

Hyperopt in Python: how to define the real loss value decreased by function

I use Hyperopt to select parameters of XGBoost model in Python 3.7. As objective I use the function which returns several values, including loss: def objective(params, n_folds = nfold): ... return {'loss': loss, 'params': params, 'iteration':…
Alex Ivanov
  • 657
  • 1
  • 8
  • 17
0
votes
1 answer

Can't pickle a module object while using Hyperopt for Logistic Regression

I am trying to fine tune Logistic Regression using Hyperopt in Python. Please find the optimization function below: def objective(params, n_folds = N_FOLDS): """Objective function for Logistic Regression Hyperparameter Tuning""" # Perform…
0
votes
1 answer

XGBoost Hyperparameter Tuning using Hyperopt

I am trying to tune my XGBClassifier model. But I am failing to do so. Please find the code below and please help me clean and edit the code. import csv from hyperopt import STATUS_OK from timeit import default_timer as timer MAX_EVALS =…
0
votes
1 answer

Hyperopt Change Values of Trials() Object maually; Warm Start Hyperopt

I search for a possibility to Warmstart Hyperopt. One way would be to manually fill the List Trials.trials with hyperameters This is acutally possible, yet i wonder if this really influences the optimization, or if this Trials.trials is just the…
0
votes
1 answer

Hyperopt tuning parameters get stuck

I'm testing to tune parameters of SVM with hyperopt library. Often, when i execute this code, the progress bar stop and the code get stuck. I do not understand why. Here is my code : from hyperopt import fmin, tpe, hp, STATUS_OK, Trials X_train…
Clement Ros
  • 329
  • 1
  • 3
  • 17
0
votes
1 answer

Hyperopt on multiple subsets of a dataframe

I have the following dataframe: #create some data with Names column data = pd.DataFrame({'Names': ['Joe', 'John', 'Jasper', 'Jez'] *4, 'Add': ['Lo', 'Po', 'Fa', 'It']*4,'Ob1' : np.random.rand(16), 'Ob2' : np.random.rand(16)}) I want to run…
user6016731
  • 382
  • 5
  • 18
0
votes
1 answer

How to minimize TensorFlow Keras Frozen Graph (.pb) Size using Hyperopt?

I am attempting to load a frozen graph created through TensorFlow Keras (.pb) onto a memory limited microcontroller. Via Hyperopt(...) I am optimizing my training hyperparameters, however I would like to include the size of the resulting model as…
u12357
  • 1
0
votes
1 answer

Setting the scoring method for hyperopt-sklearn

Is there a way to define the scoring method when using hyperopt-sklearn for classifiers ? By default, it seems to be the model.score method of sklearn, so accuracy for classifiers. But for some problems (eg : imbalanced classes), accuracy is not the…
Krystof
  • 185
  • 1
  • 11
0
votes
1 answer

KeyError: '[...] not in index' occurs when train/test sets are split manually into two files

I get the error KeyError: '[...] Not in index' when using an sklearn hyperopt regression example on my dataset. I have seen other answers to this problem where the solution was that, e.g, X_train should be set to X_train = X.iloc[train_indices] and…
user9781778
  • 87
  • 1
  • 9
0
votes
1 answer

Get speed of model evaluation with Keras

I would like to retrieve metrics of speed of the model on validation data, in order to compare different parameters and their impact on speed. For example, the time spent per batch on validation data. Or, since I use hyperopt, the time spent per…
0
votes
1 answer

Hyperopt timeout?

I'm trying without success to set a timeout when calling 'fmin' from Hyperopt package. I would like to stop the entire process when max_evals are reached or when time passed (from the first iteration not each trial) > timeout. Anyone had the same…
keykeykey
  • 3
  • 1
0
votes
1 answer

CNN Keras using Hyperas error: AttributeError: 'str' object has no attribute 'ndim'

The model compiled and ran, until it got to the line that's evaluating the model at the end of the code. I think that the error is that it received a string, but wasn't expecting a string, but I have no idea on how to fix it. Thanks in advance. def…
1 2 3
8
9