Hyperopt: AttributeError: 'module' object has no attribute 'random'

Created on 19 Jan 2016  路  4Comments  路  Source: hyperopt/hyperopt

I am trying to run this code sample:

from hyperopt import fmin, tpe, hp
import hyperopt
algo=hyperopt.random.suggest
space = hp.uniform('x', -10, 10)

but there is a problem arises:

AttributeError: 'module' object has no attribute 'random'

can anyone help?

Most helpful comment

Why not change the documentation?
https://github.com/hyperopt/hyperopt/wiki/FMin

All 4 comments

You should use hyperopt.rand.suggest instead of hyperopt.random.suggest.

Why not change the documentation?
https://github.com/hyperopt/hyperopt/wiki/FMin

Just a reminder guys.. documentation still shows "random" instead of "rand"

Still shows random.

Was this page helpful?
0 / 5 - 0 ratings