hyperopt
hyperopt copied to clipboard
Choosing values from range which is not exist.
I'm using this code
space4rf = {
'max_depth': hp.choice('max_depth', range(1,20)),
'min_samples_leaf': hp.choice('min_samples_leaf', range(1,10)),
}
def f(params):
global best
acc = hyperopt_train_test(params)
return {'loss': -acc, 'status': STATUS_OK}
def hyperopt_train_test(params):
clf = RandomForestRegressor(**params)
return cross_val_score(clf, data, y[var_y],scoring=rms_error).mean()
best = 0
trials = Trials()
best = fmin(f, space4rf, algo=tpe.suggest, max_evals=150, trials=trials)
however trials are include a lot of zero. What I'm doing wrong?
https://districtdatalabs.silvrback.com/parameter-tuning-with-hyperopt use this article
This issue has been marked as stale because it has been open 120 days with no activity. Remove the stale label or comment or this will be closed in 30 days.