mdarray 0.4.3.pre-java → 0.5.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +82 -14
- data/Rakefile +8 -2
- data/doc/BinaryOperator.html +227 -0
- data/doc/BitwiseOperators.html +135 -0
- data/doc/BooleanFunctions.html +135 -0
- data/doc/BooleanMDArray.html +193 -0
- data/doc/ByteMDArray.html +271 -0
- data/doc/Colt.html +269 -0
- data/doc/ComparisonOperators.html +135 -0
- data/doc/Const.html +490 -0
- data/doc/Csv.html +589 -0
- data/doc/DDescriptive.html +4373 -0
- data/doc/DoubleMDArray.html +555 -0
- data/doc/DoubleStatList.html +256 -0
- data/doc/FastBinaryOperator.html +743 -0
- data/doc/FastBoolean.html +512 -0
- data/doc/FastUnaryOperator.html +583 -0
- data/doc/FloatMDArray.html +237 -0
- data/doc/FunctionCreation.html +520 -0
- data/doc/FunctionMap.html +813 -0
- data/doc/GenericFunctions.html +135 -0
- data/doc/IntMDArray.html +259 -0
- data/doc/LongMDArray.html +257 -0
- data/doc/MDArray.html +9639 -0
- data/doc/MDArray/Counter.html +2767 -0
- data/doc/MDArray/IteratorFast.html +872 -0
- data/doc/MDArray/IteratorFastBoolean.html +384 -0
- data/doc/MDArray/IteratorFastByte.html +373 -0
- data/doc/MDArray/IteratorFastChar.html +384 -0
- data/doc/MDArray/IteratorFastDouble.html +384 -0
- data/doc/MDArray/IteratorFastFloat.html +384 -0
- data/doc/MDArray/IteratorFastInt.html +384 -0
- data/doc/MDArray/IteratorFastLong.html +384 -0
- data/doc/MDArray/IteratorFastShort.html +384 -0
- data/doc/MDArrayTest.html +125 -0
- data/doc/NonNumericalMDArray.html +177 -0
- data/doc/NumericFunctions.html +297 -0
- data/doc/NumericalMDArray.html +278 -0
- data/doc/Operator.html +826 -0
- data/doc/Proc.html +1097 -0
- data/doc/RubyBinaryOperator.html +526 -0
- data/doc/RubyFunctions.html +232 -0
- data/doc/RubyMath.html +135 -0
- data/doc/RubyStats.html +135 -0
- data/doc/RubyUnaryOperator.html +510 -0
- data/doc/ShortMDArray.html +267 -0
- data/doc/StatList.html +1176 -0
- data/doc/StringMDArray.html +181 -0
- data/doc/StructureMDArray.html +181 -0
- data/doc/UnaryOperator.html +227 -0
- data/doc/UserFunction.html +297 -0
- data/doc/_index.html +467 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/file.README.html +173 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +173 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +2524 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/colt/colt.rb +56 -0
- data/lib/colt/colt_mdarray.rb +95 -0
- data/lib/colt/double_descriptive.rb +636 -0
- data/lib/colt/probability.rb +12 -0
- data/lib/colt/stat_list.rb +192 -0
- data/lib/env.rb +5 -1
- data/lib/mdarray.rb +5 -0
- data/lib/mdarray/access.rb +2 -2
- data/lib/mdarray/creation.rb +34 -19
- data/lib/mdarray/csv.rb +61 -0
- data/lib/mdarray/fast_operators.rb +241 -0
- data/lib/mdarray/operators.rb +18 -0
- data/lib/mdarray/ruby_operators.rb +2 -18
- data/lib/mdarray/ruby_stats.rb +1 -1
- data/lib/mdarray/views.rb +8 -8
- data/target/helper.jar +0 -0
- data/test/colt/VALE3.csv +3437 -0
- data/test/colt/VALE3.xlsx +0 -0
- data/test/colt/VALE3_short-err.csv +20 -0
- data/test/colt/VALE3_short.csv +20 -0
- data/test/colt/VALE3_short.xlsx +0 -0
- data/test/colt/test_complete.rb +25 -0
- data/test/colt/test_stat_list.rb +128 -0
- data/test/colt/test_statistics.rb +114 -0
- data/test/complete.rb +25 -0
- data/test/env.rb +54 -30
- data/test/{arithmetic_casting.rb → mdarray/arithmetic_casting.rb} +0 -0
- data/test/{test_access.rb → mdarray/test_access.rb} +0 -0
- data/test/{test_boolean.rb → mdarray/test_boolean.rb} +0 -2
- data/test/{test_comparison.rb → mdarray/test_comparison.rb} +0 -0
- data/test/{test_complete.rb → mdarray/test_complete.rb} +3 -14
- data/test/{test_counter.rb → mdarray/test_counter.rb} +0 -0
- data/test/{test_creation.rb → mdarray/test_creation.rb} +0 -0
- data/test/{test_error.rb → mdarray/test_error.rb} +8 -5
- data/test/{test_operator.rb → mdarray/test_operator.rb} +6 -2
- data/test/{test_speed.rb → mdarray/test_performance.rb} +74 -39
- data/test/{test_printing.rb → mdarray/test_printing.rb} +0 -1
- data/test/{test_shape.rb → mdarray/test_shape.rb} +0 -0
- data/test/mdarray/test_statistics.rb +80 -0
- data/test/{test_trigonometry.rb → mdarray/test_trigonometry.rb} +0 -0
- data/test/{test_views.rb → mdarray/test_views.rb} +0 -0
- data/vendor/parallelcolt-0.10.0.jar +0 -0
- data/version.rb +1 -1
- metadata +122 -39
- data/test/test_lazy.rb +0 -52
- data/test/test_statistics.rb +0 -38
|
@@ -0,0 +1,4373 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Module: DDescriptive
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.5.2
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '';
|
|
20
|
+
framesUrl = "frames.html#!" + escape(window.location.href);
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="_index.html">Index (D)</a> »
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<span class="title">DDescriptive</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Module: DDescriptive
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<dt class="r1">Included in:</dt>
|
|
81
|
+
<dd class="r1"><span class='object_link'><a href="DoubleStatList.html" title="DoubleStatList (class)">DoubleStatList</a></span></dd>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<dt class="r2 last">Defined in:</dt>
|
|
86
|
+
<dd class="r2 last">lib/colt/double_descriptive.rb</dd>
|
|
87
|
+
|
|
88
|
+
</dl>
|
|
89
|
+
<div class="clear"></div>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<h2>
|
|
100
|
+
Instance Method Summary
|
|
101
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
102
|
+
</h2>
|
|
103
|
+
|
|
104
|
+
<ul class="summary">
|
|
105
|
+
|
|
106
|
+
<li class="public ">
|
|
107
|
+
<span class="summary_signature">
|
|
108
|
+
|
|
109
|
+
<a href="#auto_correlation-instance_method" title="#auto_correlation (instance method)">- (Object) <strong>auto_correlation</strong>(lag) </a>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</span>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
124
|
+
|
|
125
|
+
<p>Returns the auto-correlation of a data sequence.</p>
|
|
126
|
+
</div></span>
|
|
127
|
+
|
|
128
|
+
</li>
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<li class="public ">
|
|
132
|
+
<span class="summary_signature">
|
|
133
|
+
|
|
134
|
+
<a href="#correlation-instance_method" title="#correlation (instance method)">- (Object) <strong>correlation</strong>(other_val) </a>
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
</span>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
149
|
+
|
|
150
|
+
<p>Returns the correlation of two data sequences.</p>
|
|
151
|
+
</div></span>
|
|
152
|
+
|
|
153
|
+
</li>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
<li class="public ">
|
|
157
|
+
<span class="summary_signature">
|
|
158
|
+
|
|
159
|
+
<a href="#covariance-instance_method" title="#covariance (instance method)">- (Object) <strong>covariance</strong>(other_val) </a>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
</span>
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
174
|
+
|
|
175
|
+
<p>Returns the covariance of two data sequences.</p>
|
|
176
|
+
</div></span>
|
|
177
|
+
|
|
178
|
+
</li>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<li class="public ">
|
|
182
|
+
<span class="summary_signature">
|
|
183
|
+
|
|
184
|
+
<a href="#durbin_watson-instance_method" title="#durbin_watson (instance method)">- (Object) <strong>durbin_watson</strong> </a>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
</span>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
199
|
+
|
|
200
|
+
<p>Durbin-Watson computation.</p>
|
|
201
|
+
</div></span>
|
|
202
|
+
|
|
203
|
+
</li>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
<li class="public ">
|
|
207
|
+
<span class="summary_signature">
|
|
208
|
+
|
|
209
|
+
<a href="#frequencies-instance_method" title="#frequencies (instance method)">- (Object) <strong>frequencies</strong> </a>
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
</span>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
224
|
+
|
|
225
|
+
<p>Computes the frequency (number of occurances, count) of each distinct value
|
|
226
|
+
in the given sorted data.</p>
|
|
227
|
+
</div></span>
|
|
228
|
+
|
|
229
|
+
</li>
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
<li class="public ">
|
|
233
|
+
<span class="summary_signature">
|
|
234
|
+
|
|
235
|
+
<a href="#geometric_mean-instance_method" title="#geometric_mean (instance method)">- (Object) <strong>geometric_mean</strong> </a>
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
</span>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
250
|
+
|
|
251
|
+
<p>Returns the geometric mean of a data sequence.</p>
|
|
252
|
+
</div></span>
|
|
253
|
+
|
|
254
|
+
</li>
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
<li class="public ">
|
|
258
|
+
<span class="summary_signature">
|
|
259
|
+
|
|
260
|
+
<a href="#harmonic_mean-instance_method" title="#harmonic_mean (instance method)">- (Object) <strong>harmonic_mean</strong> </a>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
</span>
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
275
|
+
|
|
276
|
+
<p>Returns the harmonic mean of a data sequence.</p>
|
|
277
|
+
</div></span>
|
|
278
|
+
|
|
279
|
+
</li>
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
<li class="public ">
|
|
283
|
+
<span class="summary_signature">
|
|
284
|
+
|
|
285
|
+
<a href="#kurtosis-instance_method" title="#kurtosis (instance method)">- (Object) <strong>kurtosis</strong> </a>
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
</span>
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
300
|
+
|
|
301
|
+
<p>Returns the kurtosis (aka excess) of a data sequence, which is -3 +
|
|
302
|
+
moment(data,4,mean) / standardDeviation4.</p>
|
|
303
|
+
</div></span>
|
|
304
|
+
|
|
305
|
+
</li>
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
<li class="public ">
|
|
309
|
+
<span class="summary_signature">
|
|
310
|
+
|
|
311
|
+
<a href="#lag1-instance_method" title="#lag1 (instance method)">- (Object) <strong>lag1</strong> </a>
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
</span>
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
326
|
+
|
|
327
|
+
<p>Returns the lag-1 autocorrelation of a dataset; Note that this method has
|
|
328
|
+
semantics different from autoCorrelation(?, 1);
|
|
329
|
+
????????????????????????????.</p>
|
|
330
|
+
</div></span>
|
|
331
|
+
|
|
332
|
+
</li>
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
<li class="public ">
|
|
336
|
+
<span class="summary_signature">
|
|
337
|
+
|
|
338
|
+
<a href="#list_size-instance_method" title="#list_size (instance method)">- (Object) <strong>list_size</strong> </a>
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
</span>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
<span class="summary_desc"><div class='inline'>
|
|
353
|
+
<p>????????????????????????????.</p>
|
|
354
|
+
</div></span>
|
|
355
|
+
|
|
356
|
+
</li>
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
<li class="public ">
|
|
360
|
+
<span class="summary_signature">
|
|
361
|
+
|
|
362
|
+
<a href="#max-instance_method" title="#max (instance method)">- (Object) <strong>max</strong> </a>
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
</span>
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
377
|
+
|
|
378
|
+
<p>Returns the largest member of a data sequence.</p>
|
|
379
|
+
</div></span>
|
|
380
|
+
|
|
381
|
+
</li>
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
<li class="public ">
|
|
385
|
+
<span class="summary_signature">
|
|
386
|
+
|
|
387
|
+
<a href="#mean-instance_method" title="#mean (instance method)">- (Object) <strong>mean</strong> </a>
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
</span>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
402
|
+
|
|
403
|
+
<p>Returns the arithmetic mean of a data sequence; That is Sum( <a
|
|
404
|
+
href="http://i">data</a> ) / data.size() ????????????????????????????.</p>
|
|
405
|
+
</div></span>
|
|
406
|
+
|
|
407
|
+
</li>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
<li class="public ">
|
|
411
|
+
<span class="summary_signature">
|
|
412
|
+
|
|
413
|
+
<a href="#mean_deviation-instance_method" title="#mean_deviation (instance method)">- (Object) <strong>mean_deviation</strong> </a>
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
</span>
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
428
|
+
|
|
429
|
+
<p>Returns the mean deviation of a dataset.</p>
|
|
430
|
+
</div></span>
|
|
431
|
+
|
|
432
|
+
</li>
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
<li class="public ">
|
|
436
|
+
<span class="summary_signature">
|
|
437
|
+
|
|
438
|
+
<a href="#median-instance_method" title="#median (instance method)">- (Object) <strong>median</strong> </a>
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
</span>
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
453
|
+
|
|
454
|
+
<p>Returns the median of a sorted data sequence.</p>
|
|
455
|
+
</div></span>
|
|
456
|
+
|
|
457
|
+
</li>
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
<li class="public ">
|
|
461
|
+
<span class="summary_signature">
|
|
462
|
+
|
|
463
|
+
<a href="#min-instance_method" title="#min (instance method)">- (Object) <strong>min</strong> </a>
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
</span>
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
478
|
+
|
|
479
|
+
<p>Returns the smallest member of a data sequence.</p>
|
|
480
|
+
</div></span>
|
|
481
|
+
|
|
482
|
+
</li>
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
<li class="public ">
|
|
486
|
+
<span class="summary_signature">
|
|
487
|
+
|
|
488
|
+
<a href="#moment-instance_method" title="#moment (instance method)">- (Object) <strong>moment</strong>(k, c) </a>
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
</span>
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
503
|
+
|
|
504
|
+
<p>Returns the moment of k-th order with constant c of a data sequence, which
|
|
505
|
+
is Sum( (<a href="http://i">data</a>-c)k ) / data.size().</p>
|
|
506
|
+
</div></span>
|
|
507
|
+
|
|
508
|
+
</li>
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
<li class="public ">
|
|
512
|
+
<span class="summary_signature">
|
|
513
|
+
|
|
514
|
+
<a href="#moment3-instance_method" title="#moment3 (instance method)">- (Object) <strong>moment3</strong> </a>
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
</span>
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
529
|
+
|
|
530
|
+
<p>The third central moment.</p>
|
|
531
|
+
</div></span>
|
|
532
|
+
|
|
533
|
+
</li>
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
<li class="public ">
|
|
537
|
+
<span class="summary_signature">
|
|
538
|
+
|
|
539
|
+
<a href="#moment4-instance_method" title="#moment4 (instance method)">- (Object) <strong>moment4</strong> </a>
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
</span>
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
<span class="summary_desc"><div class='inline'>
|
|
554
|
+
<p>????????????????????????????.</p>
|
|
555
|
+
</div></span>
|
|
556
|
+
|
|
557
|
+
</li>
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
<li class="public ">
|
|
561
|
+
<span class="summary_signature">
|
|
562
|
+
|
|
563
|
+
<a href="#pooled_mean-instance_method" title="#pooled_mean (instance method)">- (Object) <strong>pooled_mean</strong>(other_val) </a>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
</span>
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
578
|
+
|
|
579
|
+
<p>Returns the pooled mean of two data sequences.</p>
|
|
580
|
+
</div></span>
|
|
581
|
+
|
|
582
|
+
</li>
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
<li class="public ">
|
|
586
|
+
<span class="summary_signature">
|
|
587
|
+
|
|
588
|
+
<a href="#pooled_variance-instance_method" title="#pooled_variance (instance method)">- (Object) <strong>pooled_variance</strong>(other_val) </a>
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
</span>
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
603
|
+
|
|
604
|
+
<p>Returns the pooled variance of two data sequences.</p>
|
|
605
|
+
</div></span>
|
|
606
|
+
|
|
607
|
+
</li>
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
<li class="public ">
|
|
611
|
+
<span class="summary_signature">
|
|
612
|
+
|
|
613
|
+
<a href="#product-instance_method" title="#product (instance method)">- (Object) <strong>product</strong> </a>
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
</span>
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
628
|
+
|
|
629
|
+
<p>Returns the product of a data sequence, which is Prod( <a
|
|
630
|
+
href="http://i">data</a> ) .</p>
|
|
631
|
+
</div></span>
|
|
632
|
+
|
|
633
|
+
</li>
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
<li class="public ">
|
|
637
|
+
<span class="summary_signature">
|
|
638
|
+
|
|
639
|
+
<a href="#quantile-instance_method" title="#quantile (instance method)">- (Object) <strong>quantile</strong>(phi) </a>
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
</span>
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
654
|
+
|
|
655
|
+
<p>Returns the phi-quantile; that is, an element elem for which holds that phi
|
|
656
|
+
percent of data elements are less than elem.</p>
|
|
657
|
+
</div></span>
|
|
658
|
+
|
|
659
|
+
</li>
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
<li class="public ">
|
|
663
|
+
<span class="summary_signature">
|
|
664
|
+
|
|
665
|
+
<a href="#quantile_inverse-instance_method" title="#quantile_inverse (instance method)">- (Object) <strong>quantile_inverse</strong>(elmt) </a>
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
</span>
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
680
|
+
|
|
681
|
+
<p>Returns how many percent of the elements contained in the receiver are
|
|
682
|
+
<= element.</p>
|
|
683
|
+
</div></span>
|
|
684
|
+
|
|
685
|
+
</li>
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
<li class="public ">
|
|
689
|
+
<span class="summary_signature">
|
|
690
|
+
|
|
691
|
+
<a href="#quantiles-instance_method" title="#quantiles (instance method)">- (Object) <strong>quantiles</strong>(percs) </a>
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
</span>
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
706
|
+
|
|
707
|
+
<p>percentage must be in the interval [0.0,1.0].</p>
|
|
708
|
+
</div></span>
|
|
709
|
+
|
|
710
|
+
</li>
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
<li class="public ">
|
|
714
|
+
<span class="summary_signature">
|
|
715
|
+
|
|
716
|
+
<a href="#rank_interpolated-instance_method" title="#rank_interpolated (instance method)">- (Object) <strong>rank_interpolated</strong>(elmt) </a>
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
</span>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
731
|
+
|
|
732
|
+
<p>Returns the linearly interpolated number of elements in a list less or
|
|
733
|
+
equal to a given element.</p>
|
|
734
|
+
</div></span>
|
|
735
|
+
|
|
736
|
+
</li>
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
<li class="public ">
|
|
740
|
+
<span class="summary_signature">
|
|
741
|
+
|
|
742
|
+
<a href="#reset_statistics-instance_method" title="#reset_statistics (instance method)">- (Object) <strong>reset_statistics</strong> </a>
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
</span>
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
<span class="summary_desc"><div class='inline'>
|
|
757
|
+
<p>????????????????????????????.</p>
|
|
758
|
+
</div></span>
|
|
759
|
+
|
|
760
|
+
</li>
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
<li class="public ">
|
|
764
|
+
<span class="summary_signature">
|
|
765
|
+
|
|
766
|
+
<a href="#rms-instance_method" title="#rms (instance method)">- (Object) <strong>rms</strong> </a>
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
</span>
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
781
|
+
|
|
782
|
+
<p>Returns the RMS (Root-Mean-Square) of a data sequence.</p>
|
|
783
|
+
</div></span>
|
|
784
|
+
|
|
785
|
+
</li>
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
<li class="public ">
|
|
789
|
+
<span class="summary_signature">
|
|
790
|
+
|
|
791
|
+
<a href="#sample_covariance-instance_method" title="#sample_covariance (instance method)">- (Object) <strong>sample_covariance</strong>(other_val) </a>
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
</span>
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
806
|
+
|
|
807
|
+
<p>Returns the sample covariance of two data sequences.</p>
|
|
808
|
+
</div></span>
|
|
809
|
+
|
|
810
|
+
</li>
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
<li class="public ">
|
|
814
|
+
<span class="summary_signature">
|
|
815
|
+
|
|
816
|
+
<a href="#sample_kurtosis-instance_method" title="#sample_kurtosis (instance method)">- (Object) <strong>sample_kurtosis</strong> </a>
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
</span>
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
831
|
+
|
|
832
|
+
<p>Returns the sample kurtosis (aka excess) of a data sequence.</p>
|
|
833
|
+
</div></span>
|
|
834
|
+
|
|
835
|
+
</li>
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
<li class="public ">
|
|
839
|
+
<span class="summary_signature">
|
|
840
|
+
|
|
841
|
+
<a href="#sample_kurtosis_standard_error-instance_method" title="#sample_kurtosis_standard_error (instance method)">- (Object) <strong>sample_kurtosis_standard_error</strong> </a>
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
</span>
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
856
|
+
|
|
857
|
+
<p>Return the standard error of the sample kurtosis.</p>
|
|
858
|
+
</div></span>
|
|
859
|
+
|
|
860
|
+
</li>
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
<li class="public ">
|
|
864
|
+
<span class="summary_signature">
|
|
865
|
+
|
|
866
|
+
<a href="#sample_skew-instance_method" title="#sample_skew (instance method)">- (Object) <strong>sample_skew</strong> </a>
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
</span>
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
881
|
+
|
|
882
|
+
<p>Returns the sample skew of a data sequence.</p>
|
|
883
|
+
</div></span>
|
|
884
|
+
|
|
885
|
+
</li>
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
<li class="public ">
|
|
889
|
+
<span class="summary_signature">
|
|
890
|
+
|
|
891
|
+
<a href="#sample_skew_standard_error-instance_method" title="#sample_skew_standard_error (instance method)">- (Object) <strong>sample_skew_standard_error</strong> </a>
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
</span>
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
906
|
+
|
|
907
|
+
<p>Return the standard error of the sample skew.</p>
|
|
908
|
+
</div></span>
|
|
909
|
+
|
|
910
|
+
</li>
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
<li class="public ">
|
|
914
|
+
<span class="summary_signature">
|
|
915
|
+
|
|
916
|
+
<a href="#sample_standard_deviation-instance_method" title="#sample_standard_deviation (instance method)">- (Object) <strong>sample_standard_deviation</strong> </a>
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
</span>
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
931
|
+
|
|
932
|
+
<p>Returns the sample standard deviation.</p>
|
|
933
|
+
</div></span>
|
|
934
|
+
|
|
935
|
+
</li>
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
<li class="public ">
|
|
939
|
+
<span class="summary_signature">
|
|
940
|
+
|
|
941
|
+
<a href="#sample_variance-instance_method" title="#sample_variance (instance method)">- (Object) <strong>sample_variance</strong> </a>
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
</span>
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
956
|
+
|
|
957
|
+
<p>Returns the sample variance of a data sequence.</p>
|
|
958
|
+
</div></span>
|
|
959
|
+
|
|
960
|
+
</li>
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
<li class="public ">
|
|
964
|
+
<span class="summary_signature">
|
|
965
|
+
|
|
966
|
+
<a href="#sample_weighted_variance-instance_method" title="#sample_weighted_variance (instance method)">- (Object) <strong>sample_weighted_variance</strong>(weights) </a>
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
</span>
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
981
|
+
|
|
982
|
+
<p>Returns the sample weighted variance of a data sequence.</p>
|
|
983
|
+
</div></span>
|
|
984
|
+
|
|
985
|
+
</li>
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
<li class="public ">
|
|
989
|
+
<span class="summary_signature">
|
|
990
|
+
|
|
991
|
+
<a href="#skew-instance_method" title="#skew (instance method)">- (Object) <strong>skew</strong> </a>
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
</span>
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1006
|
+
|
|
1007
|
+
<p>Returns the skew of a data sequence, which is moment(data,3,mean) /
|
|
1008
|
+
standardDeviation.</p>
|
|
1009
|
+
</div></span>
|
|
1010
|
+
|
|
1011
|
+
</li>
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
<li class="public ">
|
|
1015
|
+
<span class="summary_signature">
|
|
1016
|
+
|
|
1017
|
+
<a href="#sort-instance_method" title="#sort (instance method)">- (Object) <strong>sort</strong> </a>
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
</span>
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1032
|
+
|
|
1033
|
+
<p>Returns a list with the sorted elements ????????????????????????????.</p>
|
|
1034
|
+
</div></span>
|
|
1035
|
+
|
|
1036
|
+
</li>
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
<li class="public ">
|
|
1040
|
+
<span class="summary_signature">
|
|
1041
|
+
|
|
1042
|
+
<a href="#sorted_data-instance_method" title="#sorted_data (instance method)">- (Object) <strong>sorted_data</strong> </a>
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
</span>
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
<span class="summary_desc"><div class='inline'>
|
|
1057
|
+
<p>????????????????????????????.</p>
|
|
1058
|
+
</div></span>
|
|
1059
|
+
|
|
1060
|
+
</li>
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
<li class="public ">
|
|
1064
|
+
<span class="summary_signature">
|
|
1065
|
+
|
|
1066
|
+
<a href="#split-instance_method" title="#split (instance method)">- (Object) <strong>split</strong>(splitters) </a>
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
</span>
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1081
|
+
|
|
1082
|
+
<p>Splits (partitions) a list into sublists such that each sublist contains
|
|
1083
|
+
the elements with a given range.</p>
|
|
1084
|
+
</div></span>
|
|
1085
|
+
|
|
1086
|
+
</li>
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
<li class="public ">
|
|
1090
|
+
<span class="summary_signature">
|
|
1091
|
+
|
|
1092
|
+
<a href="#standard_deviation-instance_method" title="#standard_deviation (instance method)">- (Object) <strong>standard_deviation</strong> </a>
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
</span>
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1107
|
+
|
|
1108
|
+
<p>Returns the standard deviation from a variance.</p>
|
|
1109
|
+
</div></span>
|
|
1110
|
+
|
|
1111
|
+
</li>
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
<li class="public ">
|
|
1115
|
+
<span class="summary_signature">
|
|
1116
|
+
|
|
1117
|
+
<a href="#standard_error-instance_method" title="#standard_error (instance method)">- (Object) <strong>standard_error</strong> </a>
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
</span>
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1132
|
+
|
|
1133
|
+
<p>Returns the standard error of a data sequence.</p>
|
|
1134
|
+
</div></span>
|
|
1135
|
+
|
|
1136
|
+
</li>
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
<li class="public ">
|
|
1140
|
+
<span class="summary_signature">
|
|
1141
|
+
|
|
1142
|
+
<a href="#standardize%21-instance_method" title="#standardize! (instance method)">- (Object) <strong>standardize!</strong> </a>
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
</span>
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1157
|
+
|
|
1158
|
+
<p>Modifies a data sequence to be standardized.</p>
|
|
1159
|
+
</div></span>
|
|
1160
|
+
|
|
1161
|
+
</li>
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
<li class="public ">
|
|
1165
|
+
<span class="summary_signature">
|
|
1166
|
+
|
|
1167
|
+
<a href="#sum-instance_method" title="#sum (instance method)">- (Object) <strong>sum</strong> </a>
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
</span>
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1182
|
+
|
|
1183
|
+
<p>Returns the sum of a data sequence.</p>
|
|
1184
|
+
</div></span>
|
|
1185
|
+
|
|
1186
|
+
</li>
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
<li class="public ">
|
|
1190
|
+
<span class="summary_signature">
|
|
1191
|
+
|
|
1192
|
+
<a href="#sum_of_inversions-instance_method" title="#sum_of_inversions (instance method)">- (Object) <strong>sum_of_inversions</strong>(from = 0, to = list_size-1) </a>
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
</span>
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1207
|
+
|
|
1208
|
+
<p>Returns the sum of inversions of a data sequence, which is Sum( 1.0 / <a
|
|
1209
|
+
href="http://i">data</a>).</p>
|
|
1210
|
+
</div></span>
|
|
1211
|
+
|
|
1212
|
+
</li>
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
<li class="public ">
|
|
1216
|
+
<span class="summary_signature">
|
|
1217
|
+
|
|
1218
|
+
<a href="#sum_of_logarithms-instance_method" title="#sum_of_logarithms (instance method)">- (Object) <strong>sum_of_logarithms</strong>(from = 0, to = list_size-1) </a>
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
</span>
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1233
|
+
|
|
1234
|
+
<p>Returns the sum of logarithms of a data sequence, which is Sum( <a
|
|
1235
|
+
href="http://i">Log(data</a>). ????????????????????????????.</p>
|
|
1236
|
+
</div></span>
|
|
1237
|
+
|
|
1238
|
+
</li>
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
<li class="public ">
|
|
1242
|
+
<span class="summary_signature">
|
|
1243
|
+
|
|
1244
|
+
<a href="#sum_of_power_deviations-instance_method" title="#sum_of_power_deviations (instance method)">- (Object) <strong>sum_of_power_deviations</strong>(k, c) </a>
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
</span>
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1259
|
+
|
|
1260
|
+
<p>Returns Sum( (<a href="http://i">data</a>-c)k ); optimized for common
|
|
1261
|
+
parameters like c == 0.0 and/or k == -2 ????????????????????????????.</p>
|
|
1262
|
+
</div></span>
|
|
1263
|
+
|
|
1264
|
+
</li>
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
<li class="public ">
|
|
1268
|
+
<span class="summary_signature">
|
|
1269
|
+
|
|
1270
|
+
<a href="#sum_of_powers-instance_method" title="#sum_of_powers (instance method)">- (Object) <strong>sum_of_powers</strong>(k) </a>
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
</span>
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1285
|
+
|
|
1286
|
+
<p>Returns the sum of powers of a data sequence, which is Sum ( <a
|
|
1287
|
+
href="http://i">data</a>k ).</p>
|
|
1288
|
+
</div></span>
|
|
1289
|
+
|
|
1290
|
+
</li>
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
<li class="public ">
|
|
1294
|
+
<span class="summary_signature">
|
|
1295
|
+
|
|
1296
|
+
<a href="#sum_of_squared_deviations-instance_method" title="#sum_of_squared_deviations (instance method)">- (Object) <strong>sum_of_squared_deviations</strong> </a>
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
</span>
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1311
|
+
|
|
1312
|
+
<p>Returns the sum of squared mean deviation of of a data sequence.</p>
|
|
1313
|
+
</div></span>
|
|
1314
|
+
|
|
1315
|
+
</li>
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
<li class="public ">
|
|
1319
|
+
<span class="summary_signature">
|
|
1320
|
+
|
|
1321
|
+
<a href="#sum_of_squares-instance_method" title="#sum_of_squares (instance method)">- (Object) <strong>sum_of_squares</strong> </a>
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
</span>
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1336
|
+
|
|
1337
|
+
<p>Returns the sum of squares of a data sequence.</p>
|
|
1338
|
+
</div></span>
|
|
1339
|
+
|
|
1340
|
+
</li>
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
<li class="public ">
|
|
1344
|
+
<span class="summary_signature">
|
|
1345
|
+
|
|
1346
|
+
<a href="#trimmed_mean-instance_method" title="#trimmed_mean (instance method)">- (Object) <strong>trimmed_mean</strong>(left = 0, right = 0) </a>
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
</span>
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1361
|
+
|
|
1362
|
+
<p>Returns the trimmed mean of a sorted data sequence.</p>
|
|
1363
|
+
</div></span>
|
|
1364
|
+
|
|
1365
|
+
</li>
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
<li class="public ">
|
|
1369
|
+
<span class="summary_signature">
|
|
1370
|
+
|
|
1371
|
+
<a href="#variance-instance_method" title="#variance (instance method)">- (Object) <strong>variance</strong> </a>
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
</span>
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1386
|
+
|
|
1387
|
+
<p>Returns the variance from a standard deviation.</p>
|
|
1388
|
+
</div></span>
|
|
1389
|
+
|
|
1390
|
+
</li>
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
<li class="public ">
|
|
1394
|
+
<span class="summary_signature">
|
|
1395
|
+
|
|
1396
|
+
<a href="#weighted_mean-instance_method" title="#weighted_mean (instance method)">- (Object) <strong>weighted_mean</strong>(weights) </a>
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
</span>
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1411
|
+
|
|
1412
|
+
<p>Returns the weighted mean of a data sequence.</p>
|
|
1413
|
+
</div></span>
|
|
1414
|
+
|
|
1415
|
+
</li>
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
<li class="public ">
|
|
1419
|
+
<span class="summary_signature">
|
|
1420
|
+
|
|
1421
|
+
<a href="#weighted_rms-instance_method" title="#weighted_rms (instance method)">- (Object) <strong>weighted_rms</strong>(weights) </a>
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
</span>
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1436
|
+
|
|
1437
|
+
<p>Returns the weighted RMS (Root-Mean-Square) of a data sequence.</p>
|
|
1438
|
+
</div></span>
|
|
1439
|
+
|
|
1440
|
+
</li>
|
|
1441
|
+
|
|
1442
|
+
|
|
1443
|
+
<li class="public ">
|
|
1444
|
+
<span class="summary_signature">
|
|
1445
|
+
|
|
1446
|
+
<a href="#weighted_sums-instance_method" title="#weighted_sums (instance method)">- (Object) <strong>weighted_sums</strong>(other_val, from = 0, to = list_size-1) </a>
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
</span>
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1461
|
+
|
|
1462
|
+
<p>Returns the sum of the product with another array.T hat is, Sum( <a
|
|
1463
|
+
href="http://i">data</a> * <a href="http://i">other_val</a> ) internally.</p>
|
|
1464
|
+
</div></span>
|
|
1465
|
+
|
|
1466
|
+
</li>
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
<li class="public ">
|
|
1470
|
+
<span class="summary_signature">
|
|
1471
|
+
|
|
1472
|
+
<a href="#winsorized_mean-instance_method" title="#winsorized_mean (instance method)">- (Object) <strong>winsorized_mean</strong>(left, right) </a>
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
</span>
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
<span class="summary_desc"><div class='inline'><hr style="height: 10px">
|
|
1487
|
+
|
|
1488
|
+
<p>Returns the winsorized mean of a sorted data sequence.</p>
|
|
1489
|
+
</div></span>
|
|
1490
|
+
|
|
1491
|
+
</li>
|
|
1492
|
+
|
|
1493
|
+
|
|
1494
|
+
</ul>
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
<div id="instance_method_details" class="method_details_list">
|
|
1500
|
+
<h2>Instance Method Details</h2>
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
<div class="method_details first">
|
|
1504
|
+
<h3 class="signature first" id="auto_correlation-instance_method">
|
|
1505
|
+
|
|
1506
|
+
- (<tt>Object</tt>) <strong>auto_correlation</strong>(lag)
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
</h3><div class="docstring">
|
|
1513
|
+
<div class="discussion">
|
|
1514
|
+
<hr style="height: 10px">
|
|
1515
|
+
|
|
1516
|
+
<p>Returns the auto-correlation of a data sequence.</p>
|
|
1517
|
+
<hr style="height: 10px">
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
</div>
|
|
1521
|
+
</div>
|
|
1522
|
+
<div class="tags">
|
|
1523
|
+
<p class="tag_title">Parameters:</p>
|
|
1524
|
+
<ul class="param">
|
|
1525
|
+
|
|
1526
|
+
<li>
|
|
1527
|
+
|
|
1528
|
+
<span class='name'>lag</span>
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
<span class='type'></span>
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
—
|
|
1536
|
+
<div class='inline'>
|
|
1537
|
+
<p>lag between the two measures to auto correlate</p>
|
|
1538
|
+
</div>
|
|
1539
|
+
|
|
1540
|
+
</li>
|
|
1541
|
+
|
|
1542
|
+
</ul>
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
</div><table class="source_code">
|
|
1546
|
+
<tr>
|
|
1547
|
+
<td>
|
|
1548
|
+
<pre class="lines">
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
79
|
|
1552
|
+
80
|
|
1553
|
+
81</pre>
|
|
1554
|
+
</td>
|
|
1555
|
+
<td>
|
|
1556
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 79</span>
|
|
1557
|
+
|
|
1558
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_auto_correlation identifier id'>auto_correlation</span><span class='lparen token'>(</span><span class='rubyid_lag identifier id'>lag</span><span class='rparen token'>)</span>
|
|
1559
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_autoCorrelation identifier id'>autoCorrelation</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_lag identifier id'>lag</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='comma token'>,</span> <span class='rubyid_variance identifier id'>variance</span><span class='rparen token'>)</span>
|
|
1560
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1561
|
+
</pre>
|
|
1562
|
+
</td>
|
|
1563
|
+
</tr>
|
|
1564
|
+
</table>
|
|
1565
|
+
</div>
|
|
1566
|
+
|
|
1567
|
+
<div class="method_details ">
|
|
1568
|
+
<h3 class="signature " id="correlation-instance_method">
|
|
1569
|
+
|
|
1570
|
+
- (<tt>Object</tt>) <strong>correlation</strong>(other_val)
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
</h3><div class="docstring">
|
|
1577
|
+
<div class="discussion">
|
|
1578
|
+
<hr style="height: 10px">
|
|
1579
|
+
|
|
1580
|
+
<p>Returns the correlation of two data sequences. That is
|
|
1581
|
+
covariance(data1,data2)/(standardDev1*standardDev2).</p>
|
|
1582
|
+
<hr style="height: 10px">
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
</div>
|
|
1586
|
+
</div>
|
|
1587
|
+
<div class="tags">
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
</div><table class="source_code">
|
|
1591
|
+
<tr>
|
|
1592
|
+
<td>
|
|
1593
|
+
<pre class="lines">
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
88
|
|
1597
|
+
89
|
|
1598
|
+
90</pre>
|
|
1599
|
+
</td>
|
|
1600
|
+
<td>
|
|
1601
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 88</span>
|
|
1602
|
+
|
|
1603
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_correlation identifier id'>correlation</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='rparen token'>)</span>
|
|
1604
|
+
<span class='rubyid_covariance identifier id'>covariance</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='rparen token'>)</span> <span class='div op'>/</span> <span class='lparen token'>(</span><span class='rubyid_standard_deviation identifier id'>standard_deviation</span> <span class='mult op'>*</span> <span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_standard_deviation identifier id'>standard_deviation</span><span class='rparen token'>)</span>
|
|
1605
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1606
|
+
</pre>
|
|
1607
|
+
</td>
|
|
1608
|
+
</tr>
|
|
1609
|
+
</table>
|
|
1610
|
+
</div>
|
|
1611
|
+
|
|
1612
|
+
<div class="method_details ">
|
|
1613
|
+
<h3 class="signature " id="covariance-instance_method">
|
|
1614
|
+
|
|
1615
|
+
- (<tt>Object</tt>) <strong>covariance</strong>(other_val)
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
</h3><div class="docstring">
|
|
1622
|
+
<div class="discussion">
|
|
1623
|
+
<hr style="height: 10px">
|
|
1624
|
+
|
|
1625
|
+
<p>Returns the covariance of two data sequences. That is cov(x,y) = <a
|
|
1626
|
+
href="http://i">Sum((x</a>-mean(x)) * (<a href="http://i">y</a>-mean(y))) /
|
|
1627
|
+
size().</p>
|
|
1628
|
+
<hr style="height: 10px">
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
</div>
|
|
1632
|
+
</div>
|
|
1633
|
+
<div class="tags">
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
</div><table class="source_code">
|
|
1637
|
+
<tr>
|
|
1638
|
+
<td>
|
|
1639
|
+
<pre class="lines">
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
97
|
|
1643
|
+
98
|
|
1644
|
+
99</pre>
|
|
1645
|
+
</td>
|
|
1646
|
+
<td>
|
|
1647
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 97</span>
|
|
1648
|
+
|
|
1649
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_covariance identifier id'>covariance</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='rparen token'>)</span>
|
|
1650
|
+
<span class='rubyid_sample_covariance identifier id'>sample_covariance</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='rparen token'>)</span> <span class='mult op'>*</span> <span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rparen token'>)</span> <span class='div op'>/</span> <span class='rubyid_list_size identifier id'>list_size</span>
|
|
1651
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1652
|
+
</pre>
|
|
1653
|
+
</td>
|
|
1654
|
+
</tr>
|
|
1655
|
+
</table>
|
|
1656
|
+
</div>
|
|
1657
|
+
|
|
1658
|
+
<div class="method_details ">
|
|
1659
|
+
<h3 class="signature " id="durbin_watson-instance_method">
|
|
1660
|
+
|
|
1661
|
+
- (<tt>Object</tt>) <strong>durbin_watson</strong>
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
</h3><div class="docstring">
|
|
1668
|
+
<div class="discussion">
|
|
1669
|
+
<hr style="height: 10px">
|
|
1670
|
+
|
|
1671
|
+
<p>Durbin-Watson computation.</p>
|
|
1672
|
+
<hr style="height: 10px">
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
</div>
|
|
1676
|
+
</div>
|
|
1677
|
+
<div class="tags">
|
|
1678
|
+
|
|
1679
|
+
|
|
1680
|
+
</div><table class="source_code">
|
|
1681
|
+
<tr>
|
|
1682
|
+
<td>
|
|
1683
|
+
<pre class="lines">
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
105
|
|
1687
|
+
106
|
|
1688
|
+
107</pre>
|
|
1689
|
+
</td>
|
|
1690
|
+
<td>
|
|
1691
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 105</span>
|
|
1692
|
+
|
|
1693
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_durbin_watson identifier id'>durbin_watson</span>
|
|
1694
|
+
<span class='rubyid_@durbin_watson ivar id'>@durbin_watson</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_durbinWatson identifier id'>durbinWatson</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
1695
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1696
|
+
</pre>
|
|
1697
|
+
</td>
|
|
1698
|
+
</tr>
|
|
1699
|
+
</table>
|
|
1700
|
+
</div>
|
|
1701
|
+
|
|
1702
|
+
<div class="method_details ">
|
|
1703
|
+
<h3 class="signature " id="frequencies-instance_method">
|
|
1704
|
+
|
|
1705
|
+
- (<tt>Object</tt>) <strong>frequencies</strong>
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
</h3><div class="docstring">
|
|
1712
|
+
<div class="discussion">
|
|
1713
|
+
<hr style="height: 10px">
|
|
1714
|
+
|
|
1715
|
+
<p>Computes the frequency (number of occurances, count) of each distinct value
|
|
1716
|
+
in the given sorted data.</p>
|
|
1717
|
+
<hr style="height: 10px">
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
</div>
|
|
1721
|
+
</div>
|
|
1722
|
+
<div class="tags">
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
</div><table class="source_code">
|
|
1726
|
+
<tr>
|
|
1727
|
+
<td>
|
|
1728
|
+
<pre class="lines">
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
114
|
|
1732
|
+
115
|
|
1733
|
+
116
|
|
1734
|
+
117
|
|
1735
|
+
118
|
|
1736
|
+
119
|
|
1737
|
+
120
|
|
1738
|
+
121
|
|
1739
|
+
122
|
|
1740
|
+
123
|
|
1741
|
+
124
|
|
1742
|
+
125
|
|
1743
|
+
126
|
|
1744
|
+
127
|
|
1745
|
+
128</pre>
|
|
1746
|
+
</td>
|
|
1747
|
+
<td>
|
|
1748
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 114</span>
|
|
1749
|
+
|
|
1750
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_frequencies identifier id'>frequencies</span>
|
|
1751
|
+
|
|
1752
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_@frequencies ivar id'>@frequencies</span> <span class='eq op'>==</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
|
1753
|
+
<span class='rubyid_distinct_values identifier id'>distinct_values</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
|
|
1754
|
+
<span class='rubyid_frequencies identifier id'>frequencies</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTint constant id'>CernColtListTint</span><span class='colon2 op'>::</span><span class='rubyid_IntArrayList constant id'>IntArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
|
|
1755
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_frequencies identifier id'>frequencies</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_distinct_values identifier id'>distinct_values</span><span class='comma token'>,</span> <span class='rubyid_frequencies identifier id'>frequencies</span><span class='rparen token'>)</span>
|
|
1756
|
+
<span class='rubyid_distinct_values identifier id'>distinct_values</span><span class='dot token'>.</span><span class='rubyid_trimToSize identifier id'>trimToSize</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
|
|
1757
|
+
<span class='rubyid_frequencies identifier id'>frequencies</span><span class='dot token'>.</span><span class='rubyid_trimToSize identifier id'>trimToSize</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
|
|
1758
|
+
<span class='rubyid_@distinct_values ivar id'>@distinct_values</span> <span class='assign token'>=</span> <span class='rubyid_distinct_values identifier id'>distinct_values</span><span class='dot token'>.</span><span class='rubyid_elements identifier id'>elements</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
|
|
1759
|
+
<span class='rubyid_@frequencies ivar id'>@frequencies</span> <span class='assign token'>=</span> <span class='rubyid_frequencies identifier id'>frequencies</span><span class='dot token'>.</span><span class='rubyid_elements identifier id'>elements</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
|
|
1760
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1761
|
+
|
|
1762
|
+
<span class='lbrace token'>{</span> <span class='symbol val'>:distinct_values</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_@distinct_values ivar id'>@distinct_values</span><span class='comma token'>,</span> <span class='symbol val'>:frequencies</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_@frequencies ivar id'>@frequencies</span><span class='rbrace token'>}</span>
|
|
1763
|
+
|
|
1764
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1765
|
+
</pre>
|
|
1766
|
+
</td>
|
|
1767
|
+
</tr>
|
|
1768
|
+
</table>
|
|
1769
|
+
</div>
|
|
1770
|
+
|
|
1771
|
+
<div class="method_details ">
|
|
1772
|
+
<h3 class="signature " id="geometric_mean-instance_method">
|
|
1773
|
+
|
|
1774
|
+
- (<tt>Object</tt>) <strong>geometric_mean</strong>
|
|
1775
|
+
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
</h3><div class="docstring">
|
|
1781
|
+
<div class="discussion">
|
|
1782
|
+
<hr style="height: 10px">
|
|
1783
|
+
|
|
1784
|
+
<p>Returns the geometric mean of a data sequence.</p>
|
|
1785
|
+
<hr style="height: 10px">
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
</div>
|
|
1789
|
+
</div>
|
|
1790
|
+
<div class="tags">
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
</div><table class="source_code">
|
|
1794
|
+
<tr>
|
|
1795
|
+
<td>
|
|
1796
|
+
<pre class="lines">
|
|
1797
|
+
|
|
1798
|
+
|
|
1799
|
+
134
|
|
1800
|
+
135
|
|
1801
|
+
136</pre>
|
|
1802
|
+
</td>
|
|
1803
|
+
<td>
|
|
1804
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 134</span>
|
|
1805
|
+
|
|
1806
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_geometric_mean identifier id'>geometric_mean</span>
|
|
1807
|
+
<span class='rubyid_@geometric_mean ivar id'>@geometric_mean</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_geometricMean identifier id'>geometricMean</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
1808
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1809
|
+
</pre>
|
|
1810
|
+
</td>
|
|
1811
|
+
</tr>
|
|
1812
|
+
</table>
|
|
1813
|
+
</div>
|
|
1814
|
+
|
|
1815
|
+
<div class="method_details ">
|
|
1816
|
+
<h3 class="signature " id="harmonic_mean-instance_method">
|
|
1817
|
+
|
|
1818
|
+
- (<tt>Object</tt>) <strong>harmonic_mean</strong>
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
</h3><div class="docstring">
|
|
1825
|
+
<div class="discussion">
|
|
1826
|
+
<hr style="height: 10px">
|
|
1827
|
+
|
|
1828
|
+
<p>Returns the harmonic mean of a data sequence.</p>
|
|
1829
|
+
<hr style="height: 10px">
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
</div>
|
|
1833
|
+
</div>
|
|
1834
|
+
<div class="tags">
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
</div><table class="source_code">
|
|
1838
|
+
<tr>
|
|
1839
|
+
<td>
|
|
1840
|
+
<pre class="lines">
|
|
1841
|
+
|
|
1842
|
+
|
|
1843
|
+
142
|
|
1844
|
+
143
|
|
1845
|
+
144</pre>
|
|
1846
|
+
</td>
|
|
1847
|
+
<td>
|
|
1848
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 142</span>
|
|
1849
|
+
|
|
1850
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_harmonic_mean identifier id'>harmonic_mean</span>
|
|
1851
|
+
<span class='rubyid_@harmonic_mean ivar id'>@harmonic_mean</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_harmonicMean identifier id'>harmonicMean</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_sum_of_inversions identifier id'>sum_of_inversions</span><span class='rparen token'>)</span>
|
|
1852
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1853
|
+
</pre>
|
|
1854
|
+
</td>
|
|
1855
|
+
</tr>
|
|
1856
|
+
</table>
|
|
1857
|
+
</div>
|
|
1858
|
+
|
|
1859
|
+
<div class="method_details ">
|
|
1860
|
+
<h3 class="signature " id="kurtosis-instance_method">
|
|
1861
|
+
|
|
1862
|
+
- (<tt>Object</tt>) <strong>kurtosis</strong>
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
</h3><div class="docstring">
|
|
1869
|
+
<div class="discussion">
|
|
1870
|
+
<hr style="height: 10px">
|
|
1871
|
+
|
|
1872
|
+
<p>Returns the kurtosis (aka excess) of a data sequence, which is -3 +
|
|
1873
|
+
moment(data,4,mean) / standardDeviation4.</p>
|
|
1874
|
+
<hr style="height: 10px">
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
</div>
|
|
1878
|
+
</div>
|
|
1879
|
+
<div class="tags">
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
</div><table class="source_code">
|
|
1883
|
+
<tr>
|
|
1884
|
+
<td>
|
|
1885
|
+
<pre class="lines">
|
|
1886
|
+
|
|
1887
|
+
|
|
1888
|
+
151
|
|
1889
|
+
152
|
|
1890
|
+
153
|
|
1891
|
+
154</pre>
|
|
1892
|
+
</td>
|
|
1893
|
+
<td>
|
|
1894
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 151</span>
|
|
1895
|
+
|
|
1896
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_kurtosis identifier id'>kurtosis</span>
|
|
1897
|
+
<span class='rubyid_@kurtosis ivar id'>@kurtosis</span> <span class='opasgn op'>||=</span>
|
|
1898
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_kurtosis identifier id'>kurtosis</span><span class='lparen token'>(</span><span class='rubyid_moment4 identifier id'>moment4</span><span class='comma token'>,</span> <span class='rubyid_standard_deviation identifier id'>standard_deviation</span><span class='rparen token'>)</span>
|
|
1899
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1900
|
+
</pre>
|
|
1901
|
+
</td>
|
|
1902
|
+
</tr>
|
|
1903
|
+
</table>
|
|
1904
|
+
</div>
|
|
1905
|
+
|
|
1906
|
+
<div class="method_details ">
|
|
1907
|
+
<h3 class="signature " id="lag1-instance_method">
|
|
1908
|
+
|
|
1909
|
+
- (<tt>Object</tt>) <strong>lag1</strong>
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
</h3><div class="docstring">
|
|
1916
|
+
<div class="discussion">
|
|
1917
|
+
<hr style="height: 10px">
|
|
1918
|
+
|
|
1919
|
+
<p>Returns the lag-1 autocorrelation of a dataset; Note that this method has
|
|
1920
|
+
semantics different from autoCorrelation(?, 1);</p>
|
|
1921
|
+
<hr style="height: 10px">
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
</div>
|
|
1925
|
+
</div>
|
|
1926
|
+
<div class="tags">
|
|
1927
|
+
|
|
1928
|
+
|
|
1929
|
+
</div><table class="source_code">
|
|
1930
|
+
<tr>
|
|
1931
|
+
<td>
|
|
1932
|
+
<pre class="lines">
|
|
1933
|
+
|
|
1934
|
+
|
|
1935
|
+
161
|
|
1936
|
+
162
|
|
1937
|
+
163</pre>
|
|
1938
|
+
</td>
|
|
1939
|
+
<td>
|
|
1940
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 161</span>
|
|
1941
|
+
|
|
1942
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_lag1 identifier id'>lag1</span>
|
|
1943
|
+
<span class='rubyid_@lag1 ivar id'>@lag1</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_lag1 identifier id'>lag1</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='rparen token'>)</span>
|
|
1944
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1945
|
+
</pre>
|
|
1946
|
+
</td>
|
|
1947
|
+
</tr>
|
|
1948
|
+
</table>
|
|
1949
|
+
</div>
|
|
1950
|
+
|
|
1951
|
+
<div class="method_details ">
|
|
1952
|
+
<h3 class="signature " id="list_size-instance_method">
|
|
1953
|
+
|
|
1954
|
+
- (<tt>Object</tt>) <strong>list_size</strong>
|
|
1955
|
+
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
</h3><div class="docstring">
|
|
1961
|
+
<div class="discussion">
|
|
1962
|
+
<hr style="height: 10px">
|
|
1963
|
+
<hr style="height: 10px">
|
|
1964
|
+
|
|
1965
|
+
|
|
1966
|
+
</div>
|
|
1967
|
+
</div>
|
|
1968
|
+
<div class="tags">
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
</div><table class="source_code">
|
|
1972
|
+
<tr>
|
|
1973
|
+
<td>
|
|
1974
|
+
<pre class="lines">
|
|
1975
|
+
|
|
1976
|
+
|
|
1977
|
+
169
|
|
1978
|
+
170
|
|
1979
|
+
171</pre>
|
|
1980
|
+
</td>
|
|
1981
|
+
<td>
|
|
1982
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 169</span>
|
|
1983
|
+
|
|
1984
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_list_size identifier id'>list_size</span>
|
|
1985
|
+
<span class='rubyid_@list_size ivar id'>@list_size</span> <span class='opasgn op'>||=</span> <span class='rubyid_@array_list ivar id'>@array_list</span><span class='dot token'>.</span><span class='rubyid_size identifier id'>size</span>
|
|
1986
|
+
<span class='rubyid_end end kw'>end</span>
|
|
1987
|
+
</pre>
|
|
1988
|
+
</td>
|
|
1989
|
+
</tr>
|
|
1990
|
+
</table>
|
|
1991
|
+
</div>
|
|
1992
|
+
|
|
1993
|
+
<div class="method_details ">
|
|
1994
|
+
<h3 class="signature " id="max-instance_method">
|
|
1995
|
+
|
|
1996
|
+
- (<tt>Object</tt>) <strong>max</strong>
|
|
1997
|
+
|
|
1998
|
+
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
</h3><div class="docstring">
|
|
2003
|
+
<div class="discussion">
|
|
2004
|
+
<hr style="height: 10px">
|
|
2005
|
+
|
|
2006
|
+
<p>Returns the largest member of a data sequence.</p>
|
|
2007
|
+
<hr style="height: 10px">
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
</div>
|
|
2011
|
+
</div>
|
|
2012
|
+
<div class="tags">
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
</div><table class="source_code">
|
|
2016
|
+
<tr>
|
|
2017
|
+
<td>
|
|
2018
|
+
<pre class="lines">
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
177
|
|
2022
|
+
178
|
|
2023
|
+
179</pre>
|
|
2024
|
+
</td>
|
|
2025
|
+
<td>
|
|
2026
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 177</span>
|
|
2027
|
+
|
|
2028
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_max identifier id'>max</span>
|
|
2029
|
+
<span class='rubyid_@max ivar id'>@max</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_max identifier id'>max</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
2030
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2031
|
+
</pre>
|
|
2032
|
+
</td>
|
|
2033
|
+
</tr>
|
|
2034
|
+
</table>
|
|
2035
|
+
</div>
|
|
2036
|
+
|
|
2037
|
+
<div class="method_details ">
|
|
2038
|
+
<h3 class="signature " id="mean-instance_method">
|
|
2039
|
+
|
|
2040
|
+
- (<tt>Object</tt>) <strong>mean</strong>
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
</h3><div class="docstring">
|
|
2047
|
+
<div class="discussion">
|
|
2048
|
+
<hr style="height: 10px">
|
|
2049
|
+
|
|
2050
|
+
<p>Returns the arithmetic mean of a data sequence; That is Sum( <a
|
|
2051
|
+
href="http://i">data</a> ) / data.size()</p>
|
|
2052
|
+
<hr style="height: 10px">
|
|
2053
|
+
|
|
2054
|
+
|
|
2055
|
+
</div>
|
|
2056
|
+
</div>
|
|
2057
|
+
<div class="tags">
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
</div><table class="source_code">
|
|
2061
|
+
<tr>
|
|
2062
|
+
<td>
|
|
2063
|
+
<pre class="lines">
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
185
|
|
2067
|
+
186
|
|
2068
|
+
187</pre>
|
|
2069
|
+
</td>
|
|
2070
|
+
<td>
|
|
2071
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 185</span>
|
|
2072
|
+
|
|
2073
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_mean identifier id'>mean</span>
|
|
2074
|
+
<span class='rubyid_@mean ivar id'>@mean</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_mean identifier id'>mean</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
2075
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2076
|
+
</pre>
|
|
2077
|
+
</td>
|
|
2078
|
+
</tr>
|
|
2079
|
+
</table>
|
|
2080
|
+
</div>
|
|
2081
|
+
|
|
2082
|
+
<div class="method_details ">
|
|
2083
|
+
<h3 class="signature " id="mean_deviation-instance_method">
|
|
2084
|
+
|
|
2085
|
+
- (<tt>Object</tt>) <strong>mean_deviation</strong>
|
|
2086
|
+
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
|
|
2091
|
+
</h3><div class="docstring">
|
|
2092
|
+
<div class="discussion">
|
|
2093
|
+
<hr style="height: 10px">
|
|
2094
|
+
|
|
2095
|
+
<p>Returns the mean deviation of a dataset.</p>
|
|
2096
|
+
<hr style="height: 10px">
|
|
2097
|
+
|
|
2098
|
+
|
|
2099
|
+
</div>
|
|
2100
|
+
</div>
|
|
2101
|
+
<div class="tags">
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
</div><table class="source_code">
|
|
2105
|
+
<tr>
|
|
2106
|
+
<td>
|
|
2107
|
+
<pre class="lines">
|
|
2108
|
+
|
|
2109
|
+
|
|
2110
|
+
193
|
|
2111
|
+
194
|
|
2112
|
+
195</pre>
|
|
2113
|
+
</td>
|
|
2114
|
+
<td>
|
|
2115
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 193</span>
|
|
2116
|
+
|
|
2117
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_mean_deviation identifier id'>mean_deviation</span>
|
|
2118
|
+
<span class='rubyid_@mean_deviation ivar id'>@mean_deviation</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_meanDeviation identifier id'>meanDeviation</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='rparen token'>)</span>
|
|
2119
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2120
|
+
</pre>
|
|
2121
|
+
</td>
|
|
2122
|
+
</tr>
|
|
2123
|
+
</table>
|
|
2124
|
+
</div>
|
|
2125
|
+
|
|
2126
|
+
<div class="method_details ">
|
|
2127
|
+
<h3 class="signature " id="median-instance_method">
|
|
2128
|
+
|
|
2129
|
+
- (<tt>Object</tt>) <strong>median</strong>
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
</h3><div class="docstring">
|
|
2136
|
+
<div class="discussion">
|
|
2137
|
+
<hr style="height: 10px">
|
|
2138
|
+
|
|
2139
|
+
<p>Returns the median of a sorted data sequence.</p>
|
|
2140
|
+
<hr style="height: 10px">
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
</div>
|
|
2144
|
+
</div>
|
|
2145
|
+
<div class="tags">
|
|
2146
|
+
|
|
2147
|
+
|
|
2148
|
+
</div><table class="source_code">
|
|
2149
|
+
<tr>
|
|
2150
|
+
<td>
|
|
2151
|
+
<pre class="lines">
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
201
|
|
2155
|
+
202
|
|
2156
|
+
203</pre>
|
|
2157
|
+
</td>
|
|
2158
|
+
<td>
|
|
2159
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 201</span>
|
|
2160
|
+
|
|
2161
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_median identifier id'>median</span>
|
|
2162
|
+
<span class='rubyid_@median ivar id'>@median</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_median identifier id'>median</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='rparen token'>)</span>
|
|
2163
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2164
|
+
</pre>
|
|
2165
|
+
</td>
|
|
2166
|
+
</tr>
|
|
2167
|
+
</table>
|
|
2168
|
+
</div>
|
|
2169
|
+
|
|
2170
|
+
<div class="method_details ">
|
|
2171
|
+
<h3 class="signature " id="min-instance_method">
|
|
2172
|
+
|
|
2173
|
+
- (<tt>Object</tt>) <strong>min</strong>
|
|
2174
|
+
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
</h3><div class="docstring">
|
|
2180
|
+
<div class="discussion">
|
|
2181
|
+
<hr style="height: 10px">
|
|
2182
|
+
|
|
2183
|
+
<p>Returns the smallest member of a data sequence.</p>
|
|
2184
|
+
<hr style="height: 10px">
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
</div>
|
|
2188
|
+
</div>
|
|
2189
|
+
<div class="tags">
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
</div><table class="source_code">
|
|
2193
|
+
<tr>
|
|
2194
|
+
<td>
|
|
2195
|
+
<pre class="lines">
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
209
|
|
2199
|
+
210
|
|
2200
|
+
211</pre>
|
|
2201
|
+
</td>
|
|
2202
|
+
<td>
|
|
2203
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 209</span>
|
|
2204
|
+
|
|
2205
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_min identifier id'>min</span>
|
|
2206
|
+
<span class='rubyid_@min ivar id'>@min</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_min identifier id'>min</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
2207
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2208
|
+
</pre>
|
|
2209
|
+
</td>
|
|
2210
|
+
</tr>
|
|
2211
|
+
</table>
|
|
2212
|
+
</div>
|
|
2213
|
+
|
|
2214
|
+
<div class="method_details ">
|
|
2215
|
+
<h3 class="signature " id="moment-instance_method">
|
|
2216
|
+
|
|
2217
|
+
- (<tt>Object</tt>) <strong>moment</strong>(k, c)
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
|
|
2223
|
+
</h3><div class="docstring">
|
|
2224
|
+
<div class="discussion">
|
|
2225
|
+
<hr style="height: 10px">
|
|
2226
|
+
|
|
2227
|
+
<p>Returns the moment of k-th order with constant c of a data sequence, which
|
|
2228
|
+
is Sum( (<a href="http://i">data</a>-c)k ) / data.size().</p>
|
|
2229
|
+
<hr style="height: 10px">
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
</div>
|
|
2233
|
+
</div>
|
|
2234
|
+
<div class="tags">
|
|
2235
|
+
<p class="tag_title">Parameters:</p>
|
|
2236
|
+
<ul class="param">
|
|
2237
|
+
|
|
2238
|
+
<li>
|
|
2239
|
+
|
|
2240
|
+
<span class='name'>k</span>
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
<span class='type'></span>
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
—
|
|
2248
|
+
<div class='inline'>
|
|
2249
|
+
<p>integer</p>
|
|
2250
|
+
</div>
|
|
2251
|
+
|
|
2252
|
+
</li>
|
|
2253
|
+
|
|
2254
|
+
<li>
|
|
2255
|
+
|
|
2256
|
+
<span class='name'>c</span>
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
<span class='type'></span>
|
|
2260
|
+
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
—
|
|
2264
|
+
<div class='inline'>
|
|
2265
|
+
<p>double</p>
|
|
2266
|
+
</div>
|
|
2267
|
+
|
|
2268
|
+
</li>
|
|
2269
|
+
|
|
2270
|
+
</ul>
|
|
2271
|
+
|
|
2272
|
+
|
|
2273
|
+
</div><table class="source_code">
|
|
2274
|
+
<tr>
|
|
2275
|
+
<td>
|
|
2276
|
+
<pre class="lines">
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
220
|
|
2280
|
+
221
|
|
2281
|
+
222</pre>
|
|
2282
|
+
</td>
|
|
2283
|
+
<td>
|
|
2284
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 220</span>
|
|
2285
|
+
|
|
2286
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_moment identifier id'>moment</span><span class='lparen token'>(</span><span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span> <span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
|
|
2287
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_moment identifier id'>moment</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span> <span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
|
|
2288
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2289
|
+
</pre>
|
|
2290
|
+
</td>
|
|
2291
|
+
</tr>
|
|
2292
|
+
</table>
|
|
2293
|
+
</div>
|
|
2294
|
+
|
|
2295
|
+
<div class="method_details ">
|
|
2296
|
+
<h3 class="signature " id="moment3-instance_method">
|
|
2297
|
+
|
|
2298
|
+
- (<tt>Object</tt>) <strong>moment3</strong>
|
|
2299
|
+
|
|
2300
|
+
|
|
2301
|
+
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
</h3><div class="docstring">
|
|
2305
|
+
<div class="discussion">
|
|
2306
|
+
<hr style="height: 10px">
|
|
2307
|
+
|
|
2308
|
+
<p>The third central moment. That is: moment(data,3,mean)</p>
|
|
2309
|
+
<hr style="height: 10px">
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
</div>
|
|
2313
|
+
</div>
|
|
2314
|
+
<div class="tags">
|
|
2315
|
+
|
|
2316
|
+
|
|
2317
|
+
</div><table class="source_code">
|
|
2318
|
+
<tr>
|
|
2319
|
+
<td>
|
|
2320
|
+
<pre class="lines">
|
|
2321
|
+
|
|
2322
|
+
|
|
2323
|
+
228
|
|
2324
|
+
229
|
|
2325
|
+
230</pre>
|
|
2326
|
+
</td>
|
|
2327
|
+
<td>
|
|
2328
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 228</span>
|
|
2329
|
+
|
|
2330
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_moment3 identifier id'>moment3</span>
|
|
2331
|
+
<span class='rubyid_@moment3 ivar id'>@moment3</span> <span class='opasgn op'>||=</span> <span class='rubyid_moment identifier id'>moment</span><span class='lparen token'>(</span><span class='integer val'>3</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='rparen token'>)</span>
|
|
2332
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2333
|
+
</pre>
|
|
2334
|
+
</td>
|
|
2335
|
+
</tr>
|
|
2336
|
+
</table>
|
|
2337
|
+
</div>
|
|
2338
|
+
|
|
2339
|
+
<div class="method_details ">
|
|
2340
|
+
<h3 class="signature " id="moment4-instance_method">
|
|
2341
|
+
|
|
2342
|
+
- (<tt>Object</tt>) <strong>moment4</strong>
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
</h3><div class="docstring">
|
|
2349
|
+
<div class="discussion">
|
|
2350
|
+
<hr style="height: 10px">
|
|
2351
|
+
<hr style="height: 10px">
|
|
2352
|
+
|
|
2353
|
+
|
|
2354
|
+
</div>
|
|
2355
|
+
</div>
|
|
2356
|
+
<div class="tags">
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
</div><table class="source_code">
|
|
2360
|
+
<tr>
|
|
2361
|
+
<td>
|
|
2362
|
+
<pre class="lines">
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
236
|
|
2366
|
+
237
|
|
2367
|
+
238</pre>
|
|
2368
|
+
</td>
|
|
2369
|
+
<td>
|
|
2370
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 236</span>
|
|
2371
|
+
|
|
2372
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_moment4 identifier id'>moment4</span>
|
|
2373
|
+
<span class='rubyid_@moment4 ivar id'>@moment4</span> <span class='opasgn op'>||=</span> <span class='rubyid_moment identifier id'>moment</span><span class='lparen token'>(</span><span class='integer val'>4</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='rparen token'>)</span>
|
|
2374
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2375
|
+
</pre>
|
|
2376
|
+
</td>
|
|
2377
|
+
</tr>
|
|
2378
|
+
</table>
|
|
2379
|
+
</div>
|
|
2380
|
+
|
|
2381
|
+
<div class="method_details ">
|
|
2382
|
+
<h3 class="signature " id="pooled_mean-instance_method">
|
|
2383
|
+
|
|
2384
|
+
- (<tt>Object</tt>) <strong>pooled_mean</strong>(other_val)
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
</h3><div class="docstring">
|
|
2391
|
+
<div class="discussion">
|
|
2392
|
+
<hr style="height: 10px">
|
|
2393
|
+
|
|
2394
|
+
<p>Returns the pooled mean of two data sequences. That is (size1 * mean1 +
|
|
2395
|
+
size2 * mean2) / (size1 + size2).</p>
|
|
2396
|
+
<hr style="height: 10px">
|
|
2397
|
+
|
|
2398
|
+
|
|
2399
|
+
</div>
|
|
2400
|
+
</div>
|
|
2401
|
+
<div class="tags">
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
</div><table class="source_code">
|
|
2405
|
+
<tr>
|
|
2406
|
+
<td>
|
|
2407
|
+
<pre class="lines">
|
|
2408
|
+
|
|
2409
|
+
|
|
2410
|
+
245
|
|
2411
|
+
246
|
|
2412
|
+
247
|
|
2413
|
+
248</pre>
|
|
2414
|
+
</td>
|
|
2415
|
+
<td>
|
|
2416
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 245</span>
|
|
2417
|
+
|
|
2418
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_pooled_mean identifier id'>pooled_mean</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='rparen token'>)</span>
|
|
2419
|
+
<span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_reset_statistics identifier id'>reset_statistics</span>
|
|
2420
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_pooledMean identifier id'>pooledMean</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='comma token'>,</span> <span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_mean identifier id'>mean</span><span class='rparen token'>)</span>
|
|
2421
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2422
|
+
</pre>
|
|
2423
|
+
</td>
|
|
2424
|
+
</tr>
|
|
2425
|
+
</table>
|
|
2426
|
+
</div>
|
|
2427
|
+
|
|
2428
|
+
<div class="method_details ">
|
|
2429
|
+
<h3 class="signature " id="pooled_variance-instance_method">
|
|
2430
|
+
|
|
2431
|
+
- (<tt>Object</tt>) <strong>pooled_variance</strong>(other_val)
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
</h3><div class="docstring">
|
|
2438
|
+
<div class="discussion">
|
|
2439
|
+
<hr style="height: 10px">
|
|
2440
|
+
|
|
2441
|
+
<p>Returns the pooled variance of two data sequences. That is: size1 *
|
|
2442
|
+
variance1 + size2 * variance2) / (size1 + size2)</p>
|
|
2443
|
+
<hr style="height: 10px">
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
</div>
|
|
2447
|
+
</div>
|
|
2448
|
+
<div class="tags">
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
</div><table class="source_code">
|
|
2452
|
+
<tr>
|
|
2453
|
+
<td>
|
|
2454
|
+
<pre class="lines">
|
|
2455
|
+
|
|
2456
|
+
|
|
2457
|
+
255
|
|
2458
|
+
256
|
|
2459
|
+
257
|
|
2460
|
+
258
|
|
2461
|
+
259</pre>
|
|
2462
|
+
</td>
|
|
2463
|
+
<td>
|
|
2464
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 255</span>
|
|
2465
|
+
|
|
2466
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_pooled_variance identifier id'>pooled_variance</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='rparen token'>)</span>
|
|
2467
|
+
<span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_reset_statistics identifier id'>reset_statistics</span>
|
|
2468
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_pooledVariance identifier id'>pooledVariance</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_variance identifier id'>variance</span><span class='comma token'>,</span> <span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span>
|
|
2469
|
+
<span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_variance identifier id'>variance</span><span class='rparen token'>)</span>
|
|
2470
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2471
|
+
</pre>
|
|
2472
|
+
</td>
|
|
2473
|
+
</tr>
|
|
2474
|
+
</table>
|
|
2475
|
+
</div>
|
|
2476
|
+
|
|
2477
|
+
<div class="method_details ">
|
|
2478
|
+
<h3 class="signature " id="product-instance_method">
|
|
2479
|
+
|
|
2480
|
+
- (<tt>Object</tt>) <strong>product</strong>
|
|
2481
|
+
|
|
2482
|
+
|
|
2483
|
+
|
|
2484
|
+
|
|
2485
|
+
|
|
2486
|
+
</h3><div class="docstring">
|
|
2487
|
+
<div class="discussion">
|
|
2488
|
+
<hr style="height: 10px">
|
|
2489
|
+
|
|
2490
|
+
<p>Returns the product of a data sequence, which is Prod( <a
|
|
2491
|
+
href="http://i">data</a> ) .</p>
|
|
2492
|
+
<hr style="height: 10px">
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
</div>
|
|
2496
|
+
</div>
|
|
2497
|
+
<div class="tags">
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
</div><table class="source_code">
|
|
2501
|
+
<tr>
|
|
2502
|
+
<td>
|
|
2503
|
+
<pre class="lines">
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
265
|
|
2507
|
+
266
|
|
2508
|
+
267</pre>
|
|
2509
|
+
</td>
|
|
2510
|
+
<td>
|
|
2511
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 265</span>
|
|
2512
|
+
|
|
2513
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_product identifier id'>product</span>
|
|
2514
|
+
<span class='rubyid_@product ivar id'>@product</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_product identifier id'>product</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
2515
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2516
|
+
</pre>
|
|
2517
|
+
</td>
|
|
2518
|
+
</tr>
|
|
2519
|
+
</table>
|
|
2520
|
+
</div>
|
|
2521
|
+
|
|
2522
|
+
<div class="method_details ">
|
|
2523
|
+
<h3 class="signature " id="quantile-instance_method">
|
|
2524
|
+
|
|
2525
|
+
- (<tt>Object</tt>) <strong>quantile</strong>(phi)
|
|
2526
|
+
|
|
2527
|
+
|
|
2528
|
+
|
|
2529
|
+
|
|
2530
|
+
|
|
2531
|
+
</h3><div class="docstring">
|
|
2532
|
+
<div class="discussion">
|
|
2533
|
+
<hr style="height: 10px">
|
|
2534
|
+
|
|
2535
|
+
<p>Returns the phi-quantile; that is, an element elem for which holds that phi
|
|
2536
|
+
percent of data elements are less than elem.</p>
|
|
2537
|
+
<hr style="height: 10px">
|
|
2538
|
+
|
|
2539
|
+
|
|
2540
|
+
</div>
|
|
2541
|
+
</div>
|
|
2542
|
+
<div class="tags">
|
|
2543
|
+
<p class="tag_title">Parameters:</p>
|
|
2544
|
+
<ul class="param">
|
|
2545
|
+
|
|
2546
|
+
<li>
|
|
2547
|
+
|
|
2548
|
+
<span class='name'>phi</span>
|
|
2549
|
+
|
|
2550
|
+
|
|
2551
|
+
<span class='type'></span>
|
|
2552
|
+
|
|
2553
|
+
|
|
2554
|
+
|
|
2555
|
+
—
|
|
2556
|
+
<div class='inline'>
|
|
2557
|
+
<p>double</p>
|
|
2558
|
+
</div>
|
|
2559
|
+
|
|
2560
|
+
</li>
|
|
2561
|
+
|
|
2562
|
+
</ul>
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
</div><table class="source_code">
|
|
2566
|
+
<tr>
|
|
2567
|
+
<td>
|
|
2568
|
+
<pre class="lines">
|
|
2569
|
+
|
|
2570
|
+
|
|
2571
|
+
275
|
|
2572
|
+
276
|
|
2573
|
+
277</pre>
|
|
2574
|
+
</td>
|
|
2575
|
+
<td>
|
|
2576
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 275</span>
|
|
2577
|
+
|
|
2578
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_quantile identifier id'>quantile</span><span class='lparen token'>(</span><span class='rubyid_phi identifier id'>phi</span><span class='rparen token'>)</span>
|
|
2579
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_quantile identifier id'>quantile</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_phi identifier id'>phi</span><span class='rparen token'>)</span>
|
|
2580
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2581
|
+
</pre>
|
|
2582
|
+
</td>
|
|
2583
|
+
</tr>
|
|
2584
|
+
</table>
|
|
2585
|
+
</div>
|
|
2586
|
+
|
|
2587
|
+
<div class="method_details ">
|
|
2588
|
+
<h3 class="signature " id="quantile_inverse-instance_method">
|
|
2589
|
+
|
|
2590
|
+
- (<tt>Object</tt>) <strong>quantile_inverse</strong>(elmt)
|
|
2591
|
+
|
|
2592
|
+
|
|
2593
|
+
|
|
2594
|
+
|
|
2595
|
+
|
|
2596
|
+
</h3><div class="docstring">
|
|
2597
|
+
<div class="discussion">
|
|
2598
|
+
<hr style="height: 10px">
|
|
2599
|
+
|
|
2600
|
+
<p>Returns how many percent of the elements contained in the receiver are
|
|
2601
|
+
<= element.</p>
|
|
2602
|
+
<hr style="height: 10px">
|
|
2603
|
+
|
|
2604
|
+
|
|
2605
|
+
</div>
|
|
2606
|
+
</div>
|
|
2607
|
+
<div class="tags">
|
|
2608
|
+
<p class="tag_title">Parameters:</p>
|
|
2609
|
+
<ul class="param">
|
|
2610
|
+
|
|
2611
|
+
<li>
|
|
2612
|
+
|
|
2613
|
+
<span class='name'>elmt</span>
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
<span class='type'></span>
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
—
|
|
2621
|
+
<div class='inline'>
|
|
2622
|
+
<p>double</p>
|
|
2623
|
+
</div>
|
|
2624
|
+
|
|
2625
|
+
</li>
|
|
2626
|
+
|
|
2627
|
+
</ul>
|
|
2628
|
+
|
|
2629
|
+
|
|
2630
|
+
</div><table class="source_code">
|
|
2631
|
+
<tr>
|
|
2632
|
+
<td>
|
|
2633
|
+
<pre class="lines">
|
|
2634
|
+
|
|
2635
|
+
|
|
2636
|
+
284
|
|
2637
|
+
285
|
|
2638
|
+
286</pre>
|
|
2639
|
+
</td>
|
|
2640
|
+
<td>
|
|
2641
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 284</span>
|
|
2642
|
+
|
|
2643
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_quantile_inverse identifier id'>quantile_inverse</span><span class='lparen token'>(</span><span class='rubyid_elmt identifier id'>elmt</span><span class='rparen token'>)</span>
|
|
2644
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_quantileInverse identifier id'>quantileInverse</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_elmt identifier id'>elmt</span><span class='rparen token'>)</span>
|
|
2645
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2646
|
+
</pre>
|
|
2647
|
+
</td>
|
|
2648
|
+
</tr>
|
|
2649
|
+
</table>
|
|
2650
|
+
</div>
|
|
2651
|
+
|
|
2652
|
+
<div class="method_details ">
|
|
2653
|
+
<h3 class="signature " id="quantiles-instance_method">
|
|
2654
|
+
|
|
2655
|
+
- (<tt>Object</tt>) <strong>quantiles</strong>(percs)
|
|
2656
|
+
|
|
2657
|
+
|
|
2658
|
+
|
|
2659
|
+
|
|
2660
|
+
|
|
2661
|
+
</h3><div class="docstring">
|
|
2662
|
+
<div class="discussion">
|
|
2663
|
+
<hr style="height: 10px">
|
|
2664
|
+
|
|
2665
|
+
<p>percentage must be in the interval [0.0,1.0].</p>
|
|
2666
|
+
<hr style="height: 10px">
|
|
2667
|
+
|
|
2668
|
+
|
|
2669
|
+
</div>
|
|
2670
|
+
</div>
|
|
2671
|
+
<div class="tags">
|
|
2672
|
+
<p class="tag_title">Parameters:</p>
|
|
2673
|
+
<ul class="param">
|
|
2674
|
+
|
|
2675
|
+
<li>
|
|
2676
|
+
|
|
2677
|
+
<span class='name'>percentages</span>
|
|
2678
|
+
|
|
2679
|
+
|
|
2680
|
+
<span class='type'></span>
|
|
2681
|
+
|
|
2682
|
+
|
|
2683
|
+
|
|
2684
|
+
—
|
|
2685
|
+
<div class='inline'>
|
|
2686
|
+
<p>the percentages for which quantiles are to be computed. Each</p>
|
|
2687
|
+
</div>
|
|
2688
|
+
|
|
2689
|
+
</li>
|
|
2690
|
+
|
|
2691
|
+
</ul>
|
|
2692
|
+
|
|
2693
|
+
|
|
2694
|
+
</div><table class="source_code">
|
|
2695
|
+
<tr>
|
|
2696
|
+
<td>
|
|
2697
|
+
<pre class="lines">
|
|
2698
|
+
|
|
2699
|
+
|
|
2700
|
+
293
|
|
2701
|
+
294
|
|
2702
|
+
295
|
|
2703
|
+
296
|
|
2704
|
+
297
|
|
2705
|
+
298
|
|
2706
|
+
299</pre>
|
|
2707
|
+
</td>
|
|
2708
|
+
<td>
|
|
2709
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 293</span>
|
|
2710
|
+
|
|
2711
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_quantiles identifier id'>quantiles</span><span class='lparen token'>(</span><span class='rubyid_percs identifier id'>percs</span><span class='rparen token'>)</span>
|
|
2712
|
+
|
|
2713
|
+
<span class='rubyid_percs identifier id'>percs</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_percs identifier id'>percs</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span><span class='lparen token'>(</span><span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_double identifier id'>double</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
|
2714
|
+
<span class='rubyid_res identifier id'>res</span> <span class='assign token'>=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_quantiles identifier id'>quantiles</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_percs identifier id'>percs</span><span class='rparen token'>)</span>
|
|
2715
|
+
<span class='rubyid_res identifier id'>res</span><span class='dot token'>.</span><span class='rubyid_elements identifier id'>elements</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
|
|
2716
|
+
|
|
2717
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2718
|
+
</pre>
|
|
2719
|
+
</td>
|
|
2720
|
+
</tr>
|
|
2721
|
+
</table>
|
|
2722
|
+
</div>
|
|
2723
|
+
|
|
2724
|
+
<div class="method_details ">
|
|
2725
|
+
<h3 class="signature " id="rank_interpolated-instance_method">
|
|
2726
|
+
|
|
2727
|
+
- (<tt>Object</tt>) <strong>rank_interpolated</strong>(elmt)
|
|
2728
|
+
|
|
2729
|
+
|
|
2730
|
+
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
</h3><div class="docstring">
|
|
2734
|
+
<div class="discussion">
|
|
2735
|
+
<hr style="height: 10px">
|
|
2736
|
+
|
|
2737
|
+
<p>Returns the linearly interpolated number of elements in a list less or
|
|
2738
|
+
equal to a given element. The rank is the number of elements <=
|
|
2739
|
+
element. Ranks are of the form 1, 2,?, sortedList.size(). If no
|
|
2740
|
+
element is <= element, then the rank is zero. If the element lies in
|
|
2741
|
+
between two contained elements, then linear interpolation is used and a
|
|
2742
|
+
non integer value is returned.</p>
|
|
2743
|
+
<hr style="height: 10px">
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
</div>
|
|
2747
|
+
</div>
|
|
2748
|
+
<div class="tags">
|
|
2749
|
+
<p class="tag_title">Parameters:</p>
|
|
2750
|
+
<ul class="param">
|
|
2751
|
+
|
|
2752
|
+
<li>
|
|
2753
|
+
|
|
2754
|
+
<span class='name'>elmt</span>
|
|
2755
|
+
|
|
2756
|
+
|
|
2757
|
+
<span class='type'></span>
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
|
|
2761
|
+
—
|
|
2762
|
+
<div class='inline'>
|
|
2763
|
+
<p>double</p>
|
|
2764
|
+
</div>
|
|
2765
|
+
|
|
2766
|
+
</li>
|
|
2767
|
+
|
|
2768
|
+
</ul>
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
</div><table class="source_code">
|
|
2772
|
+
<tr>
|
|
2773
|
+
<td>
|
|
2774
|
+
<pre class="lines">
|
|
2775
|
+
|
|
2776
|
+
|
|
2777
|
+
310
|
|
2778
|
+
311
|
|
2779
|
+
312</pre>
|
|
2780
|
+
</td>
|
|
2781
|
+
<td>
|
|
2782
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 310</span>
|
|
2783
|
+
|
|
2784
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_rank_interpolated identifier id'>rank_interpolated</span><span class='lparen token'>(</span><span class='rubyid_elmt identifier id'>elmt</span><span class='rparen token'>)</span>
|
|
2785
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_rankInterpolated identifier id'>rankInterpolated</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_elmt identifier id'>elmt</span><span class='rparen token'>)</span>
|
|
2786
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2787
|
+
</pre>
|
|
2788
|
+
</td>
|
|
2789
|
+
</tr>
|
|
2790
|
+
</table>
|
|
2791
|
+
</div>
|
|
2792
|
+
|
|
2793
|
+
<div class="method_details ">
|
|
2794
|
+
<h3 class="signature " id="reset_statistics-instance_method">
|
|
2795
|
+
|
|
2796
|
+
- (<tt>Object</tt>) <strong>reset_statistics</strong>
|
|
2797
|
+
|
|
2798
|
+
|
|
2799
|
+
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
</h3><div class="docstring">
|
|
2803
|
+
<div class="discussion">
|
|
2804
|
+
<hr style="height: 10px">
|
|
2805
|
+
<hr style="height: 10px">
|
|
2806
|
+
|
|
2807
|
+
|
|
2808
|
+
</div>
|
|
2809
|
+
</div>
|
|
2810
|
+
<div class="tags">
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
</div><table class="source_code">
|
|
2814
|
+
<tr>
|
|
2815
|
+
<td>
|
|
2816
|
+
<pre class="lines">
|
|
2817
|
+
|
|
2818
|
+
|
|
2819
|
+
36
|
|
2820
|
+
37
|
|
2821
|
+
38
|
|
2822
|
+
39
|
|
2823
|
+
40
|
|
2824
|
+
41
|
|
2825
|
+
42
|
|
2826
|
+
43
|
|
2827
|
+
44
|
|
2828
|
+
45
|
|
2829
|
+
46
|
|
2830
|
+
47
|
|
2831
|
+
48
|
|
2832
|
+
49
|
|
2833
|
+
50
|
|
2834
|
+
51
|
|
2835
|
+
52
|
|
2836
|
+
53
|
|
2837
|
+
54
|
|
2838
|
+
55
|
|
2839
|
+
56
|
|
2840
|
+
57
|
|
2841
|
+
58
|
|
2842
|
+
59
|
|
2843
|
+
60
|
|
2844
|
+
61
|
|
2845
|
+
62
|
|
2846
|
+
63
|
|
2847
|
+
64
|
|
2848
|
+
65
|
|
2849
|
+
66
|
|
2850
|
+
67
|
|
2851
|
+
68
|
|
2852
|
+
69
|
|
2853
|
+
70
|
|
2854
|
+
71
|
|
2855
|
+
72</pre>
|
|
2856
|
+
</td>
|
|
2857
|
+
<td>
|
|
2858
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 36</span>
|
|
2859
|
+
|
|
2860
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_reset_statistics identifier id'>reset_statistics</span>
|
|
2861
|
+
|
|
2862
|
+
<span class='rubyid_@distinct_values ivar id'>@distinct_values</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2863
|
+
<span class='rubyid_@durbin_watson ivar id'>@durbin_watson</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2864
|
+
<span class='rubyid_@frequencies ivar id'>@frequencies</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2865
|
+
<span class='rubyid_@geometric_mean ivar id'>@geometric_mean</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2866
|
+
<span class='rubyid_@kurtosis ivar id'>@kurtosis</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2867
|
+
<span class='rubyid_@lag1 ivar id'>@lag1</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2868
|
+
<span class='rubyid_@max ivar id'>@max</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2869
|
+
<span class='rubyid_@mean ivar id'>@mean</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2870
|
+
<span class='rubyid_@mean_deviation ivar id'>@mean_deviation</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2871
|
+
<span class='rubyid_@median ivar id'>@median</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2872
|
+
<span class='rubyid_@min ivar id'>@min</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2873
|
+
<span class='rubyid_@moment3 ivar id'>@moment3</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2874
|
+
<span class='rubyid_@moment4 ivar id'>@moment4</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2875
|
+
<span class='rubyid_@product ivar id'>@product</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2876
|
+
<span class='rubyid_@sample_kurtosis ivar id'>@sample_kurtosis</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2877
|
+
<span class='rubyid_@sample_kurtosis_standard_error ivar id'>@sample_kurtosis_standard_error</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2878
|
+
<span class='rubyid_@sample_skew ivar id'>@sample_skew</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2879
|
+
<span class='rubyid_@sample_skew_standard_error ivar id'>@sample_skew_standard_error</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2880
|
+
<span class='rubyid_@sample_standard_deviation ivar id'>@sample_standard_deviation</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2881
|
+
<span class='rubyid_@sample_variance ivar id'>@sample_variance</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2882
|
+
<span class='rubyid_@sample_weighted_variance ivar id'>@sample_weighted_variance</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2883
|
+
<span class='rubyid_@list_size ivar id'>@list_size</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2884
|
+
<span class='rubyid_@skew ivar id'>@skew</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2885
|
+
<span class='rubyid_@sorted_data ivar id'>@sorted_data</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2886
|
+
<span class='rubyid_@standard_deviation ivar id'>@standard_deviation</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2887
|
+
<span class='rubyid_@standard_error ivar id'>@standard_error</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2888
|
+
<span class='rubyid_@sum ivar id'>@sum</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2889
|
+
<span class='rubyid_@sum_of_inversions ivar id'>@sum_of_inversions</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2890
|
+
<span class='rubyid_@sum_of_logarithms ivar id'>@sum_of_logarithms</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2891
|
+
<span class='rubyid_@sum_of_squared_deviations ivar id'>@sum_of_squared_deviations</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2892
|
+
<span class='rubyid_@sum_of_squares ivar id'>@sum_of_squares</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2893
|
+
<span class='rubyid_@variance ivar id'>@variance</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2894
|
+
<span class='rubyid_@weighted_rms ivar id'>@weighted_rms</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
|
2895
|
+
|
|
2896
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2897
|
+
</pre>
|
|
2898
|
+
</td>
|
|
2899
|
+
</tr>
|
|
2900
|
+
</table>
|
|
2901
|
+
</div>
|
|
2902
|
+
|
|
2903
|
+
<div class="method_details ">
|
|
2904
|
+
<h3 class="signature " id="rms-instance_method">
|
|
2905
|
+
|
|
2906
|
+
- (<tt>Object</tt>) <strong>rms</strong>
|
|
2907
|
+
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
</h3><div class="docstring">
|
|
2913
|
+
<div class="discussion">
|
|
2914
|
+
<hr style="height: 10px">
|
|
2915
|
+
|
|
2916
|
+
<p>Returns the RMS (Root-Mean-Square) of a data sequence.</p>
|
|
2917
|
+
<hr style="height: 10px">
|
|
2918
|
+
|
|
2919
|
+
|
|
2920
|
+
</div>
|
|
2921
|
+
</div>
|
|
2922
|
+
<div class="tags">
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
</div><table class="source_code">
|
|
2926
|
+
<tr>
|
|
2927
|
+
<td>
|
|
2928
|
+
<pre class="lines">
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
318
|
|
2932
|
+
319
|
|
2933
|
+
320</pre>
|
|
2934
|
+
</td>
|
|
2935
|
+
<td>
|
|
2936
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 318</span>
|
|
2937
|
+
|
|
2938
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_rms identifier id'>rms</span>
|
|
2939
|
+
<span class='rubyid_@rms ivar id'>@rms</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_rms identifier id'>rms</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_sum_of_squares identifier id'>sum_of_squares</span><span class='rparen token'>)</span>
|
|
2940
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2941
|
+
</pre>
|
|
2942
|
+
</td>
|
|
2943
|
+
</tr>
|
|
2944
|
+
</table>
|
|
2945
|
+
</div>
|
|
2946
|
+
|
|
2947
|
+
<div class="method_details ">
|
|
2948
|
+
<h3 class="signature " id="sample_covariance-instance_method">
|
|
2949
|
+
|
|
2950
|
+
- (<tt>Object</tt>) <strong>sample_covariance</strong>(other_val)
|
|
2951
|
+
|
|
2952
|
+
|
|
2953
|
+
|
|
2954
|
+
|
|
2955
|
+
|
|
2956
|
+
</h3><div class="docstring">
|
|
2957
|
+
<div class="discussion">
|
|
2958
|
+
<hr style="height: 10px">
|
|
2959
|
+
|
|
2960
|
+
<p>Returns the sample covariance of two data sequences. That is cov(x,y) =
|
|
2961
|
+
(1/(size()-1)) * <a href="http://i">Sum((x</a>-mean(x)) * (<a
|
|
2962
|
+
href="http://i">y</a>-mean(y))) .</p>
|
|
2963
|
+
<hr style="height: 10px">
|
|
2964
|
+
|
|
2965
|
+
|
|
2966
|
+
</div>
|
|
2967
|
+
</div>
|
|
2968
|
+
<div class="tags">
|
|
2969
|
+
|
|
2970
|
+
|
|
2971
|
+
</div><table class="source_code">
|
|
2972
|
+
<tr>
|
|
2973
|
+
<td>
|
|
2974
|
+
<pre class="lines">
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
327
|
|
2978
|
+
328
|
|
2979
|
+
329
|
|
2980
|
+
330</pre>
|
|
2981
|
+
</td>
|
|
2982
|
+
<td>
|
|
2983
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 327</span>
|
|
2984
|
+
|
|
2985
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_covariance identifier id'>sample_covariance</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='rparen token'>)</span>
|
|
2986
|
+
<span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_reset_statistics identifier id'>reset_statistics</span>
|
|
2987
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_covariance identifier id'>covariance</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_array_list identifier id'>array_list</span><span class='rparen token'>)</span>
|
|
2988
|
+
<span class='rubyid_end end kw'>end</span>
|
|
2989
|
+
</pre>
|
|
2990
|
+
</td>
|
|
2991
|
+
</tr>
|
|
2992
|
+
</table>
|
|
2993
|
+
</div>
|
|
2994
|
+
|
|
2995
|
+
<div class="method_details ">
|
|
2996
|
+
<h3 class="signature " id="sample_kurtosis-instance_method">
|
|
2997
|
+
|
|
2998
|
+
- (<tt>Object</tt>) <strong>sample_kurtosis</strong>
|
|
2999
|
+
|
|
3000
|
+
|
|
3001
|
+
|
|
3002
|
+
|
|
3003
|
+
|
|
3004
|
+
</h3><div class="docstring">
|
|
3005
|
+
<div class="discussion">
|
|
3006
|
+
<hr style="height: 10px">
|
|
3007
|
+
|
|
3008
|
+
<p>Returns the sample kurtosis (aka excess) of a data sequence.</p>
|
|
3009
|
+
<hr style="height: 10px">
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
</div>
|
|
3013
|
+
</div>
|
|
3014
|
+
<div class="tags">
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
</div><table class="source_code">
|
|
3018
|
+
<tr>
|
|
3019
|
+
<td>
|
|
3020
|
+
<pre class="lines">
|
|
3021
|
+
|
|
3022
|
+
|
|
3023
|
+
336
|
|
3024
|
+
337
|
|
3025
|
+
338
|
|
3026
|
+
339</pre>
|
|
3027
|
+
</td>
|
|
3028
|
+
<td>
|
|
3029
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 336</span>
|
|
3030
|
+
|
|
3031
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_kurtosis identifier id'>sample_kurtosis</span>
|
|
3032
|
+
<span class='rubyid_@sample_kurtosis ivar id'>@sample_kurtosis</span> <span class='opasgn op'>||=</span>
|
|
3033
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sampleKurtosis identifier id'>sampleKurtosis</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_moment4 identifier id'>moment4</span><span class='comma token'>,</span> <span class='rubyid_sample_variance identifier id'>sample_variance</span><span class='rparen token'>)</span>
|
|
3034
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3035
|
+
</pre>
|
|
3036
|
+
</td>
|
|
3037
|
+
</tr>
|
|
3038
|
+
</table>
|
|
3039
|
+
</div>
|
|
3040
|
+
|
|
3041
|
+
<div class="method_details ">
|
|
3042
|
+
<h3 class="signature " id="sample_kurtosis_standard_error-instance_method">
|
|
3043
|
+
|
|
3044
|
+
- (<tt>Object</tt>) <strong>sample_kurtosis_standard_error</strong>
|
|
3045
|
+
|
|
3046
|
+
|
|
3047
|
+
|
|
3048
|
+
|
|
3049
|
+
|
|
3050
|
+
</h3><div class="docstring">
|
|
3051
|
+
<div class="discussion">
|
|
3052
|
+
<hr style="height: 10px">
|
|
3053
|
+
|
|
3054
|
+
<p>Return the standard error of the sample kurtosis. Ref: R.R. Sokal, F.J.
|
|
3055
|
+
Rohlf, Biometry: the principles and practice of statistics in biological
|
|
3056
|
+
research (W.H. Freeman and Company, New York, 1998, 3rd edition) p. 138.</p>
|
|
3057
|
+
<hr style="height: 10px">
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
</div>
|
|
3061
|
+
</div>
|
|
3062
|
+
<div class="tags">
|
|
3063
|
+
|
|
3064
|
+
|
|
3065
|
+
</div><table class="source_code">
|
|
3066
|
+
<tr>
|
|
3067
|
+
<td>
|
|
3068
|
+
<pre class="lines">
|
|
3069
|
+
|
|
3070
|
+
|
|
3071
|
+
347
|
|
3072
|
+
348
|
|
3073
|
+
349
|
|
3074
|
+
350</pre>
|
|
3075
|
+
</td>
|
|
3076
|
+
<td>
|
|
3077
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 347</span>
|
|
3078
|
+
|
|
3079
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_kurtosis_standard_error identifier id'>sample_kurtosis_standard_error</span>
|
|
3080
|
+
<span class='rubyid_@sample_kurtosis_standard_error ivar id'>@sample_kurtosis_standard_error</span> <span class='opasgn op'>||=</span>
|
|
3081
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sampleKurtosisStandardError identifier id'>sampleKurtosisStandardError</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='rparen token'>)</span>
|
|
3082
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3083
|
+
</pre>
|
|
3084
|
+
</td>
|
|
3085
|
+
</tr>
|
|
3086
|
+
</table>
|
|
3087
|
+
</div>
|
|
3088
|
+
|
|
3089
|
+
<div class="method_details ">
|
|
3090
|
+
<h3 class="signature " id="sample_skew-instance_method">
|
|
3091
|
+
|
|
3092
|
+
- (<tt>Object</tt>) <strong>sample_skew</strong>
|
|
3093
|
+
|
|
3094
|
+
|
|
3095
|
+
|
|
3096
|
+
|
|
3097
|
+
|
|
3098
|
+
</h3><div class="docstring">
|
|
3099
|
+
<div class="discussion">
|
|
3100
|
+
<hr style="height: 10px">
|
|
3101
|
+
|
|
3102
|
+
<p>Returns the sample skew of a data sequence.</p>
|
|
3103
|
+
<hr style="height: 10px">
|
|
3104
|
+
|
|
3105
|
+
|
|
3106
|
+
</div>
|
|
3107
|
+
</div>
|
|
3108
|
+
<div class="tags">
|
|
3109
|
+
|
|
3110
|
+
|
|
3111
|
+
</div><table class="source_code">
|
|
3112
|
+
<tr>
|
|
3113
|
+
<td>
|
|
3114
|
+
<pre class="lines">
|
|
3115
|
+
|
|
3116
|
+
|
|
3117
|
+
356
|
|
3118
|
+
357
|
|
3119
|
+
358
|
|
3120
|
+
359</pre>
|
|
3121
|
+
</td>
|
|
3122
|
+
<td>
|
|
3123
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 356</span>
|
|
3124
|
+
|
|
3125
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_skew identifier id'>sample_skew</span>
|
|
3126
|
+
<span class='rubyid_@sample_skew ivar id'>@sample_skew</span> <span class='opasgn op'>||=</span>
|
|
3127
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sampleSkew identifier id'>sampleSkew</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_moment3 identifier id'>moment3</span><span class='comma token'>,</span> <span class='rubyid_sample_variance identifier id'>sample_variance</span><span class='rparen token'>)</span>
|
|
3128
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3129
|
+
</pre>
|
|
3130
|
+
</td>
|
|
3131
|
+
</tr>
|
|
3132
|
+
</table>
|
|
3133
|
+
</div>
|
|
3134
|
+
|
|
3135
|
+
<div class="method_details ">
|
|
3136
|
+
<h3 class="signature " id="sample_skew_standard_error-instance_method">
|
|
3137
|
+
|
|
3138
|
+
- (<tt>Object</tt>) <strong>sample_skew_standard_error</strong>
|
|
3139
|
+
|
|
3140
|
+
|
|
3141
|
+
|
|
3142
|
+
|
|
3143
|
+
|
|
3144
|
+
</h3><div class="docstring">
|
|
3145
|
+
<div class="discussion">
|
|
3146
|
+
<hr style="height: 10px">
|
|
3147
|
+
|
|
3148
|
+
<p>Return the standard error of the sample skew. Ref: R.R. Sokal, F.J. Rohlf,
|
|
3149
|
+
Biometry: the principles and practice of statistics in biological research
|
|
3150
|
+
(W.H. Freeman and Company, New York, 1998, 3rd edition) p. 138.</p>
|
|
3151
|
+
<hr style="height: 10px">
|
|
3152
|
+
|
|
3153
|
+
|
|
3154
|
+
</div>
|
|
3155
|
+
</div>
|
|
3156
|
+
<div class="tags">
|
|
3157
|
+
|
|
3158
|
+
|
|
3159
|
+
</div><table class="source_code">
|
|
3160
|
+
<tr>
|
|
3161
|
+
<td>
|
|
3162
|
+
<pre class="lines">
|
|
3163
|
+
|
|
3164
|
+
|
|
3165
|
+
367
|
|
3166
|
+
368
|
|
3167
|
+
369
|
|
3168
|
+
370</pre>
|
|
3169
|
+
</td>
|
|
3170
|
+
<td>
|
|
3171
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 367</span>
|
|
3172
|
+
|
|
3173
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_skew_standard_error identifier id'>sample_skew_standard_error</span>
|
|
3174
|
+
<span class='rubyid_@sample_skew_standard_error ivar id'>@sample_skew_standard_error</span> <span class='opasgn op'>||=</span>
|
|
3175
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sampleSkewStandardError identifier id'>sampleSkewStandardError</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='rparen token'>)</span>
|
|
3176
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3177
|
+
</pre>
|
|
3178
|
+
</td>
|
|
3179
|
+
</tr>
|
|
3180
|
+
</table>
|
|
3181
|
+
</div>
|
|
3182
|
+
|
|
3183
|
+
<div class="method_details ">
|
|
3184
|
+
<h3 class="signature " id="sample_standard_deviation-instance_method">
|
|
3185
|
+
|
|
3186
|
+
- (<tt>Object</tt>) <strong>sample_standard_deviation</strong>
|
|
3187
|
+
|
|
3188
|
+
|
|
3189
|
+
|
|
3190
|
+
|
|
3191
|
+
|
|
3192
|
+
</h3><div class="docstring">
|
|
3193
|
+
<div class="discussion">
|
|
3194
|
+
<hr style="height: 10px">
|
|
3195
|
+
|
|
3196
|
+
<p>Returns the sample standard deviation. Ref: R.R. Sokal, F.J. Rohlf,
|
|
3197
|
+
Biometry: the principles and practice of statistics in biological research
|
|
3198
|
+
(W.H. Freeman and Company, New York, 1998, 3rd edition) p. 53. The
|
|
3199
|
+
standard deviation calculated as the sqrt of the variance underestimates
|
|
3200
|
+
the unbiased standard deviation. It needs to be multiplied by this
|
|
3201
|
+
correction factor: 1) if (n > 30): Cn = 1+1/(4*(n-1)), else 2) Cn =
|
|
3202
|
+
Math.sqrt((n - 1) * 0.5) * Gamma.gamma((n - 1) * 0.5) / Gamma.gamma(n *
|
|
3203
|
+
0.5) The sample standard deviation is Cn * size</p>
|
|
3204
|
+
<hr style="height: 10px">
|
|
3205
|
+
|
|
3206
|
+
|
|
3207
|
+
</div>
|
|
3208
|
+
</div>
|
|
3209
|
+
<div class="tags">
|
|
3210
|
+
|
|
3211
|
+
|
|
3212
|
+
</div><table class="source_code">
|
|
3213
|
+
<tr>
|
|
3214
|
+
<td>
|
|
3215
|
+
<pre class="lines">
|
|
3216
|
+
|
|
3217
|
+
|
|
3218
|
+
383
|
|
3219
|
+
384
|
|
3220
|
+
385
|
|
3221
|
+
386</pre>
|
|
3222
|
+
</td>
|
|
3223
|
+
<td>
|
|
3224
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 383</span>
|
|
3225
|
+
|
|
3226
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_standard_deviation identifier id'>sample_standard_deviation</span>
|
|
3227
|
+
<span class='rubyid_@sample_standard_deviation ivar id'>@sample_standard_deviation</span> <span class='opasgn op'>||=</span>
|
|
3228
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sampleStandardDeviation identifier id'>sampleStandardDeviation</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_sample_variance identifier id'>sample_variance</span><span class='rparen token'>)</span>
|
|
3229
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3230
|
+
</pre>
|
|
3231
|
+
</td>
|
|
3232
|
+
</tr>
|
|
3233
|
+
</table>
|
|
3234
|
+
</div>
|
|
3235
|
+
|
|
3236
|
+
<div class="method_details ">
|
|
3237
|
+
<h3 class="signature " id="sample_variance-instance_method">
|
|
3238
|
+
|
|
3239
|
+
- (<tt>Object</tt>) <strong>sample_variance</strong>
|
|
3240
|
+
|
|
3241
|
+
|
|
3242
|
+
|
|
3243
|
+
|
|
3244
|
+
|
|
3245
|
+
</h3><div class="docstring">
|
|
3246
|
+
<div class="discussion">
|
|
3247
|
+
<hr style="height: 10px">
|
|
3248
|
+
|
|
3249
|
+
<p>Returns the sample variance of a data sequence.</p>
|
|
3250
|
+
<hr style="height: 10px">
|
|
3251
|
+
|
|
3252
|
+
|
|
3253
|
+
</div>
|
|
3254
|
+
</div>
|
|
3255
|
+
<div class="tags">
|
|
3256
|
+
|
|
3257
|
+
|
|
3258
|
+
</div><table class="source_code">
|
|
3259
|
+
<tr>
|
|
3260
|
+
<td>
|
|
3261
|
+
<pre class="lines">
|
|
3262
|
+
|
|
3263
|
+
|
|
3264
|
+
392
|
|
3265
|
+
393
|
|
3266
|
+
394
|
|
3267
|
+
395</pre>
|
|
3268
|
+
</td>
|
|
3269
|
+
<td>
|
|
3270
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 392</span>
|
|
3271
|
+
|
|
3272
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_variance identifier id'>sample_variance</span>
|
|
3273
|
+
<span class='rubyid_@sample_variance ivar id'>@sample_variance</span> <span class='opasgn op'>||=</span>
|
|
3274
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sampleVariance identifier id'>sampleVariance</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_sum identifier id'>sum</span><span class='comma token'>,</span> <span class='rubyid_sum_of_squares identifier id'>sum_of_squares</span><span class='rparen token'>)</span>
|
|
3275
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3276
|
+
</pre>
|
|
3277
|
+
</td>
|
|
3278
|
+
</tr>
|
|
3279
|
+
</table>
|
|
3280
|
+
</div>
|
|
3281
|
+
|
|
3282
|
+
<div class="method_details ">
|
|
3283
|
+
<h3 class="signature " id="sample_weighted_variance-instance_method">
|
|
3284
|
+
|
|
3285
|
+
- (<tt>Object</tt>) <strong>sample_weighted_variance</strong>(weights)
|
|
3286
|
+
|
|
3287
|
+
|
|
3288
|
+
|
|
3289
|
+
|
|
3290
|
+
|
|
3291
|
+
</h3><div class="docstring">
|
|
3292
|
+
<div class="discussion">
|
|
3293
|
+
<hr style="height: 10px">
|
|
3294
|
+
|
|
3295
|
+
<p>Returns the sample weighted variance of a data sequence.</p>
|
|
3296
|
+
|
|
3297
|
+
<pre class="code ruby18"><code class="ruby18">That is (sum_of_squared_products - sum_of_products * sum_of_products /
|
|
3298
|
+
sum_of_weights) / (sum_of_weights - 1)</code></pre>
|
|
3299
|
+
|
|
3300
|
+
<p>where:</p>
|
|
3301
|
+
|
|
3302
|
+
<pre class="code ruby18"><code class="ruby18">sum_of_weights = Sum ( weights[i] )
|
|
3303
|
+
sum_of_products = Sum ( data[i] * weights[i] )
|
|
3304
|
+
sum_of_squared_products = Sum( data[i] * data[i] * weights[i] )</code></pre>
|
|
3305
|
+
<hr style="height: 10px">
|
|
3306
|
+
|
|
3307
|
+
|
|
3308
|
+
</div>
|
|
3309
|
+
</div>
|
|
3310
|
+
<div class="tags">
|
|
3311
|
+
|
|
3312
|
+
|
|
3313
|
+
</div><table class="source_code">
|
|
3314
|
+
<tr>
|
|
3315
|
+
<td>
|
|
3316
|
+
<pre class="lines">
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
407
|
|
3320
|
+
408
|
|
3321
|
+
409
|
|
3322
|
+
410
|
|
3323
|
+
411
|
|
3324
|
+
412
|
|
3325
|
+
413
|
|
3326
|
+
414</pre>
|
|
3327
|
+
</td>
|
|
3328
|
+
<td>
|
|
3329
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 407</span>
|
|
3330
|
+
|
|
3331
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sample_weighted_variance identifier id'>sample_weighted_variance</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='rparen token'>)</span>
|
|
3332
|
+
|
|
3333
|
+
<span class='rubyid_weights identifier id'>weights</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span><span class='lparen token'>(</span><span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_double identifier id'>double</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
|
3334
|
+
<span class='rubyid_sum_of_weights identifier id'>sum_of_weights</span> <span class='assign token'>=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sum identifier id'>sum</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='rparen token'>)</span>
|
|
3335
|
+
<span class='rubyid_sum_of_products identifier id'>sum_of_products</span><span class='comma token'>,</span> <span class='rubyid_sum_of_squared_products identifier id'>sum_of_squared_products</span> <span class='assign token'>=</span> <span class='rubyid_weighted_sums identifier id'>weighted_sums</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='rparen token'>)</span>
|
|
3336
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sampleWeightedVariance identifier id'>sampleWeightedVariance</span><span class='lparen token'>(</span><span class='rubyid_sum_of_weights identifier id'>sum_of_weights</span><span class='comma token'>,</span> <span class='rubyid_sum_of_products identifier id'>sum_of_products</span><span class='comma token'>,</span>
|
|
3337
|
+
<span class='rubyid_sum_of_squared_products identifier id'>sum_of_squared_products</span><span class='rparen token'>)</span>
|
|
3338
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3339
|
+
</pre>
|
|
3340
|
+
</td>
|
|
3341
|
+
</tr>
|
|
3342
|
+
</table>
|
|
3343
|
+
</div>
|
|
3344
|
+
|
|
3345
|
+
<div class="method_details ">
|
|
3346
|
+
<h3 class="signature " id="skew-instance_method">
|
|
3347
|
+
|
|
3348
|
+
- (<tt>Object</tt>) <strong>skew</strong>
|
|
3349
|
+
|
|
3350
|
+
|
|
3351
|
+
|
|
3352
|
+
|
|
3353
|
+
|
|
3354
|
+
</h3><div class="docstring">
|
|
3355
|
+
<div class="discussion">
|
|
3356
|
+
<hr style="height: 10px">
|
|
3357
|
+
|
|
3358
|
+
<p>Returns the skew of a data sequence, which is moment(data,3,mean) /
|
|
3359
|
+
standardDeviation.</p>
|
|
3360
|
+
<hr style="height: 10px">
|
|
3361
|
+
|
|
3362
|
+
|
|
3363
|
+
</div>
|
|
3364
|
+
</div>
|
|
3365
|
+
<div class="tags">
|
|
3366
|
+
|
|
3367
|
+
|
|
3368
|
+
</div><table class="source_code">
|
|
3369
|
+
<tr>
|
|
3370
|
+
<td>
|
|
3371
|
+
<pre class="lines">
|
|
3372
|
+
|
|
3373
|
+
|
|
3374
|
+
421
|
|
3375
|
+
422
|
|
3376
|
+
423</pre>
|
|
3377
|
+
</td>
|
|
3378
|
+
<td>
|
|
3379
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 421</span>
|
|
3380
|
+
|
|
3381
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_skew identifier id'>skew</span>
|
|
3382
|
+
<span class='rubyid_@skew ivar id'>@skew</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_skew identifier id'>skew</span><span class='lparen token'>(</span><span class='rubyid_moment3 identifier id'>moment3</span><span class='comma token'>,</span> <span class='rubyid_standard_deviation identifier id'>standard_deviation</span><span class='rparen token'>)</span>
|
|
3383
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3384
|
+
</pre>
|
|
3385
|
+
</td>
|
|
3386
|
+
</tr>
|
|
3387
|
+
</table>
|
|
3388
|
+
</div>
|
|
3389
|
+
|
|
3390
|
+
<div class="method_details ">
|
|
3391
|
+
<h3 class="signature " id="sort-instance_method">
|
|
3392
|
+
|
|
3393
|
+
- (<tt>Object</tt>) <strong>sort</strong>
|
|
3394
|
+
|
|
3395
|
+
|
|
3396
|
+
|
|
3397
|
+
|
|
3398
|
+
|
|
3399
|
+
</h3><div class="docstring">
|
|
3400
|
+
<div class="discussion">
|
|
3401
|
+
<hr style="height: 10px">
|
|
3402
|
+
|
|
3403
|
+
<p>Returns a list with the sorted elements</p>
|
|
3404
|
+
<hr style="height: 10px">
|
|
3405
|
+
|
|
3406
|
+
|
|
3407
|
+
</div>
|
|
3408
|
+
</div>
|
|
3409
|
+
<div class="tags">
|
|
3410
|
+
|
|
3411
|
+
|
|
3412
|
+
</div><table class="source_code">
|
|
3413
|
+
<tr>
|
|
3414
|
+
<td>
|
|
3415
|
+
<pre class="lines">
|
|
3416
|
+
|
|
3417
|
+
|
|
3418
|
+
461
|
|
3419
|
+
462
|
|
3420
|
+
463
|
|
3421
|
+
464
|
|
3422
|
+
465</pre>
|
|
3423
|
+
</td>
|
|
3424
|
+
<td>
|
|
3425
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 461</span>
|
|
3426
|
+
|
|
3427
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sort identifier id'>sort</span>
|
|
3428
|
+
<span class='rubyid_sorted_data identifier id'>sorted_data</span>
|
|
3429
|
+
<span class='rubyid_@sorted_data ivar id'>@sorted_data</span><span class='dot token'>.</span><span class='rubyid_trimToSize identifier id'>trimToSize</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
|
|
3430
|
+
<span class='rubyid_@sorted_data ivar id'>@sorted_data</span><span class='dot token'>.</span><span class='rubyid_elements identifier id'>elements</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
|
|
3431
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3432
|
+
</pre>
|
|
3433
|
+
</td>
|
|
3434
|
+
</tr>
|
|
3435
|
+
</table>
|
|
3436
|
+
</div>
|
|
3437
|
+
|
|
3438
|
+
<div class="method_details ">
|
|
3439
|
+
<h3 class="signature " id="sorted_data-instance_method">
|
|
3440
|
+
|
|
3441
|
+
- (<tt>Object</tt>) <strong>sorted_data</strong>
|
|
3442
|
+
|
|
3443
|
+
|
|
3444
|
+
|
|
3445
|
+
|
|
3446
|
+
|
|
3447
|
+
</h3><div class="docstring">
|
|
3448
|
+
<div class="discussion">
|
|
3449
|
+
<hr style="height: 10px">
|
|
3450
|
+
<hr style="height: 10px">
|
|
3451
|
+
|
|
3452
|
+
|
|
3453
|
+
</div>
|
|
3454
|
+
</div>
|
|
3455
|
+
<div class="tags">
|
|
3456
|
+
|
|
3457
|
+
|
|
3458
|
+
</div><table class="source_code">
|
|
3459
|
+
<tr>
|
|
3460
|
+
<td>
|
|
3461
|
+
<pre class="lines">
|
|
3462
|
+
|
|
3463
|
+
|
|
3464
|
+
471
|
|
3465
|
+
472
|
|
3466
|
+
473
|
|
3467
|
+
474
|
|
3468
|
+
475
|
|
3469
|
+
476
|
|
3470
|
+
477
|
|
3471
|
+
478
|
|
3472
|
+
479
|
|
3473
|
+
480
|
|
3474
|
+
481
|
|
3475
|
+
482</pre>
|
|
3476
|
+
</td>
|
|
3477
|
+
<td>
|
|
3478
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 471</span>
|
|
3479
|
+
|
|
3480
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sorted_data identifier id'>sorted_data</span>
|
|
3481
|
+
|
|
3482
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_@sorted_data ivar id'>@sorted_data</span><span class='rparen token'>)</span>
|
|
3483
|
+
<span class='rubyid_return return kw'>return</span> <span class='rubyid_@sorted_data ivar id'>@sorted_data</span>
|
|
3484
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3485
|
+
|
|
3486
|
+
<span class='rubyid_list identifier id'>list</span> <span class='assign token'>=</span> <span class='rubyid_@array_list ivar id'>@array_list</span><span class='dot token'>.</span><span class='rubyid_clone identifier id'>clone</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_elements identifier id'>elements</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
|
|
3487
|
+
<span class='rubyid_comp identifier id'>comp</span> <span class='assign token'>=</span> <span class='rubyid_Proc constant id'>Proc</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_val1 identifier id'>val1</span><span class='comma token'>,</span> <span class='rubyid_val2 identifier id'>val2</span><span class='bitor op'>|</span> <span class='rubyid_val1 identifier id'>val1</span> <span class='cmp op'><=></span> <span class='rubyid_val2 identifier id'>val2</span> <span class='rbrace token'>}</span>
|
|
3488
|
+
<span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColt constant id'>CernColt</span><span class='colon2 op'>::</span><span class='rubyid_Sorting constant id'>Sorting</span><span class='dot token'>.</span><span class='rubyid_parallelQuickSort identifier id'>parallelQuickSort</span><span class='lparen token'>(</span><span class='rubyid_list identifier id'>list</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_@array_list ivar id'>@array_list</span><span class='dot token'>.</span><span class='rubyid_size identifier id'>size</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_comp identifier id'>comp</span><span class='rparen token'>)</span>
|
|
3489
|
+
<span class='rubyid_@sorted_data ivar id'>@sorted_data</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_list identifier id'>list</span><span class='rparen token'>)</span>
|
|
3490
|
+
|
|
3491
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3492
|
+
</pre>
|
|
3493
|
+
</td>
|
|
3494
|
+
</tr>
|
|
3495
|
+
</table>
|
|
3496
|
+
</div>
|
|
3497
|
+
|
|
3498
|
+
<div class="method_details ">
|
|
3499
|
+
<h3 class="signature " id="split-instance_method">
|
|
3500
|
+
|
|
3501
|
+
- (<tt>Object</tt>) <strong>split</strong>(splitters)
|
|
3502
|
+
|
|
3503
|
+
|
|
3504
|
+
|
|
3505
|
+
|
|
3506
|
+
|
|
3507
|
+
</h3><div class="docstring">
|
|
3508
|
+
<div class="discussion">
|
|
3509
|
+
<hr style="height: 10px">
|
|
3510
|
+
|
|
3511
|
+
<p>Splits (partitions) a list into sublists such that each sublist contains
|
|
3512
|
+
the elements with a given range. splitters= (a,b,c,?,y,z) defines the
|
|
3513
|
+
ranges [-inf,a), [a,b), [b,c), ?, [y,z), [z,inf]. Examples:</p>
|
|
3514
|
+
|
|
3515
|
+
<pre class="code ruby18"><code class="ruby18">data = (1,2,3,4,5,8,8,8,10,11).
|
|
3516
|
+
splitters=(2,8) yields 3 bins: (1), (2,3,4,5) (8,8,8,10,11).
|
|
3517
|
+
splitters=() yields 1 bin: (1,2,3,4,5,8,8,8,10,11).
|
|
3518
|
+
splitters=(-5) yields 2 bins: (), (1,2,3,4,5,8,8,8,10,11).
|
|
3519
|
+
splitters=(100) yields 2 bins: (1,2,3,4,5,8,8,8,10,11), ().</code></pre>
|
|
3520
|
+
<hr style="height: 10px">
|
|
3521
|
+
|
|
3522
|
+
|
|
3523
|
+
</div>
|
|
3524
|
+
</div>
|
|
3525
|
+
<div class="tags">
|
|
3526
|
+
|
|
3527
|
+
<p class="tag_title">Returns:</p>
|
|
3528
|
+
<ul class="return">
|
|
3529
|
+
|
|
3530
|
+
<li>
|
|
3531
|
+
|
|
3532
|
+
|
|
3533
|
+
<span class='type'></span>
|
|
3534
|
+
|
|
3535
|
+
|
|
3536
|
+
|
|
3537
|
+
|
|
3538
|
+
<div class='inline'>
|
|
3539
|
+
<p>the sublists (an array with length == splitters.size() + 1. Each sublist is
|
|
3540
|
+
returned sorted ascending.</p>
|
|
3541
|
+
</div>
|
|
3542
|
+
|
|
3543
|
+
</li>
|
|
3544
|
+
|
|
3545
|
+
</ul>
|
|
3546
|
+
|
|
3547
|
+
</div><table class="source_code">
|
|
3548
|
+
<tr>
|
|
3549
|
+
<td>
|
|
3550
|
+
<pre class="lines">
|
|
3551
|
+
|
|
3552
|
+
|
|
3553
|
+
441
|
|
3554
|
+
442
|
|
3555
|
+
443
|
|
3556
|
+
444
|
|
3557
|
+
445
|
|
3558
|
+
446
|
|
3559
|
+
447
|
|
3560
|
+
448
|
|
3561
|
+
449
|
|
3562
|
+
450
|
|
3563
|
+
451
|
|
3564
|
+
452
|
|
3565
|
+
453
|
|
3566
|
+
454
|
|
3567
|
+
455</pre>
|
|
3568
|
+
</td>
|
|
3569
|
+
<td>
|
|
3570
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 441</span>
|
|
3571
|
+
|
|
3572
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='rubyid_splitters identifier id'>splitters</span><span class='rparen token'>)</span>
|
|
3573
|
+
|
|
3574
|
+
<span class='rubyid_split identifier id'>split</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_splitters identifier id'>splitters</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span><span class='lparen token'>(</span><span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_double identifier id'>double</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
|
3575
|
+
<span class='rubyid_res identifier id'>res</span> <span class='assign token'>=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_split identifier id'>split</span><span class='rparen token'>)</span>
|
|
3576
|
+
<span class='rubyid_lists identifier id'>lists</span> <span class='assign token'>=</span> <span class='rubyid_res identifier id'>res</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
|
|
3577
|
+
<span class='rubyid_bins identifier id'>bins</span> <span class='assign token'>=</span> <span class='rubyid_Array constant id'>Array</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
|
|
3578
|
+
|
|
3579
|
+
<span class='rubyid_lists identifier id'>lists</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_list identifier id'>list</span><span class='bitor op'>|</span>
|
|
3580
|
+
<span class='rubyid_list identifier id'>list</span><span class='dot token'>.</span><span class='rubyid_trimToSize identifier id'>trimToSize</span><span class='lparen token'>(</span><span class='rparen token'>)</span>
|
|
3581
|
+
<span class='rubyid_bins identifier id'>bins</span> <span class='lshft op'><<</span> <span class='rubyid_list identifier id'>list</span><span class='dot token'>.</span><span class='rubyid_elements identifier id'>elements</span><span class='lparen token'>(</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_a identifier id'>to_a</span>
|
|
3582
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3583
|
+
|
|
3584
|
+
<span class='rubyid_bins identifier id'>bins</span>
|
|
3585
|
+
|
|
3586
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3587
|
+
</pre>
|
|
3588
|
+
</td>
|
|
3589
|
+
</tr>
|
|
3590
|
+
</table>
|
|
3591
|
+
</div>
|
|
3592
|
+
|
|
3593
|
+
<div class="method_details ">
|
|
3594
|
+
<h3 class="signature " id="standard_deviation-instance_method">
|
|
3595
|
+
|
|
3596
|
+
- (<tt>Object</tt>) <strong>standard_deviation</strong>
|
|
3597
|
+
|
|
3598
|
+
|
|
3599
|
+
|
|
3600
|
+
|
|
3601
|
+
|
|
3602
|
+
</h3><div class="docstring">
|
|
3603
|
+
<div class="discussion">
|
|
3604
|
+
<hr style="height: 10px">
|
|
3605
|
+
|
|
3606
|
+
<p>Returns the standard deviation from a variance.</p>
|
|
3607
|
+
<hr style="height: 10px">
|
|
3608
|
+
|
|
3609
|
+
|
|
3610
|
+
</div>
|
|
3611
|
+
</div>
|
|
3612
|
+
<div class="tags">
|
|
3613
|
+
|
|
3614
|
+
|
|
3615
|
+
</div><table class="source_code">
|
|
3616
|
+
<tr>
|
|
3617
|
+
<td>
|
|
3618
|
+
<pre class="lines">
|
|
3619
|
+
|
|
3620
|
+
|
|
3621
|
+
488
|
|
3622
|
+
489
|
|
3623
|
+
490</pre>
|
|
3624
|
+
</td>
|
|
3625
|
+
<td>
|
|
3626
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 488</span>
|
|
3627
|
+
|
|
3628
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_standard_deviation identifier id'>standard_deviation</span>
|
|
3629
|
+
<span class='rubyid_@standard_deviation ivar id'>@standard_deviation</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_standardDeviation identifier id'>standardDeviation</span><span class='lparen token'>(</span><span class='rubyid_variance identifier id'>variance</span><span class='rparen token'>)</span>
|
|
3630
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3631
|
+
</pre>
|
|
3632
|
+
</td>
|
|
3633
|
+
</tr>
|
|
3634
|
+
</table>
|
|
3635
|
+
</div>
|
|
3636
|
+
|
|
3637
|
+
<div class="method_details ">
|
|
3638
|
+
<h3 class="signature " id="standard_error-instance_method">
|
|
3639
|
+
|
|
3640
|
+
- (<tt>Object</tt>) <strong>standard_error</strong>
|
|
3641
|
+
|
|
3642
|
+
|
|
3643
|
+
|
|
3644
|
+
|
|
3645
|
+
|
|
3646
|
+
</h3><div class="docstring">
|
|
3647
|
+
<div class="discussion">
|
|
3648
|
+
<hr style="height: 10px">
|
|
3649
|
+
|
|
3650
|
+
<p>Returns the standard error of a data sequence.</p>
|
|
3651
|
+
<hr style="height: 10px">
|
|
3652
|
+
|
|
3653
|
+
|
|
3654
|
+
</div>
|
|
3655
|
+
</div>
|
|
3656
|
+
<div class="tags">
|
|
3657
|
+
|
|
3658
|
+
|
|
3659
|
+
</div><table class="source_code">
|
|
3660
|
+
<tr>
|
|
3661
|
+
<td>
|
|
3662
|
+
<pre class="lines">
|
|
3663
|
+
|
|
3664
|
+
|
|
3665
|
+
496
|
|
3666
|
+
497
|
|
3667
|
+
498</pre>
|
|
3668
|
+
</td>
|
|
3669
|
+
<td>
|
|
3670
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 496</span>
|
|
3671
|
+
|
|
3672
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_standard_error identifier id'>standard_error</span>
|
|
3673
|
+
<span class='rubyid_@standard_error ivar id'>@standard_error</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_standardError identifier id'>standardError</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_variance identifier id'>variance</span><span class='rparen token'>)</span>
|
|
3674
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3675
|
+
</pre>
|
|
3676
|
+
</td>
|
|
3677
|
+
</tr>
|
|
3678
|
+
</table>
|
|
3679
|
+
</div>
|
|
3680
|
+
|
|
3681
|
+
<div class="method_details ">
|
|
3682
|
+
<h3 class="signature " id="standardize!-instance_method">
|
|
3683
|
+
|
|
3684
|
+
- (<tt>Object</tt>) <strong>standardize!</strong>
|
|
3685
|
+
|
|
3686
|
+
|
|
3687
|
+
|
|
3688
|
+
|
|
3689
|
+
|
|
3690
|
+
</h3><div class="docstring">
|
|
3691
|
+
<div class="discussion">
|
|
3692
|
+
<hr style="height: 10px">
|
|
3693
|
+
|
|
3694
|
+
<p>Modifies a data sequence to be standardized. Changes each element <a
|
|
3695
|
+
href="http://i">data</a> as follows: <a href="http://i">data</a> = (<a
|
|
3696
|
+
href="http://i">data</a>-mean)/standardDeviation.</p>
|
|
3697
|
+
<hr style="height: 10px">
|
|
3698
|
+
|
|
3699
|
+
|
|
3700
|
+
</div>
|
|
3701
|
+
</div>
|
|
3702
|
+
<div class="tags">
|
|
3703
|
+
|
|
3704
|
+
|
|
3705
|
+
</div><table class="source_code">
|
|
3706
|
+
<tr>
|
|
3707
|
+
<td>
|
|
3708
|
+
<pre class="lines">
|
|
3709
|
+
|
|
3710
|
+
|
|
3711
|
+
505
|
|
3712
|
+
506
|
|
3713
|
+
507</pre>
|
|
3714
|
+
</td>
|
|
3715
|
+
<td>
|
|
3716
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 505</span>
|
|
3717
|
+
|
|
3718
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_standardize! fid id'>standardize!</span>
|
|
3719
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_standardize identifier id'>standardize</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='comma token'>,</span> <span class='rubyid_standard_deviation identifier id'>standard_deviation</span><span class='rparen token'>)</span>
|
|
3720
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3721
|
+
</pre>
|
|
3722
|
+
</td>
|
|
3723
|
+
</tr>
|
|
3724
|
+
</table>
|
|
3725
|
+
</div>
|
|
3726
|
+
|
|
3727
|
+
<div class="method_details ">
|
|
3728
|
+
<h3 class="signature " id="sum-instance_method">
|
|
3729
|
+
|
|
3730
|
+
- (<tt>Object</tt>) <strong>sum</strong>
|
|
3731
|
+
|
|
3732
|
+
|
|
3733
|
+
|
|
3734
|
+
|
|
3735
|
+
|
|
3736
|
+
</h3><div class="docstring">
|
|
3737
|
+
<div class="discussion">
|
|
3738
|
+
<hr style="height: 10px">
|
|
3739
|
+
|
|
3740
|
+
<p>Returns the sum of a data sequence.</p>
|
|
3741
|
+
<hr style="height: 10px">
|
|
3742
|
+
|
|
3743
|
+
|
|
3744
|
+
</div>
|
|
3745
|
+
</div>
|
|
3746
|
+
<div class="tags">
|
|
3747
|
+
|
|
3748
|
+
|
|
3749
|
+
</div><table class="source_code">
|
|
3750
|
+
<tr>
|
|
3751
|
+
<td>
|
|
3752
|
+
<pre class="lines">
|
|
3753
|
+
|
|
3754
|
+
|
|
3755
|
+
513
|
|
3756
|
+
514
|
|
3757
|
+
515</pre>
|
|
3758
|
+
</td>
|
|
3759
|
+
<td>
|
|
3760
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 513</span>
|
|
3761
|
+
|
|
3762
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sum identifier id'>sum</span>
|
|
3763
|
+
<span class='rubyid_@sum ivar id'>@sum</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sum identifier id'>sum</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
3764
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3765
|
+
</pre>
|
|
3766
|
+
</td>
|
|
3767
|
+
</tr>
|
|
3768
|
+
</table>
|
|
3769
|
+
</div>
|
|
3770
|
+
|
|
3771
|
+
<div class="method_details ">
|
|
3772
|
+
<h3 class="signature " id="sum_of_inversions-instance_method">
|
|
3773
|
+
|
|
3774
|
+
- (<tt>Object</tt>) <strong>sum_of_inversions</strong>(from = 0, to = list_size-1)
|
|
3775
|
+
|
|
3776
|
+
|
|
3777
|
+
|
|
3778
|
+
|
|
3779
|
+
|
|
3780
|
+
</h3><div class="docstring">
|
|
3781
|
+
<div class="discussion">
|
|
3782
|
+
<hr style="height: 10px">
|
|
3783
|
+
|
|
3784
|
+
<p>Returns the sum of inversions of a data sequence, which is Sum( 1.0 / <a
|
|
3785
|
+
href="http://i">data</a>).</p>
|
|
3786
|
+
<hr style="height: 10px">
|
|
3787
|
+
|
|
3788
|
+
|
|
3789
|
+
</div>
|
|
3790
|
+
</div>
|
|
3791
|
+
<div class="tags">
|
|
3792
|
+
|
|
3793
|
+
|
|
3794
|
+
</div><table class="source_code">
|
|
3795
|
+
<tr>
|
|
3796
|
+
<td>
|
|
3797
|
+
<pre class="lines">
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
521
|
|
3801
|
+
522
|
|
3802
|
+
523</pre>
|
|
3803
|
+
</td>
|
|
3804
|
+
<td>
|
|
3805
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 521</span>
|
|
3806
|
+
|
|
3807
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sum_of_inversions identifier id'>sum_of_inversions</span><span class='lparen token'>(</span><span class='rubyid_from identifier id'>from</span> <span class='assign token'>=</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_to identifier id'>to</span> <span class='assign token'>=</span> <span class='rubyid_list_size identifier id'>list_size</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rparen token'>)</span>
|
|
3808
|
+
<span class='rubyid_@sum_of_inversions ivar id'>@sum_of_inversions</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sumOfInversions identifier id'>sumOfInversions</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_from identifier id'>from</span><span class='comma token'>,</span> <span class='rubyid_to identifier id'>to</span><span class='rparen token'>)</span>
|
|
3809
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3810
|
+
</pre>
|
|
3811
|
+
</td>
|
|
3812
|
+
</tr>
|
|
3813
|
+
</table>
|
|
3814
|
+
</div>
|
|
3815
|
+
|
|
3816
|
+
<div class="method_details ">
|
|
3817
|
+
<h3 class="signature " id="sum_of_logarithms-instance_method">
|
|
3818
|
+
|
|
3819
|
+
- (<tt>Object</tt>) <strong>sum_of_logarithms</strong>(from = 0, to = list_size-1)
|
|
3820
|
+
|
|
3821
|
+
|
|
3822
|
+
|
|
3823
|
+
|
|
3824
|
+
|
|
3825
|
+
</h3><div class="docstring">
|
|
3826
|
+
<div class="discussion">
|
|
3827
|
+
<hr style="height: 10px">
|
|
3828
|
+
|
|
3829
|
+
<p>Returns the sum of logarithms of a data sequence, which is Sum( <a
|
|
3830
|
+
href="http://i">Log(data</a>).</p>
|
|
3831
|
+
<hr style="height: 10px">
|
|
3832
|
+
|
|
3833
|
+
|
|
3834
|
+
</div>
|
|
3835
|
+
</div>
|
|
3836
|
+
<div class="tags">
|
|
3837
|
+
|
|
3838
|
+
|
|
3839
|
+
</div><table class="source_code">
|
|
3840
|
+
<tr>
|
|
3841
|
+
<td>
|
|
3842
|
+
<pre class="lines">
|
|
3843
|
+
|
|
3844
|
+
|
|
3845
|
+
529
|
|
3846
|
+
530
|
|
3847
|
+
531</pre>
|
|
3848
|
+
</td>
|
|
3849
|
+
<td>
|
|
3850
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 529</span>
|
|
3851
|
+
|
|
3852
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sum_of_logarithms identifier id'>sum_of_logarithms</span><span class='lparen token'>(</span><span class='rubyid_from identifier id'>from</span> <span class='assign token'>=</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_to identifier id'>to</span> <span class='assign token'>=</span> <span class='rubyid_list_size identifier id'>list_size</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rparen token'>)</span>
|
|
3853
|
+
<span class='rubyid_@sum_of_logarithms ivar id'>@sum_of_logarithms</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sumOfLogarithms identifier id'>sumOfLogarithms</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_from identifier id'>from</span><span class='comma token'>,</span> <span class='rubyid_to identifier id'>to</span><span class='rparen token'>)</span>
|
|
3854
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3855
|
+
</pre>
|
|
3856
|
+
</td>
|
|
3857
|
+
</tr>
|
|
3858
|
+
</table>
|
|
3859
|
+
</div>
|
|
3860
|
+
|
|
3861
|
+
<div class="method_details ">
|
|
3862
|
+
<h3 class="signature " id="sum_of_power_deviations-instance_method">
|
|
3863
|
+
|
|
3864
|
+
- (<tt>Object</tt>) <strong>sum_of_power_deviations</strong>(k, c)
|
|
3865
|
+
|
|
3866
|
+
|
|
3867
|
+
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
</h3><div class="docstring">
|
|
3871
|
+
<div class="discussion">
|
|
3872
|
+
<hr style="height: 10px">
|
|
3873
|
+
|
|
3874
|
+
<p>Returns Sum( (<a href="http://i">data</a>-c)k ); optimized for common
|
|
3875
|
+
parameters like c == 0.0 and/or k == -2</p>
|
|
3876
|
+
<hr style="height: 10px">
|
|
3877
|
+
|
|
3878
|
+
|
|
3879
|
+
</div>
|
|
3880
|
+
</div>
|
|
3881
|
+
<div class="tags">
|
|
3882
|
+
|
|
3883
|
+
|
|
3884
|
+
</div><table class="source_code">
|
|
3885
|
+
<tr>
|
|
3886
|
+
<td>
|
|
3887
|
+
<pre class="lines">
|
|
3888
|
+
|
|
3889
|
+
|
|
3890
|
+
538
|
|
3891
|
+
539
|
|
3892
|
+
540</pre>
|
|
3893
|
+
</td>
|
|
3894
|
+
<td>
|
|
3895
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 538</span>
|
|
3896
|
+
|
|
3897
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sum_of_power_deviations identifier id'>sum_of_power_deviations</span><span class='lparen token'>(</span><span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span> <span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
|
|
3898
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sumOfPowerDeviations identifier id'>sumOfPowerDeviations</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span> <span class='rubyid_c identifier id'>c</span><span class='rparen token'>)</span>
|
|
3899
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3900
|
+
</pre>
|
|
3901
|
+
</td>
|
|
3902
|
+
</tr>
|
|
3903
|
+
</table>
|
|
3904
|
+
</div>
|
|
3905
|
+
|
|
3906
|
+
<div class="method_details ">
|
|
3907
|
+
<h3 class="signature " id="sum_of_powers-instance_method">
|
|
3908
|
+
|
|
3909
|
+
- (<tt>Object</tt>) <strong>sum_of_powers</strong>(k)
|
|
3910
|
+
|
|
3911
|
+
|
|
3912
|
+
|
|
3913
|
+
|
|
3914
|
+
|
|
3915
|
+
</h3><div class="docstring">
|
|
3916
|
+
<div class="discussion">
|
|
3917
|
+
<hr style="height: 10px">
|
|
3918
|
+
|
|
3919
|
+
<p>Returns the sum of powers of a data sequence, which is Sum ( <a
|
|
3920
|
+
href="http://i">data</a>k ).</p>
|
|
3921
|
+
<hr style="height: 10px">
|
|
3922
|
+
|
|
3923
|
+
|
|
3924
|
+
</div>
|
|
3925
|
+
</div>
|
|
3926
|
+
<div class="tags">
|
|
3927
|
+
|
|
3928
|
+
|
|
3929
|
+
</div><table class="source_code">
|
|
3930
|
+
<tr>
|
|
3931
|
+
<td>
|
|
3932
|
+
<pre class="lines">
|
|
3933
|
+
|
|
3934
|
+
|
|
3935
|
+
546
|
|
3936
|
+
547
|
|
3937
|
+
548</pre>
|
|
3938
|
+
</td>
|
|
3939
|
+
<td>
|
|
3940
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 546</span>
|
|
3941
|
+
|
|
3942
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sum_of_powers identifier id'>sum_of_powers</span><span class='lparen token'>(</span><span class='rubyid_k identifier id'>k</span><span class='rparen token'>)</span>
|
|
3943
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sumOfPowers identifier id'>sumOfPowers</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_k identifier id'>k</span><span class='rparen token'>)</span>
|
|
3944
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3945
|
+
</pre>
|
|
3946
|
+
</td>
|
|
3947
|
+
</tr>
|
|
3948
|
+
</table>
|
|
3949
|
+
</div>
|
|
3950
|
+
|
|
3951
|
+
<div class="method_details ">
|
|
3952
|
+
<h3 class="signature " id="sum_of_squared_deviations-instance_method">
|
|
3953
|
+
|
|
3954
|
+
- (<tt>Object</tt>) <strong>sum_of_squared_deviations</strong>
|
|
3955
|
+
|
|
3956
|
+
|
|
3957
|
+
|
|
3958
|
+
|
|
3959
|
+
|
|
3960
|
+
</h3><div class="docstring">
|
|
3961
|
+
<div class="discussion">
|
|
3962
|
+
<hr style="height: 10px">
|
|
3963
|
+
|
|
3964
|
+
<p>Returns the sum of squared mean deviation of of a data sequence.</p>
|
|
3965
|
+
<hr style="height: 10px">
|
|
3966
|
+
|
|
3967
|
+
|
|
3968
|
+
</div>
|
|
3969
|
+
</div>
|
|
3970
|
+
<div class="tags">
|
|
3971
|
+
|
|
3972
|
+
|
|
3973
|
+
</div><table class="source_code">
|
|
3974
|
+
<tr>
|
|
3975
|
+
<td>
|
|
3976
|
+
<pre class="lines">
|
|
3977
|
+
|
|
3978
|
+
|
|
3979
|
+
577
|
|
3980
|
+
578
|
|
3981
|
+
579
|
|
3982
|
+
580</pre>
|
|
3983
|
+
</td>
|
|
3984
|
+
<td>
|
|
3985
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 577</span>
|
|
3986
|
+
|
|
3987
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sum_of_squared_deviations identifier id'>sum_of_squared_deviations</span>
|
|
3988
|
+
<span class='rubyid_@sum_of_square_deviations ivar id'>@sum_of_square_deviations</span> <span class='opasgn op'>||=</span>
|
|
3989
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sumOfSquaredDeviations identifier id'>sumOfSquaredDeviations</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_variance identifier id'>variance</span><span class='rparen token'>)</span>
|
|
3990
|
+
<span class='rubyid_end end kw'>end</span>
|
|
3991
|
+
</pre>
|
|
3992
|
+
</td>
|
|
3993
|
+
</tr>
|
|
3994
|
+
</table>
|
|
3995
|
+
</div>
|
|
3996
|
+
|
|
3997
|
+
<div class="method_details ">
|
|
3998
|
+
<h3 class="signature " id="sum_of_squares-instance_method">
|
|
3999
|
+
|
|
4000
|
+
- (<tt>Object</tt>) <strong>sum_of_squares</strong>
|
|
4001
|
+
|
|
4002
|
+
|
|
4003
|
+
|
|
4004
|
+
|
|
4005
|
+
|
|
4006
|
+
</h3><div class="docstring">
|
|
4007
|
+
<div class="discussion">
|
|
4008
|
+
<hr style="height: 10px">
|
|
4009
|
+
|
|
4010
|
+
<p>Returns the sum of squares of a data sequence.</p>
|
|
4011
|
+
<hr style="height: 10px">
|
|
4012
|
+
|
|
4013
|
+
|
|
4014
|
+
</div>
|
|
4015
|
+
</div>
|
|
4016
|
+
<div class="tags">
|
|
4017
|
+
|
|
4018
|
+
|
|
4019
|
+
</div><table class="source_code">
|
|
4020
|
+
<tr>
|
|
4021
|
+
<td>
|
|
4022
|
+
<pre class="lines">
|
|
4023
|
+
|
|
4024
|
+
|
|
4025
|
+
586
|
|
4026
|
+
587
|
|
4027
|
+
588</pre>
|
|
4028
|
+
</td>
|
|
4029
|
+
<td>
|
|
4030
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 586</span>
|
|
4031
|
+
|
|
4032
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_sum_of_squares identifier id'>sum_of_squares</span>
|
|
4033
|
+
<span class='rubyid_@sum_of_squares ivar id'>@sum_of_squares</span> <span class='opasgn op'>||=</span> <span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_sumOfSquares identifier id'>sumOfSquares</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='rparen token'>)</span>
|
|
4034
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4035
|
+
</pre>
|
|
4036
|
+
</td>
|
|
4037
|
+
</tr>
|
|
4038
|
+
</table>
|
|
4039
|
+
</div>
|
|
4040
|
+
|
|
4041
|
+
<div class="method_details ">
|
|
4042
|
+
<h3 class="signature " id="trimmed_mean-instance_method">
|
|
4043
|
+
|
|
4044
|
+
- (<tt>Object</tt>) <strong>trimmed_mean</strong>(left = 0, right = 0)
|
|
4045
|
+
|
|
4046
|
+
|
|
4047
|
+
|
|
4048
|
+
|
|
4049
|
+
|
|
4050
|
+
</h3><div class="docstring">
|
|
4051
|
+
<div class="discussion">
|
|
4052
|
+
<hr style="height: 10px">
|
|
4053
|
+
|
|
4054
|
+
<p>Returns the trimmed mean of a sorted data sequence.</p>
|
|
4055
|
+
<hr style="height: 10px">
|
|
4056
|
+
|
|
4057
|
+
|
|
4058
|
+
</div>
|
|
4059
|
+
</div>
|
|
4060
|
+
<div class="tags">
|
|
4061
|
+
|
|
4062
|
+
|
|
4063
|
+
</div><table class="source_code">
|
|
4064
|
+
<tr>
|
|
4065
|
+
<td>
|
|
4066
|
+
<pre class="lines">
|
|
4067
|
+
|
|
4068
|
+
|
|
4069
|
+
594
|
|
4070
|
+
595
|
|
4071
|
+
596</pre>
|
|
4072
|
+
</td>
|
|
4073
|
+
<td>
|
|
4074
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 594</span>
|
|
4075
|
+
|
|
4076
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_trimmed_mean identifier id'>trimmed_mean</span><span class='lparen token'>(</span><span class='rubyid_left identifier id'>left</span> <span class='assign token'>=</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_right identifier id'>right</span> <span class='assign token'>=</span> <span class='integer val'>0</span><span class='rparen token'>)</span>
|
|
4077
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_trimmedMean identifier id'>trimmedMean</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='comma token'>,</span> <span class='rubyid_left identifier id'>left</span><span class='comma token'>,</span> <span class='rubyid_right identifier id'>right</span><span class='rparen token'>)</span>
|
|
4078
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4079
|
+
</pre>
|
|
4080
|
+
</td>
|
|
4081
|
+
</tr>
|
|
4082
|
+
</table>
|
|
4083
|
+
</div>
|
|
4084
|
+
|
|
4085
|
+
<div class="method_details ">
|
|
4086
|
+
<h3 class="signature " id="variance-instance_method">
|
|
4087
|
+
|
|
4088
|
+
- (<tt>Object</tt>) <strong>variance</strong>
|
|
4089
|
+
|
|
4090
|
+
|
|
4091
|
+
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
</h3><div class="docstring">
|
|
4095
|
+
<div class="discussion">
|
|
4096
|
+
<hr style="height: 10px">
|
|
4097
|
+
|
|
4098
|
+
<p>Returns the variance from a standard deviation.</p>
|
|
4099
|
+
<hr style="height: 10px">
|
|
4100
|
+
|
|
4101
|
+
|
|
4102
|
+
</div>
|
|
4103
|
+
</div>
|
|
4104
|
+
<div class="tags">
|
|
4105
|
+
|
|
4106
|
+
|
|
4107
|
+
</div><table class="source_code">
|
|
4108
|
+
<tr>
|
|
4109
|
+
<td>
|
|
4110
|
+
<pre class="lines">
|
|
4111
|
+
|
|
4112
|
+
|
|
4113
|
+
602
|
|
4114
|
+
603
|
|
4115
|
+
604
|
|
4116
|
+
605</pre>
|
|
4117
|
+
</td>
|
|
4118
|
+
<td>
|
|
4119
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 602</span>
|
|
4120
|
+
|
|
4121
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_variance identifier id'>variance</span>
|
|
4122
|
+
<span class='rubyid_@variance ivar id'>@variance</span> <span class='opasgn op'>||=</span>
|
|
4123
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_variance identifier id'>variance</span><span class='lparen token'>(</span><span class='rubyid_list_size identifier id'>list_size</span><span class='comma token'>,</span> <span class='rubyid_sum identifier id'>sum</span><span class='comma token'>,</span> <span class='rubyid_sum_of_squares identifier id'>sum_of_squares</span><span class='rparen token'>)</span>
|
|
4124
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4125
|
+
</pre>
|
|
4126
|
+
</td>
|
|
4127
|
+
</tr>
|
|
4128
|
+
</table>
|
|
4129
|
+
</div>
|
|
4130
|
+
|
|
4131
|
+
<div class="method_details ">
|
|
4132
|
+
<h3 class="signature " id="weighted_mean-instance_method">
|
|
4133
|
+
|
|
4134
|
+
- (<tt>Object</tt>) <strong>weighted_mean</strong>(weights)
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
|
|
4138
|
+
|
|
4139
|
+
|
|
4140
|
+
</h3><div class="docstring">
|
|
4141
|
+
<div class="discussion">
|
|
4142
|
+
<hr style="height: 10px">
|
|
4143
|
+
|
|
4144
|
+
<p>Returns the weighted mean of a data sequence.</p>
|
|
4145
|
+
<hr style="height: 10px">
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
</div>
|
|
4149
|
+
</div>
|
|
4150
|
+
<div class="tags">
|
|
4151
|
+
|
|
4152
|
+
|
|
4153
|
+
</div><table class="source_code">
|
|
4154
|
+
<tr>
|
|
4155
|
+
<td>
|
|
4156
|
+
<pre class="lines">
|
|
4157
|
+
|
|
4158
|
+
|
|
4159
|
+
611
|
|
4160
|
+
612
|
|
4161
|
+
613
|
|
4162
|
+
614</pre>
|
|
4163
|
+
</td>
|
|
4164
|
+
<td>
|
|
4165
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 611</span>
|
|
4166
|
+
|
|
4167
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_weighted_mean identifier id'>weighted_mean</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='rparen token'>)</span>
|
|
4168
|
+
<span class='rubyid_weights identifier id'>weights</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span><span class='lparen token'>(</span><span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_double identifier id'>double</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
|
4169
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_weightedMean identifier id'>weightedMean</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_weights identifier id'>weights</span><span class='rparen token'>)</span>
|
|
4170
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4171
|
+
</pre>
|
|
4172
|
+
</td>
|
|
4173
|
+
</tr>
|
|
4174
|
+
</table>
|
|
4175
|
+
</div>
|
|
4176
|
+
|
|
4177
|
+
<div class="method_details ">
|
|
4178
|
+
<h3 class="signature " id="weighted_rms-instance_method">
|
|
4179
|
+
|
|
4180
|
+
- (<tt>Object</tt>) <strong>weighted_rms</strong>(weights)
|
|
4181
|
+
|
|
4182
|
+
|
|
4183
|
+
|
|
4184
|
+
|
|
4185
|
+
|
|
4186
|
+
</h3><div class="docstring">
|
|
4187
|
+
<div class="discussion">
|
|
4188
|
+
<hr style="height: 10px">
|
|
4189
|
+
|
|
4190
|
+
<p>Returns the weighted RMS (Root-Mean-Square) of a data sequence.</p>
|
|
4191
|
+
<hr style="height: 10px">
|
|
4192
|
+
|
|
4193
|
+
|
|
4194
|
+
</div>
|
|
4195
|
+
</div>
|
|
4196
|
+
<div class="tags">
|
|
4197
|
+
|
|
4198
|
+
|
|
4199
|
+
</div><table class="source_code">
|
|
4200
|
+
<tr>
|
|
4201
|
+
<td>
|
|
4202
|
+
<pre class="lines">
|
|
4203
|
+
|
|
4204
|
+
|
|
4205
|
+
620
|
|
4206
|
+
621
|
|
4207
|
+
622
|
|
4208
|
+
623
|
|
4209
|
+
624
|
|
4210
|
+
625
|
|
4211
|
+
626</pre>
|
|
4212
|
+
</td>
|
|
4213
|
+
<td>
|
|
4214
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 620</span>
|
|
4215
|
+
|
|
4216
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_weighted_rms identifier id'>weighted_rms</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='rparen token'>)</span>
|
|
4217
|
+
|
|
4218
|
+
<span class='rubyid_weights identifier id'>weights</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span><span class='lparen token'>(</span><span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_double identifier id'>double</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
|
4219
|
+
<span class='rubyid_sum_of_products identifier id'>sum_of_products</span><span class='comma token'>,</span> <span class='rubyid_sum_of_squared_products identifier id'>sum_of_squared_products</span> <span class='assign token'>=</span> <span class='rubyid_weighted_sums identifier id'>weighted_sums</span><span class='lparen token'>(</span><span class='rubyid_weights identifier id'>weights</span><span class='rparen token'>)</span>
|
|
4220
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_weightedRMS identifier id'>weightedRMS</span><span class='lparen token'>(</span><span class='rubyid_sum_of_products identifier id'>sum_of_products</span><span class='comma token'>,</span> <span class='rubyid_sum_of_squared_products identifier id'>sum_of_squared_products</span><span class='rparen token'>)</span>
|
|
4221
|
+
|
|
4222
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4223
|
+
</pre>
|
|
4224
|
+
</td>
|
|
4225
|
+
</tr>
|
|
4226
|
+
</table>
|
|
4227
|
+
</div>
|
|
4228
|
+
|
|
4229
|
+
<div class="method_details ">
|
|
4230
|
+
<h3 class="signature " id="weighted_sums-instance_method">
|
|
4231
|
+
|
|
4232
|
+
- (<tt>Object</tt>) <strong>weighted_sums</strong>(other_val, from = 0, to = list_size-1)
|
|
4233
|
+
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+
|
|
4237
|
+
|
|
4238
|
+
</h3><div class="docstring">
|
|
4239
|
+
<div class="discussion">
|
|
4240
|
+
<hr style="height: 10px">
|
|
4241
|
+
|
|
4242
|
+
<p>Returns the sum of the product with another array.T hat is, Sum( <a
|
|
4243
|
+
href="http://i">data</a> * <a href="http://i">other_val</a> ) internally.</p>
|
|
4244
|
+
<hr style="height: 10px">
|
|
4245
|
+
|
|
4246
|
+
|
|
4247
|
+
</div>
|
|
4248
|
+
</div>
|
|
4249
|
+
<div class="tags">
|
|
4250
|
+
<p class="tag_title">Parameters:</p>
|
|
4251
|
+
<ul class="param">
|
|
4252
|
+
|
|
4253
|
+
<li>
|
|
4254
|
+
|
|
4255
|
+
<span class='name'>other_val:</span>
|
|
4256
|
+
|
|
4257
|
+
|
|
4258
|
+
<span class='type'></span>
|
|
4259
|
+
|
|
4260
|
+
|
|
4261
|
+
|
|
4262
|
+
—
|
|
4263
|
+
<div class='inline'>
|
|
4264
|
+
<p>ruby array or a CernColtListTdouble::DoubleArrayList (when called</p>
|
|
4265
|
+
</div>
|
|
4266
|
+
|
|
4267
|
+
</li>
|
|
4268
|
+
|
|
4269
|
+
</ul>
|
|
4270
|
+
|
|
4271
|
+
|
|
4272
|
+
</div><table class="source_code">
|
|
4273
|
+
<tr>
|
|
4274
|
+
<td>
|
|
4275
|
+
<pre class="lines">
|
|
4276
|
+
|
|
4277
|
+
|
|
4278
|
+
557
|
|
4279
|
+
558
|
|
4280
|
+
559
|
|
4281
|
+
560
|
|
4282
|
+
561
|
|
4283
|
+
562
|
|
4284
|
+
563
|
|
4285
|
+
564
|
|
4286
|
+
565
|
|
4287
|
+
566
|
|
4288
|
+
567
|
|
4289
|
+
568
|
|
4290
|
+
569
|
|
4291
|
+
570
|
|
4292
|
+
571</pre>
|
|
4293
|
+
</td>
|
|
4294
|
+
<td>
|
|
4295
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 557</span>
|
|
4296
|
+
|
|
4297
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_weighted_sums identifier id'>weighted_sums</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='comma token'>,</span> <span class='rubyid_from identifier id'>from</span> <span class='assign token'>=</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_to identifier id'>to</span> <span class='assign token'>=</span> <span class='rubyid_list_size identifier id'>list_size</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rparen token'>)</span>
|
|
4298
|
+
|
|
4299
|
+
<span class='rubyid_if if kw'>if</span> <span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Array constant id'>Array</span><span class='rparen token'>)</span>
|
|
4300
|
+
<span class='rubyid_weights identifier id'>weights</span> <span class='assign token'>=</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span><span class='lparen token'>(</span><span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_double identifier id'>double</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
|
4301
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='lparen token'>(</span><span class='rubyid_other_val identifier id'>other_val</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_CernColtListTdouble constant id'>CernColtListTdouble</span><span class='colon2 op'>::</span><span class='rubyid_DoubleArrayList constant id'>DoubleArrayList</span><span class='rparen token'>)</span>
|
|
4302
|
+
<span class='rubyid_weights identifier id'>weights</span> <span class='assign token'>=</span> <span class='rubyid_other_val identifier id'>other_val</span>
|
|
4303
|
+
<span class='rubyid_else else kw'>else</span>
|
|
4304
|
+
<span class='rubyid_raise identifier id'>raise</span> <span class='dstring node'>"#{other_val} is not a valid weight array"</span>
|
|
4305
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4306
|
+
|
|
4307
|
+
<span class='rubyid_in_out identifier id'>in_out</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='integer val'>0</span><span class='integer val'>.0</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_java identifier id'>to_java</span> <span class='rubyid_Java constant id'>Java</span><span class='colon2 op'>::</span><span class='rubyid_double identifier id'>double</span>
|
|
4308
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_incrementalWeightedUpdate identifier id'>incrementalWeightedUpdate</span><span class='lparen token'>(</span><span class='rubyid_@array_list ivar id'>@array_list</span><span class='comma token'>,</span> <span class='rubyid_weights identifier id'>weights</span><span class='comma token'>,</span> <span class='rubyid_from identifier id'>from</span><span class='comma token'>,</span> <span class='rubyid_to identifier id'>to</span><span class='comma token'>,</span> <span class='rubyid_in_out identifier id'>in_out</span><span class='rparen token'>)</span>
|
|
4309
|
+
<span class='lbrack token'>[</span><span class='rubyid_in_out identifier id'>in_out</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='rubyid_in_out identifier id'>in_out</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span><span class='rbrack token'>]</span>
|
|
4310
|
+
|
|
4311
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4312
|
+
</pre>
|
|
4313
|
+
</td>
|
|
4314
|
+
</tr>
|
|
4315
|
+
</table>
|
|
4316
|
+
</div>
|
|
4317
|
+
|
|
4318
|
+
<div class="method_details ">
|
|
4319
|
+
<h3 class="signature " id="winsorized_mean-instance_method">
|
|
4320
|
+
|
|
4321
|
+
- (<tt>Object</tt>) <strong>winsorized_mean</strong>(left, right)
|
|
4322
|
+
|
|
4323
|
+
|
|
4324
|
+
|
|
4325
|
+
|
|
4326
|
+
|
|
4327
|
+
</h3><div class="docstring">
|
|
4328
|
+
<div class="discussion">
|
|
4329
|
+
<hr style="height: 10px">
|
|
4330
|
+
|
|
4331
|
+
<p>Returns the winsorized mean of a sorted data sequence.</p>
|
|
4332
|
+
<hr style="height: 10px">
|
|
4333
|
+
|
|
4334
|
+
|
|
4335
|
+
</div>
|
|
4336
|
+
</div>
|
|
4337
|
+
<div class="tags">
|
|
4338
|
+
|
|
4339
|
+
|
|
4340
|
+
</div><table class="source_code">
|
|
4341
|
+
<tr>
|
|
4342
|
+
<td>
|
|
4343
|
+
<pre class="lines">
|
|
4344
|
+
|
|
4345
|
+
|
|
4346
|
+
632
|
|
4347
|
+
633
|
|
4348
|
+
634</pre>
|
|
4349
|
+
</td>
|
|
4350
|
+
<td>
|
|
4351
|
+
<pre class="code"><span class="info file"># File 'lib/colt/double_descriptive.rb', line 632</span>
|
|
4352
|
+
|
|
4353
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_winsorized_mean identifier id'>winsorized_mean</span><span class='lparen token'>(</span><span class='rubyid_left identifier id'>left</span><span class='comma token'>,</span> <span class='rubyid_right identifier id'>right</span><span class='rparen token'>)</span>
|
|
4354
|
+
<span class='rubyid_DoubleDescriptive constant id'>DoubleDescriptive</span><span class='dot token'>.</span><span class='rubyid_winsorizedMean identifier id'>winsorizedMean</span><span class='lparen token'>(</span><span class='rubyid_sorted_data identifier id'>sorted_data</span><span class='comma token'>,</span> <span class='rubyid_mean identifier id'>mean</span><span class='comma token'>,</span> <span class='rubyid_left identifier id'>left</span><span class='comma token'>,</span> <span class='rubyid_right identifier id'>right</span><span class='rparen token'>)</span>
|
|
4355
|
+
<span class='rubyid_end end kw'>end</span>
|
|
4356
|
+
</pre>
|
|
4357
|
+
</td>
|
|
4358
|
+
</tr>
|
|
4359
|
+
</table>
|
|
4360
|
+
</div>
|
|
4361
|
+
|
|
4362
|
+
</div>
|
|
4363
|
+
|
|
4364
|
+
</div>
|
|
4365
|
+
|
|
4366
|
+
<div id="footer">
|
|
4367
|
+
Generated on Thu May 16 12:48:35 2013 by
|
|
4368
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
4369
|
+
0.8.5.2 (ruby-1.9.3).
|
|
4370
|
+
</div>
|
|
4371
|
+
|
|
4372
|
+
</body>
|
|
4373
|
+
</html>
|