forked from pygeode/pygeode.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheof.html
291 lines (279 loc) · 11.4 KB
/
eof.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EOF Analysis — PyGeode 1.0 alpha documentation</title>
<link rel="stylesheet" href="_static/pygtheme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0 alpha',
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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="PyGeode 1.0 alpha documentation" href="index.html" />
<link rel="up" title="Reference" href="reference.html" />
<link rel="next" title="View module" href="view.html" />
<link rel="prev" title="Stats module" href="stats.html" />
<link href="http://fonts.googleapis.com/css?family=Ubuntu:300,300italic,regular,italic,500,500italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="view.html" title="View module"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="stats.html" title="Stats module"
accesskey="P">previous</a> |</li>
<li><a href="index.html">PyGeode 1.0 alpha documentation</a> »</li>
<li><a href="reference.html" accesskey="U">Reference</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="eof-analysis">
<h1>EOF Analysis<a class="headerlink" href="#eof-analysis" title="Permalink to this headline">¶</a></h1>
<dl class="staticmethod">
<dt id="pygeode.eof.EOF">
<em class="property">static </em><tt class="descclassname">eof.</tt><tt class="descname">EOF</tt><big>(</big><em>x</em>, <em>num=1</em>, <em>iaxis=None</em>, <em>weight=True</em>, <em>out=None</em><big>)</big><a class="headerlink" href="#pygeode.eof.EOF" title="Permalink to this definition">¶</a></dt>
<dd><p>Computes the leading Empirical Orthogonal Function(s) for the given
variable.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>x</strong> : Var object</p>
<blockquote>
<div><p>The data of interest</p>
</div></blockquote>
<p><strong>num</strong> : integer, optional</p>
<blockquote>
<div><p>The number of leading EOFs to calculate. Default is <tt class="docutils literal"><span class="pre">1</span></tt>.</p>
</div></blockquote>
<p><strong>iaxis</strong> : Axis object, Axis class, string, or integer, optional</p>
<blockquote>
<div><p>Which axis/axes to treat as the record axis. Multiple axes can be
passed as a tuple. Default is the <tt class="docutils literal"><span class="pre">Time</span></tt> axis of the data
(if found), otherwise the leftmost axis.</p>
</div></blockquote>
<p><strong>weight</strong> : Var object or boolean, optional</p>
<blockquote>
<div><p>Weights to use use for the orthogonality condition.
If <tt class="docutils literal"><span class="pre">True</span></tt>, it uses whatever internal weights the variable posesses.
If <tt class="docutils literal"><span class="pre">False</span></tt> or <tt class="docutils literal"><span class="pre">None</span></tt>, it doesn’t use any weights.
You can also pass in a Var object with explicit weights.
Default is <tt class="docutils literal"><span class="pre">True</span></tt>.</p>
</div></blockquote>
<p><strong>out</strong> : string, optional</p>
<blockquote>
<div><p>Which outputs to return. This is a comma-separated string,
built from the following keywords:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="11%" />
<col width="89%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">keyword</th>
<th class="head">meaning</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>EOF</td>
<td>The EOFs (normalized to unit variance)</td>
</tr>
<tr class="row-odd"><td>EIG</td>
<td>Eigenvalues (of the singular value decomposition of
the variable). If you want the eigenvalues of the
covariance matrix, square these, or use EIG2).</td>
</tr>
<tr class="row-even"><td>EIG2</td>
<td>Eigenvalues (of the covariance matrix)</td>
</tr>
<tr class="row-odd"><td>VAR</td>
<td>Variance (a single scalar value).</td>
</tr>
<tr class="row-even"><td>FRAC</td>
<td>Fraction of total variance explained by each EOF.</td>
</tr>
<tr class="row-odd"><td>PC</td>
<td>Principal components (timeseries data), normalized
to unit variance.</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Default is <tt class="docutils literal"><span class="pre">'EOF,EIG,PC'</span></tt></p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>eof_decomposition</strong> : tuple</p>
<blockquote class="last">
<div><p>A combination of EOFs, eignenvalues or other computed quantities specified
by <cite>out</cite>.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>This routine doesn’t do any pre-processing of the data, such as removing
the mean or detrending. If you want to work with anomalies, then you’ll
have to first compute the anomalies!</p>
<p>This routine tries to automatically determine the best way to solve the
EOFs. If you want to use a particular method, you can call the following
functions (with the same parameters):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="87%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">function</th>
<th class="head">behaviour</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>EOF_iter</td>
<td>Iterative solver (uses a variant of the power method).</td>
</tr>
<tr class="row-odd"><td>EOF_cov</td>
<td>Calculates the full covariance matrix, and then does an
explicit eigendecomposition.</td>
</tr>
<tr class="row-even"><td>EOF_svd</td>
<td>Does an explicit singular value decomposition on the data.</td>
</tr>
<tr class="row-odd"><td>EOF_guess</td>
<td>Returns an approximation of the EOF decomposition from one
pass through the data. This may be useful if you have a
large dataset, and you just want the qualitative features
of the EOF spatial patterns.</td>
</tr>
</tbody>
</table>
</div></blockquote>
</dd></dl>
<span class="target" id="module-pygeode.svd"></span><dl class="function">
<dt id="pygeode.svd.SVD">
<tt class="descclassname">pygeode.svd.</tt><tt class="descname">SVD</tt><big>(</big><em>var1</em>, <em>var2</em>, <em>num=1</em>, <em>weight1=None</em>, <em>weight2=None</em><big>)</big><a class="headerlink" href="#pygeode.svd.SVD" title="Permalink to this definition">¶</a></dt>
<dd><p>Finds coupled EOFs of two fields.</p>
<p>Note that the mean/trend/etc. is NOT removed in this routine.</p>
<dl class="docutils">
<dt>Input parameters:</dt>
<dd>var1, var2 - the input fields</dd>
<dt>Optional parameters:</dt>
<dd><p class="first">num - the number of EOFs to compute (default is 1)
weight1, - weights to use for defining ‘orthogonality’
weight2 Patterns X and Y in the var1 domain are ‘orthogonal’ if:</p>
<blockquote class="last">
<div><blockquote>
<div><blockquote>
<div>sum (X*Y*weights1) == 0</div></blockquote>
<dl class="docutils">
<dt>and patterns Z and W in the var2 domain are ‘orthogonal’ if:</dt>
<dd>sum (Z*W*weights2) == 0</dd>
</dl>
</div></blockquote>
<p>If not specified, the default is to use whatever internal
weights are available from the var, using var.getweights()
If set to False, no weights will be applied.</p>
</div></blockquote>
</dd>
<dt>More optionaller parameters:</dt>
<dd><dl class="first last docutils">
<dt>matrix - which matrix we are diagonalizing (default is ‘cov’)</dt>
<dd>‘cov’ = covariance matrix of var1 & var2
‘cor’ = correlation matrix of var1 & var2</dd>
<dt>iaxis - the principal component / expansion coefficient axis</dt>
<dd>i.e., the ‘time’ axis.
Can be an integer (the axis number, leftmost = 0),
the axis name (string), or a Pygeode axis class.
If not specified, will try to use pygeode.timeaxis.Time,
and if that fails, the leftmost axis.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd><p class="first">eof1 - the coupled eof patterns for var1
pc1 - the principal component / expansion coefficients for var1
eof2 - the coupled eof patterns for var2
pc2 - the principal component / expansion coefficients for var2</p>
<p class="last">Multiple orders of EOFs are concatenated along an ‘order’ axis.</p>
</dd>
</dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="stats.html"
title="previous chapter">Stats module</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="view.html"
title="next chapter">View module</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/eof.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="view.html" title="View module"
>next</a> |</li>
<li class="right" >
<a href="stats.html" title="Stats module"
>previous</a> |</li>
<li><a href="index.html">PyGeode 1.0 alpha documentation</a> »</li>
<li><a href="reference.html" >Reference</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2013, Mike Neish, Peter Hitchcock.
Last updated on Sep 13, 2015.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>