Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
209 lines (181 loc) · 11.4 KB
/
Copy pathindex.html
File metadata and controls
209 lines (181 loc) · 11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>OpenML — OpenML 0.8.0dev documentation</title>
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/gallery.css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
</head><body>
<a href="https://github.com/openml/openml-python"
class="visible-desktop hidden-xs"><img
id="gh-banner"
style="position: absolute; top: 50px; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
alt="Fork me on GitHub"></a>
<script>
// Adjust banner height.
$(function () {
var navHeight = $(".navbar .container").css("height");
$("#gh-banner").css("top", navHeight);
});
</script>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
OpenML</a>
<span class="navbar-text navbar-version pull-left"><b>0.8.0dev</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li><a href="#">Start</a></li>
<li><a href="usage.html">User Guide</a></li>
<li><a href="api.html">API</a></li>
<li><a href="progress.html">Changelog</a></li>
<li><a href="contributing.html">Contributing</a></li>
<li><a href="progress.html">Progress</a></li>
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="#">Site <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"></ul>
</li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3">
<div id="sidebar" class="bs-sidenav" role="complementary"><ul>
<li><a class="reference internal" href="#">OpenML</a><ul>
<li><a class="reference internal" href="#example">Example</a></li>
<li><a class="reference internal" href="#how-to-get-openml-for-python">How to get OpenML for python</a></li>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#further-information">Further information</a></li>
<li><a class="reference internal" href="#contributing">Contributing</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="col-md-9 content">
<div class="section" id="openml">
<h1>OpenML<a class="headerlink" href="#openml" title="Permalink to this headline">¶</a></h1>
<p><strong>Collaborative Machine Learning in Python</strong></p>
<p>Welcome to the documentation of the OpenML Python API, a connector to the
collaborative machine learning platform <a class="reference external" href="https://www.openml.org">OpenML.org</a>.
The OpenML Python package allows to use datasets and tasks from OpenML together
with scikit-learn and share the results online.</p>
<div class="section" id="example">
<h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
<div class="code python highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">openml</span>
<span class="kn">from</span> <span class="nn">sklearn</span> <span class="k">import</span> <span class="n">preprocessing</span><span class="p">,</span> <span class="n">tree</span><span class="p">,</span> <span class="n">pipeline</span>
<span class="c1"># Set the OpenML API Key which is required to upload your runs.</span>
<span class="c1"># You can get your own API by signing up to OpenML.org.</span>
<span class="n">openml</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">apikey</span> <span class="o">=</span> <span class="s1">'ABC'</span>
<span class="c1"># Define a scikit-learn classifier or pipeline</span>
<span class="n">clf</span> <span class="o">=</span> <span class="n">pipeline</span><span class="o">.</span><span class="n">Pipeline</span><span class="p">(</span>
<span class="n">steps</span><span class="o">=</span><span class="p">[</span>
<span class="p">(</span><span class="s1">'imputer'</span><span class="p">,</span> <span class="n">preprocessing</span><span class="o">.</span><span class="n">Imputer</span><span class="p">()),</span>
<span class="p">(</span><span class="s1">'estimator'</span><span class="p">,</span> <span class="n">tree</span><span class="o">.</span><span class="n">DecisionTreeClassifier</span><span class="p">())</span>
<span class="p">]</span>
<span class="p">)</span>
<span class="c1"># Download the OpenML task for the german credit card dataset with 10-fold</span>
<span class="c1"># cross-validation.</span>
<span class="n">task</span> <span class="o">=</span> <span class="n">openml</span><span class="o">.</span><span class="n">tasks</span><span class="o">.</span><span class="n">get_task</span><span class="p">(</span><span class="mi">31</span><span class="p">)</span>
<span class="c1"># Run the scikit-learn model on the task (requires an API key).</span>
<span class="n">run</span> <span class="o">=</span> <span class="n">openml</span><span class="o">.</span><span class="n">runs</span><span class="o">.</span><span class="n">run_model_on_task</span><span class="p">(</span><span class="n">task</span><span class="p">,</span> <span class="n">clf</span><span class="p">)</span>
<span class="c1"># Publish the experiment on OpenML (optional, requires an API key).</span>
<span class="n">run</span><span class="o">.</span><span class="n">publish</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">'View the run online: </span><span class="si">%s</span><span class="s1">/run/</span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">openml</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">server</span><span class="p">,</span> <span class="n">run</span><span class="o">.</span><span class="n">run_id</span><span class="p">))</span>
</pre></div>
</div>
</div>
<div class="section" id="how-to-get-openml-for-python">
<h2>How to get OpenML for python<a class="headerlink" href="#how-to-get-openml-for-python" title="Permalink to this headline">¶</a></h2>
<p>You can install the OpenML package via <cite>pip</cite>:</p>
<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">openml</span>
</pre></div>
</div>
<p>For more advanced installation information, please see the
<a class="reference internal" href="contributing.html#installation"><span class="std std-ref">Installation</span></a> section.</p>
</div>
<div class="section" id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="usage.html#usage"><span class="std std-ref">Basic Usage</span></a></li>
<li><a class="reference internal" href="api.html#api"><span class="std std-ref">APIs</span></a></li>
<li><a class="reference internal" href="contributing.html#contributing"><span class="std std-ref">Contributing</span></a></li>
</ul>
</div>
<div class="section" id="further-information">
<h2>Further information<a class="headerlink" href="#further-information" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://docs.openml.org/">OpenML documentation</a></li>
<li><a class="reference external" href="https://docs.openml.org/APIs/">OpenML client APIs</a></li>
<li><a class="reference external" href="https://docs.openml.org/developers/">OpenML developer guide</a></li>
<li><a class="reference external" href="https://www.openml.org/contact">Contact information</a></li>
<li><a class="reference external" href="https://www.openml.org/cite">Citation request</a></li>
<li><a class="reference external" href="https://medium.com/open-machine-learning">OpenML blog</a></li>
<li><a class="reference external" href="https://twitter.com/open_ml">OpenML twitter account</a></li>
</ul>
</div>
<div class="section" id="contributing">
<h2>Contributing<a class="headerlink" href="#contributing" title="Permalink to this headline">¶</a></h2>
<p>Contribution to the OpenML package is highly appreciated. The OpenML package
currently has a 1/4 position for the development and all help possible is
needed to extend and maintain the package, create new examples and improve
the usability. Please see the <a class="reference internal" href="contributing.html#contributing"><span class="std std-ref">Contributing</span></a> page for more information.</p>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>
© Copyright 2014-2018, Matthias Feurer, Andreas Müller, Farzan Majdani, Joaquin Vanschoren, Jan van Rijn, Arlind Kadra and Pieter Gijsbers.<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.1.<br/>
</p>
</div>
</footer>
</body>
</html>