forked from arrayfire/arrayfire-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayfire.statistics.html
More file actions
317 lines (272 loc) · 16.2 KB
/
arrayfire.statistics.html
File metadata and controls
317 lines (272 loc) · 16.2 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
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>arrayfire.statistics module — ArrayFire Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-arrayfire.statistics">
<span id="arrayfire-statistics-module"></span><h1>arrayfire.statistics module<a class="headerlink" href="#module-arrayfire.statistics" title="Permalink to this headline">¶</a></h1>
<p>Statistical algorithms (mean, var, stdev, etc).</p>
<dl class="py function">
<dt id="arrayfire.statistics.corrcoef">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">corrcoef</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#corrcoef"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.corrcoef" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the correlation coefficient of the input arrays.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>x: af.Array</strong></dt><dd><p>The first input array.</p>
</dd>
<dt><strong>y: af.Array</strong></dt><dd><p>The second input array.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>output: af.Array</dt><dd><p>Array containing the correlation coefficient of the input arrays.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.statistics.cov">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">cov</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">isbiased</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dim</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#cov"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.cov" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate covariance along a given dimension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>a: af.Array</strong></dt><dd><p>The input array.</p>
</dd>
<dt><strong>isbiased: optional: Boolean. default: False.</strong></dt><dd><p>Boolean denoting whether biased estimate should be taken.</p>
</dd>
<dt><strong>dim: optional: int. default: None.</strong></dt><dd><p>The dimension for which to obtain the covariance from input data.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>output: af.Array</dt><dd><p>Array containing the covariance of the input array along a
given dimension.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.statistics.mean">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">mean</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">weights</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dim</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#mean"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.mean" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate mean along a given dimension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>a: af.Array</strong></dt><dd><p>The input array.</p>
</dd>
<dt><strong>weights: optional: af.Array. default: None.</strong></dt><dd><p>Array to calculate the weighted mean. Must match size of the
input array.</p>
</dd>
<dt><strong>dim: optional: int. default: None.</strong></dt><dd><p>The dimension for which to obtain the mean from input data.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>output: af.Array</dt><dd><p>Array containing the mean of the input array along a given
dimension.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.statistics.meanvar">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">meanvar</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">a</span></em>, <em class="sig-param"><span class="pre">weights=None</span></em>, <em class="sig-param"><span class="pre">bias=<VARIANCE.DEFAULT:</span> <span class="pre">0></span></em>, <em class="sig-param"><span class="pre">dim=-1</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#meanvar"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.meanvar" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate mean and variance along a given dimension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>a: af.Array</strong></dt><dd><p>The input array.</p>
</dd>
<dt><strong>weights: optional: af.Array. default: None.</strong></dt><dd><p>Array to calculate for the weighted mean. Must match size of
the input array.</p>
</dd>
<dt><strong>bias: optional: af.VARIANCE. default: DEFAULT.</strong></dt><dd><p>population variance(VARIANCE.POPULATION) or
sample variance(VARIANCE.SAMPLE).</p>
</dd>
<dt><strong>dim: optional: int. default: -1.</strong></dt><dd><p>The dimension for which to obtain the variance from input data.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>mean: af.Array</dt><dd><p>Array containing the mean of the input array along a given
dimension.</p>
</dd>
<dt>variance: af.Array</dt><dd><p>Array containing the variance of the input array along a given
dimension.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.statistics.median">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">median</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dim</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#median"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.median" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate median along a given dimension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>a: af.Array</strong></dt><dd><p>The input array.</p>
</dd>
<dt><strong>dim: optional: int. default: None.</strong></dt><dd><p>The dimension for which to obtain the median from input data.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>output: af.Array</dt><dd><p>Array containing the median of the input array along a
given dimension.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.statistics.stdev">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">stdev</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dim</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#stdev"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.stdev" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate standard deviation along a given dimension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>a: af.Array</strong></dt><dd><p>The input array.</p>
</dd>
<dt><strong>dim: optional: int. default: None.</strong></dt><dd><p>The dimension for which to obtain the standard deviation from
input data.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>output: af.Array</dt><dd><p>Array containing the standard deviation of the input array
along a given dimension.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.statistics.topk">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">topk</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">data</span></em>, <em class="sig-param"><span class="pre">k</span></em>, <em class="sig-param"><span class="pre">dim=0</span></em>, <em class="sig-param"><span class="pre">order=<TOPK.DEFAULT:</span> <span class="pre">0></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#topk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.topk" title="Permalink to this definition">¶</a></dt>
<dd><p>Return top k elements along a single dimension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>data: af.Array</strong></dt><dd><p>Input array to return k elements from.</p>
</dd>
<dt><strong>k: scalar. default: 0</strong></dt><dd><p>The number of elements to return from input array.</p>
</dd>
<dt><strong>dim: optional: scalar. default: 0</strong></dt><dd><p>The dimension along which the top k elements are
extracted. Note: at the moment, topk() only supports the
extraction of values along the first dimension.</p>
</dd>
<dt><strong>order: optional: af.TOPK. default: af.TOPK.DEFAULT</strong></dt><dd><p>The ordering of k extracted elements. Defaults to top k max values.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>values: af.Array</dt><dd><p>Top k elements from input array.</p>
</dd>
<dt>indices: af.Array</dt><dd><p>Corresponding index array to top k elements.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.statistics.var">
<code class="sig-prename descclassname"><span class="pre">arrayfire.statistics.</span></code><code class="sig-name descname"><span class="pre">var</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">isbiased</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">weights</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dim</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/statistics.html#var"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.statistics.var" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate variance along a given dimension.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>a: af.Array</strong></dt><dd><p>The input array.</p>
</dd>
<dt><strong>isbiased: optional: Boolean. default: False.</strong></dt><dd><p>Boolean denoting population variance (false) or sample
variance (true).</p>
</dd>
<dt><strong>weights: optional: af.Array. default: None.</strong></dt><dd><p>Array to calculate for the weighted mean. Must match size of
the input array.</p>
</dd>
<dt><strong>dim: optional: int. default: None.</strong></dt><dd><p>The dimension for which to obtain the variance from input data.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt>output: af.Array</dt><dd><p>Array containing the variance of the input array along a given
dimension.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/arrayfire_logo_symbol.png" alt="Logo"/>
</a></p>
<h1 class="logo"><a href="index.html">ArrayFire</a></h1>
<h3>Navigation</h3>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2020, ArrayFire.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.5.1</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/arrayfire.statistics.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>