index.html 13.7 KB
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Documentation for Hyperopt, Distributed Asynchronous Hyper-parameter Optimization">
        
        <link rel="canonical" href="http://hyperopt.github.io/hyperopt/">
        <link rel="shortcut icon" href="img/favicon.ico">
        <title>Hyperopt Documentation</title>
        <link href="css/bootstrap-custom.min.css" rel="stylesheet">
        <link href="css/font-awesome.min.css" rel="stylesheet">
        <link href="css/base.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
            <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->

        <script src="js/jquery-1.10.2.min.js" defer></script>
        <script src="js/bootstrap-3.0.3.min.js" defer></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/yaml.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/python.min.js"></script>
        <script>hljs.initHighlightingOnLoad();</script> 
    </head>

    <body class="homepage">

        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="container">

                <!-- Collapsed navigation -->
                <div class="navbar-header">
                    <!-- Expander button -->
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href=".">Hyperopt Documentation</a>
                </div>

                <!-- Expanded navigation -->
                <div class="navbar-collapse collapse">
                        <!-- Main navigation -->
                        <ul class="nav navbar-nav">
                            <li class="active">
                                <a href=".">Home</a>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Getting started <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li >
    <a href="getting-started/overview/">Getting started with Hyperopt</a>
</li>
                                    
<li >
    <a href="getting-started/minimizing_functions/">Minimizing functions</a>
</li>
                                    
<li >
    <a href="getting-started/search_spaces/">Defining search spaces</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Installation <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li >
    <a href="setup/installation-notes/">Installation notes</a>
</li>
                                    
<li >
    <a href="setup/running-tests/">Running tests</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Scale out <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li >
    <a href="scaleout/mongodb/">MongoDB</a>
</li>
                                    
<li >
    <a href="scaleout/spark/">Spark</a>
</li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Misc <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li >
    <a href="interfacing-languages/">Interfacing with other languages</a>
</li>
                                    
<li >
    <a href="related-work/">Related work</a>
</li>
                                    
<li >
    <a href="scipy_submission/">SciPy 2013 submission</a>
</li>
                                </ul>
                            </li>
                        </ul>

                    <ul class="nav navbar-nav navbar-right">
                        <li>
                            <a href="#" data-toggle="modal" data-target="#mkdocs_search_modal">
                                <i class="fa fa-search"></i> Search
                            </a>
                        </li>
                            <li class="disabled">
                                <a rel="next" >
                                    <i class="fa fa-arrow-left"></i> Previous
                                </a>
                            </li>
                            <li >
                                <a rel="prev" href="getting-started/overview/">
                                    Next <i class="fa fa-arrow-right"></i>
                                </a>
                            </li>
                            <li>
                                <a href="http://github.com/hyperopt/hyperopt/edit/master/docs/index.md"><i class="fa fa-github"></i> Edit on GitHub</a>
                            </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container">
                <div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
    <ul class="nav bs-sidenav">
        <li class="main active"><a href="#hyperopt-distributed-asynchronous-hyper-parameter-optimization">Hyperopt: Distributed Asynchronous Hyper-parameter Optimization</a></li>
            <li><a href="#getting-started">Getting started</a></li>
            <li><a href="#algorithms">Algorithms</a></li>
            <li><a href="#documentation">Documentation</a></li>
            <li><a href="#examples">Examples</a></li>
            <li><a href="#announcements-mailing-list">Announcements mailing list</a></li>
            <li><a href="#discussion-mailing-list">Discussion mailing list</a></li>
            <li><a href="#cite">Cite</a></li>
            <li><a href="#thanks">Thanks</a></li>
    </ul>
</div></div>
                <div class="col-md-9" role="main">

<h1 id="hyperopt-distributed-asynchronous-hyper-parameter-optimization">Hyperopt: Distributed Asynchronous Hyper-parameter Optimization</h1>
<h2 id="getting-started">Getting started</h2>
<p>Install hyperopt from PyPI</p>
<pre><code class="bash">pip install hyperopt
</code></pre>

<p>to run your first example</p>
<pre><code class="python"># define an objective function
def objective(args):
    case, val = args
    if case == 'case 1':
        return val
    else:
        return val ** 2

# define a search space
from hyperopt import hp
space = hp.choice('a',
    [
        ('case 1', 1 + hp.lognormal('c1', 0, 1)),
        ('case 2', hp.uniform('c2', -10, 10))
    ])

# minimize the objective over the space
from hyperopt import fmin, tpe
best = fmin(objective, space, algo=tpe.suggest, max_evals=100)

print best
# -&gt; {'a': 1, 'c2': 0.01420615366247227}
print hyperopt.space_eval(space, best)
# -&gt; ('case 2', 0.01420615366247227}
</code></pre>

<p>If you're a developer, clone this repository and install from source:</p>
<pre><code class="bash">git clone https://github.com/jaberg/hyperopt.git
cd hyperopt &amp;&amp; python setup.py develop &amp;&amp;  pip install -e '.[MongoTrials, SparkTrials, ATPE]'
</code></pre>

<h2 id="algorithms">Algorithms</h2>
<p>Currently three algorithms are implemented in hyperopt:</p>
<ul>
<li>Random Search</li>
<li><a href="https://papers.nips.cc/paper/4443-algorithms-for-hyper-parameter-optimization.pdf">Tree of Parzen Estimators (TPE)</a></li>
<li><a href="https://www.electricbrain.io/blog/learning-to-optimize">Adaptive TPE</a></li>
</ul>
<p>Hyperopt has been designed to accommodate Bayesian optimization algorithms based on Gaussian processes and regression trees, but these are not currently implemented.</p>
<p>All algorithms can be parallelized in two ways, using:</p>
<ul>
<li><a href="https://spark.apache.org/">Apache Spark</a></li>
<li><a href="https://mongodb.com">MongoDB</a></li>
</ul>
<h2 id="documentation">Documentation</h2>
<p><a href="http://hyperopt.github.io/hyperopt">Hyperopt documentation can be found here</a>, but is partly still hosted on the wiki. Here are some quick links to the most relevant pages:</p>
<ul>
<li><a href="https://github.com/hyperopt/hyperopt/wiki/FMin">Basic tutorial</a></li>
<li><a href="https://github.com/hyperopt/hyperopt/wiki/Installation-Notes">Installation notes</a></li>
<li><a href="https://github.com/hyperopt/hyperopt/wiki/Parallelizing-Evaluations-During-Search-via-MongoDB">Using mongodb</a></li>
</ul>
<h2 id="examples">Examples</h2>
<p>See <a href="https://github.com/hyperopt/hyperopt/wiki/Hyperopt-in-Other-Projects">projects using hyperopt</a> on the wiki.</p>
<h2 id="announcements-mailing-list">Announcements mailing list</h2>
<p><a href="https://groups.google.com/forum/#!forum/hyperopt-announce">Announcments</a></p>
<h2 id="discussion-mailing-list">Discussion mailing list</h2>
<p><a href="https://groups.google.com/forum/#!forum/hyperopt-discuss">Discussion</a></p>
<h2 id="cite">Cite</h2>
<p>If you use this software for research, plase cite the following paper:</p>
<p>Bergstra, J., Yamins, D., Cox, D. D. (2013) Making a Science of Model Search: Hyperparameter Optimization in Hundreds of Dimensions for Vision Architectures. To appear in Proc. of the 30th International Conference on Machine Learning (ICML 2013).</p>
<h2 id="thanks">Thanks</h2>
<p>This project has received support from</p>
<ul>
<li>National Science Foundation (IIS-0963668),</li>
<li>Banting Postdoctoral Fellowship program,</li>
<li>National Science and Engineering Research Council of Canada (NSERC),</li>
<li>D-Wave Systems, Inc.</li>
</ul></div>
        </div>

        <footer class="col-md-12">
            <hr>
            <p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
        </footer>
        <script>
            var base_url = ".",
                shortcuts = {"search": 83, "next": 78, "help": 191, "previous": 80};
        </script>
        <script src="js/base.js" defer></script>
        <script src="search/main.js" defer></script>

        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="Search Modal" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="exampleModalLabel">Search</h4>
            </div>
            <div class="modal-body">
                <p>
                    From here you can search these documents. Enter
                    your search terms below.
                </p>
                <form role="form">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
                    </div>
                </form>
                <div id="mkdocs-search-results"></div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="Keyboard Shortcuts Modal" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="exampleModalLabel">Keyboard Shortcuts</h4>
            </div>
            <div class="modal-body">
              <table class="table">
                <thead>
                  <tr>
                    <th style="width: 20%;">Keys</th>
                    <th>Action</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td class="help shortcut"><kbd>?</kbd></td>
                    <td>Open this help</td>
                  </tr>
                  <tr>
                    <td class="next shortcut"><kbd>n</kbd></td>
                    <td>Next page</td>
                  </tr>
                  <tr>
                    <td class="prev shortcut"><kbd>p</kbd></td>
                    <td>Previous page</td>
                  </tr>
                  <tr>
                    <td class="search shortcut"><kbd>s</kbd></td>
                    <td>Search</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

    </body>
</html>

<!--
MkDocs version : 1.0.4
Build Date UTC : 2019-10-18 12:19:35
-->