hyperopt icon indicating copy to clipboard operation
hyperopt copied to clipboard

Choosing values from range which is not exist.

Open MsSurgeon opened this issue 9 years ago • 1 comments

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?

MsSurgeon avatar Jul 24 '16 13:07 MsSurgeon

https://districtdatalabs.silvrback.com/parameter-tuning-with-hyperopt use this article

andreiSaw avatar Aug 10 '17 10:08 andreiSaw

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.

github-actions[bot] avatar Jan 01 '25 02:01 github-actions[bot]