From charlesreid1

(Created page with "Hyperopt is a hyperparameter optimization library. Origin of the work was in searching through parameter spaces/sampling probability distributions of parameters. Notion of...")
 
No edit summary
Line 2: Line 2:


Origin of the work was in searching through parameter spaces/sampling probability distributions of parameters.  
Origin of the work was in searching through parameter spaces/sampling probability distributions of parameters.  
==Installing==
Hyperopt relies on an older version of the networkx library. If you see this:
<pre>
$ python myhyper.py
Traceback (most recent call last):
  File "myhyper.py", line 14, in <module>
    bestr = fmin(f, space, algo=rand.suggest, max_evals=100)
  File "/usr/local/lib/python3.6/site-packages/hyperopt/fmin.py", line 314, in fmin
    pass_expr_memo_ctrl=pass_expr_memo_ctrl)
  File "/usr/local/lib/python3.6/site-packages/hyperopt/base.py", line 786, in __init__
    pyll.toposort(self.expr)
  File "/usr/local/lib/python3.6/site-packages/hyperopt/pyll/base.py", line 715, in toposort
    assert order[-1] == expr
TypeError: 'generator' object is not subscriptable
</pre>
Do this:
<pre>
$ pip install networkx==1.11
</pre>
Also see this Github issue: https://github.com/hyperopt/hyperopt/issues/325
==Usage==


Notion of a score - you need some way to score the results
Notion of a score - you need some way to score the results
===Example===


Simple example to optimize a 2D quadratic function: <math>x^2 + y^2</math>
Simple example to optimize a 2D quadratic function: <math>x^2 + y^2</math>

Revision as of 21:16, 17 October 2017

Hyperopt is a hyperparameter optimization library.

Origin of the work was in searching through parameter spaces/sampling probability distributions of parameters.

Installing

Hyperopt relies on an older version of the networkx library. If you see this:

$ python myhyper.py
Traceback (most recent call last):
  File "myhyper.py", line 14, in <module>
    bestr = fmin(f, space, algo=rand.suggest, max_evals=100)
  File "/usr/local/lib/python3.6/site-packages/hyperopt/fmin.py", line 314, in fmin
    pass_expr_memo_ctrl=pass_expr_memo_ctrl)
  File "/usr/local/lib/python3.6/site-packages/hyperopt/base.py", line 786, in __init__
    pyll.toposort(self.expr)
  File "/usr/local/lib/python3.6/site-packages/hyperopt/pyll/base.py", line 715, in toposort
    assert order[-1] == expr
TypeError: 'generator' object is not subscriptable

Do this:

$ pip install networkx==1.11

Also see this Github issue: https://github.com/hyperopt/hyperopt/issues/325

Usage

Notion of a score - you need some way to score the results

Example

Simple example to optimize a 2D quadratic function: $ x^2 + y^2 $