-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
207 lines (178 loc) · 9.93 KB
/
index.html
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PyStruct - Structured Learning in Python — pystruct 0.2.4 documentation</title>
<link rel="stylesheet" href="_static/basic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/gallery.css" type="text/css" />
<link rel="stylesheet" href="_static/pystruct.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootswatch-3.3.4/cerulean/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.2.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</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 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.4/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="top" title="pystruct 0.2.4 documentation" href="#" />
<link rel="next" title="<no title>" href="auto_examples/index.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 role="document">
<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="#">
PyStruct</a>
<span class="navbar-text navbar-version pull-left"><b>0.2.4</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li><a href="#">Start</a></li>
<li><a href="installation.html">Installation</a></li>
<li><a href="intro.html">Introduction</a></li>
<li><a href="user_guide.html">User Guide</a></li>
<li><a href="auto_examples/index.html">Examples</a></li>
<li><a href="references.html">API</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 content-container">
<div class="section" id="pystruct-structured-learning-in-python">
<h1>PyStruct - Structured Learning in Python<a class="headerlink" href="#pystruct-structured-learning-in-python" title="Permalink to this headline">¶</a></h1>
<p>PyStruct aims at being an easy-to-use structured learning and prediction library.
Currently it implements only max-margin methods and a perceptron, but other algorithms
might follow. The learning algorithms implemented in PyStruct have various names,
which are often used loosely or differently in different communities.
Common names are conditional random fields (CRFs), maximum-margin Markov
random fields (M3N) or structural support vector machines.</p>
<p>If you are new to structured learning,
have a look at <a class="reference internal" href="intro.html#intro"><span>What is structured learning?</span></a>.</p>
<p>An overview of the different models can be found in <a class="reference internal" href="user_guide.html#user-guide"><span>User Guide</span></a>.</p>
<p>The goal of PyStruct is to provide a well-documented tool for researchers as well as non-experts
to make use of structured prediction algorithms.
The design tries to stay as close as possible to the interface and conventions
of <a class="reference external" href="http://scikit-learn.org/dev">scikit-learn</a>.</p>
<p>The current version is PyStruct 0.2.4 which you can install via pip:</p>
<blockquote>
<div>pip install pystruct</div></blockquote>
<p>Detailed installation instructions can be found under <a class="reference internal" href="installation.html#installation"><span>Installation</span></a>.</p>
<p>Starting with this first stable release, PyStruct will remain
stable with respect to API and will provide backward compatibility.</p>
<p>You can contact the authors either via the <a class="reference external" href="https://groups.google.com/forum/#!forum/pystruct">mailing list</a>
or on <a class="reference external" href="https://github.com/pystruct/pystruct">github</a>.</p>
</div>
<div class="section" id="citing">
<h1>Citing<a class="headerlink" href="#citing" title="Permalink to this headline">¶</a></h1>
<p>If you find PyStruct helpful, please cite <a class="reference external" href="http://jmlr.org/papers/volume15/mueller14a/mueller14a.pdf">our paper</a>:</p>
<blockquote>
<div><div class="line-block">
<div class="line">Andreas C. Mueller, Sven Behnke</div>
<div class="line">PyStruct - Structured prediction in Python</div>
<div class="line">Journal of machine learning, 2014</div>
<div class="line"><a class="reference external" href="http://jmlr.org/papers/v15/mueller14a.bib">bibtex here</a></div>
</div>
</div></blockquote>
</div>
<div class="section" id="introduction">
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
<p>In order to do learning with PyStruct, you need to pick two or three things:
a model structure, a learning algorithm and optionally an inference algorithm.
By constructing a learner object from a model, you get an object that can
<code class="docutils literal"><span class="pre">fit</span></code> to training data and can <code class="docutils literal"><span class="pre">predict</span></code> for unseen data (just like
scikit-learn estimators).</p>
<div class="section" id="models-aka-crfs">
<h2>Models, aka CRFs<a class="headerlink" href="#models-aka-crfs" title="Permalink to this headline">¶</a></h2>
<p>These determine what your model looks like:
its graph structure and its loss function.
There are several ready-to-use classes, for example for multi-label
classification, chain CRFs and more complex models. You can find a
full list in the <a class="reference internal" href="references.html#models"><span>Models</span></a> section of the references</p>
</div>
<div class="section" id="learning-algorithms">
<h2>Learning algorithms<a class="headerlink" href="#learning-algorithms" title="Permalink to this headline">¶</a></h2>
<p>These set the parameters in a model based on training data.</p>
<p>Learners are agnostic of the kind of model that is used, so all combinations
are possible and new models can be defined (to include, e.g., higher-order
potentials) without changing the learner.</p>
<p>The current learning algorithms implement max margin learning and
a perceptron. See the <a class="reference internal" href="references.html#learning"><span>Learning</span></a> section of the references.</p>
</div>
<div class="section" id="inference-solvers">
<h2>Inference solvers<a class="headerlink" href="#inference-solvers" title="Permalink to this headline">¶</a></h2>
<p>These perform inference: they run your model on data
in order to make predictions.</p>
<p>There are some options to use different solvers for inference. A linear
programming solver using cvxopt is included. I have Python interfaces for several
other methods on github, including LibDAI, QPBO, AD3.</p>
<p>This is where the heavy lifting is done and in some sense these backends are
interchangeable.</p>
<p>Currently I would recommend AD3 for very accurate solutions and QPBO for larger models.
The the cutting plane solvers include an option (<code class="docutils literal"><span class="pre">switch_to</span></code>) to switch the solver to
a stronger or exact solver when no constraints can be found using the previous
solver (which should be a faster undergenerating solver, such as QPBO).</p>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-43292385-1', 'pystruct.github.io');
ga('send', 'pageview');
</script>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>
© Copyright 2013, Andreas Mueller.<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.3.<br/>
</p>
</div>
</footer>
</body>
</html>