1 | # Change Log
|
2 |
|
3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4 |
|
5 | <a name="7.0.1"></a>
|
6 | ## [7.0.1](https://github.com/simple-statistics/simple-statistics/compare/v7.0.0...v7.0.1) (2019-02-07)
|
7 |
|
8 |
|
9 | ### Bug Fixes
|
10 |
|
11 | * code format error ([a1b9f15](https://github.com/simple-statistics/simple-statistics/commit/a1b9f15))
|
12 | * plus minus sign error ([f0b047d](https://github.com/simple-statistics/simple-statistics/commit/f0b047d))
|
13 |
|
14 |
|
15 |
|
16 | <a name="7.0.0"></a>
|
17 | # [7.0.0](https://github.com/simple-statistics/simple-statistics/compare/v6.1.1...v7.0.0) (2018-12-30)
|
18 |
|
19 |
|
20 | ### Bug Fixes
|
21 |
|
22 | * change umd name from simpleStatistics to ss ([59b42c0](https://github.com/simple-statistics/simple-statistics/commit/59b42c0))
|
23 | * Fix flipped umd:main package entry ([c9fe55b](https://github.com/simple-statistics/simple-statistics/commit/c9fe55b))
|
24 |
|
25 |
|
26 | ### Chores
|
27 |
|
28 | * Refactor from functions to classes, use Number.isInteger ([d974a1a](https://github.com/simple-statistics/simple-statistics/commit/d974a1a)), closes [#296](https://github.com/simple-statistics/simple-statistics/issues/296)
|
29 |
|
30 |
|
31 | ### BREAKING CHANGES
|
32 |
|
33 | * IE11 support is dropped.
|
34 |
|
35 |
|
36 |
|
37 | <a name="6.1.1"></a>
|
38 | ## [6.1.1](https://github.com/simple-statistics/simple-statistics/compare/v6.1.0...v6.1.1) (2018-09-24)
|
39 |
|
40 |
|
41 | ### Bug Fixes
|
42 |
|
43 | * **permutationTest:** Add TypeScript definition for permutationTest ([e7fa9db](https://github.com/simple-statistics/simple-statistics/commit/e7fa9db)), closes [#298](https://github.com/simple-statistics/simple-statistics/issues/298)
|
44 | * array quantile on certain kinds of input ([#334](https://github.com/simple-statistics/simple-statistics/issues/334)) ([e9d007e](https://github.com/simple-statistics/simple-statistics/commit/e9d007e))
|
45 |
|
46 |
|
47 |
|
48 | <a name="6.1.0"></a>
|
49 | # [6.1.0](https://github.com/simple-statistics/simple-statistics/compare/v6.0.1...v6.1.0) (2018-06-23)
|
50 |
|
51 |
|
52 | ### Features
|
53 |
|
54 | * gammaln ([9d03631](https://github.com/simple-statistics/simple-statistics/commit/9d03631))
|
55 |
|
56 |
|
57 |
|
58 | <a name="6.0.1"></a>
|
59 | ## [6.0.1](https://github.com/simple-statistics/simple-statistics/compare/v6.0.0...v6.0.1) (2018-05-11)
|
60 |
|
61 |
|
62 |
|
63 | <a name="6.0.0"></a>
|
64 | # [6.0.0](https://github.com/simple-statistics/simple-statistics/compare/v5.4.0...v6.0.0) (2018-04-30)
|
65 |
|
66 |
|
67 | ### Bug Fixes
|
68 |
|
69 | * Polyfill Number.isInteger function before committing to dropping IE11 ([#297](https://github.com/simple-statistics/simple-statistics/issues/297)) ([01cc37e](https://github.com/simple-statistics/simple-statistics/commit/01cc37e)), closes [#296](https://github.com/simple-statistics/simple-statistics/issues/296)
|
70 |
|
71 |
|
72 | ### build
|
73 |
|
74 | * **package.json:** Remove bower and component.json compatibility ([#294](https://github.com/simple-statistics/simple-statistics/issues/294)) ([0593cb8](https://github.com/simple-statistics/simple-statistics/commit/0593cb8)), closes [#293](https://github.com/simple-statistics/simple-statistics/issues/293)
|
75 |
|
76 |
|
77 | ### Features
|
78 |
|
79 | * Gamma Function ([39c8ecd](https://github.com/simple-statistics/simple-statistics/commit/39c8ecd))
|
80 |
|
81 |
|
82 | ### BREAKING CHANGES
|
83 |
|
84 | * **package.json:** simple-statistics is no longer supported as a component module or a bower module.
|
85 | All other forms of support - script tag, unpkg, npm - continue.
|
86 |
|
87 |
|
88 |
|
89 | <a name="5.4.0"></a>
|
90 | # [5.4.0](https://github.com/simple-statistics/simple-statistics/compare/v5.3.1...v5.4.0) (2018-04-21)
|
91 |
|
92 |
|
93 | ### Features
|
94 |
|
95 | * Permutation test ([1be011e](https://github.com/simple-statistics/simple-statistics/commit/1be011e))
|
96 |
|
97 |
|
98 |
|
99 | <a name="5.3.1"></a>
|
100 | ## [5.3.1](https://github.com/simple-statistics/simple-statistics/compare/v5.3.0...v5.3.1) (2018-03-23)
|
101 |
|
102 |
|
103 | ### Bug Fixes
|
104 |
|
105 | * Someone simple-statistics dependend on itself... ([12acd40](https://github.com/simple-statistics/simple-statistics/commit/12acd40))
|
106 |
|
107 |
|
108 |
|
109 | <a name="5.3.0"></a>
|
110 | # [5.3.0](https://github.com/simple-statistics/simple-statistics/compare/v5.2.1...v5.3.0) (2018-03-23)
|
111 |
|
112 |
|
113 | ### Features
|
114 |
|
115 | * adding extent ([80bcc99](https://github.com/simple-statistics/simple-statistics/commit/80bcc99))
|
116 | * adding extentSorted ([053399f](https://github.com/simple-statistics/simple-statistics/commit/053399f))
|
117 | * adding quantileRankSorted ([#285](https://github.com/simple-statistics/simple-statistics/issues/285)) ([84248ea](https://github.com/simple-statistics/simple-statistics/commit/84248ea))
|
118 |
|
119 |
|
120 |
|
121 | <a name="5.2.1"></a>
|
122 | ## [5.2.1](https://github.com/simple-statistics/simple-statistics/compare/v5.2.0...v5.2.1) (2017-12-20)
|
123 |
|
124 |
|
125 |
|
126 | <a name="5.2.0"></a>
|
127 | # [5.2.0](https://github.com/simple-statistics/simple-statistics/compare/v5.1.0...v5.2.0) (2017-11-29)
|
128 |
|
129 |
|
130 | ### Features
|
131 |
|
132 | * **package:** Add unpkg field to package.json to support unpkg default entry point ([#267](https://github.com/simple-statistics/simple-statistics/issues/267)) ([c1afd51](https://github.com/simple-statistics/simple-statistics/commit/c1afd51))
|
133 |
|
134 |
|
135 |
|
136 | <a name="5.1.0"></a>
|
137 | # [5.1.0](https://github.com/simple-statistics/simple-statistics/compare/v5.0.0...v5.1.0) (2017-10-23)
|
138 |
|
139 |
|
140 | ### Features
|
141 |
|
142 | * Add TypeScript definition ([688538b](https://github.com/simple-statistics/simple-statistics/commit/688538b))
|
143 |
|
144 |
|
145 |
|
146 | <a name="5.0.1"></a>
|
147 | ## [5.0.1](https://github.com/simple-statistics/simple-statistics/compare/v5.0.0...v5.0.1) (2017-10-15)
|
148 |
|
149 |
|
150 | ### Bug Fixes
|
151 |
|
152 | * Add index.js to package.json ([b744bfa](https://github.com/simple-statistics/simple-statistics/commit/b744bfa)), closes [#253](https://github.com/simple-statistics/simple-statistics/issues/253)
|
153 |
|
154 |
|
155 |
|
156 | <a name="5.0.0"></a>
|
157 | # [5.0.0](https://github.com/simple-statistics/simple-statistics/compare/v4.1.1...v5.0.0) (2017-09-26)
|
158 |
|
159 |
|
160 | ### Features
|
161 |
|
162 | * Expose ES6 modules ([a775ef6](https://github.com/simple-statistics/simple-statistics/commit/a775ef6)), closes [#210](https://github.com/simple-statistics/simple-statistics/issues/210)
|
163 | * kernel density estimation ([#245](https://github.com/simple-statistics/simple-statistics/issues/245)) ([8637af1](https://github.com/simple-statistics/simple-statistics/commit/8637af1)), closes [#244](https://github.com/simple-statistics/simple-statistics/issues/244)
|
164 |
|
165 |
|
166 | ### BREAKING CHANGES
|
167 |
|
168 | * simple-statistics now uses ES6 modules internally, and exposes a entry point for other modules to use it as an ES6 module.
|
169 |
|
170 | This means:
|
171 |
|
172 | - If you use Rollup or another library that supports the `jsnext:main` or `module` fields of package.json, you'll likely automatically start using this feature. When you use simple-statistics as an ES6 module, `import {min} from "simple-statistics"` and other imports of only a few of its methods will automatically do 'tree-shaking' and only pull in the parts you use (if your bundling tool supports tree-shaking)
|
173 | - Sub-requiring parts of simple-statistics, like `require('simple-statistics/min')` is **deprecated** and will not work. Its components are now written with ES6 syntax.
|
174 |
|
175 |
|
176 |
|
177 | <a name="4.1.1"></a>
|
178 | ## [4.1.1](https://github.com/simple-statistics/simple-statistics/compare/v4.1.0...v4.1.1) (2017-08-05)
|
179 |
|
180 |
|
181 | ### Bug Fixes
|
182 |
|
183 | * expose BayesianClassifier & PerceptronModel instead of bayesian and perceptron ([1d03671](https://github.com/simple-statistics/simple-statistics/commit/1d03671))
|
184 |
|
185 |
|
186 |
|
187 | <a name="4.1.0"></a>
|
188 | # [4.1.0](https://github.com/simple-statistics/simple-statistics/compare/v4.0.0...v4.1.0) (2017-04-27)
|
189 |
|
190 |
|
191 | ### Features
|
192 |
|
193 | * sampleKurtosis ([1d9eec2](https://github.com/simple-statistics/simple-statistics/commit/1d9eec2))
|
194 |
|
195 |
|
196 |
|
197 | <a name="4.0.0"></a>
|
198 | # [4.0.0](https://github.com/simple-statistics/simple-statistics/compare/v3.0.0...v4.0.0) (2017-04-25)
|
199 |
|
200 |
|
201 | ### Bug Fixes
|
202 |
|
203 | * Remove mixin method ([#215](https://github.com/simple-statistics/simple-statistics/issues/215)) ([85036e2](https://github.com/simple-statistics/simple-statistics/commit/85036e2)), closes [#211](https://github.com/simple-statistics/simple-statistics/issues/211)
|
204 |
|
205 |
|
206 | ### Performance Improvements
|
207 |
|
208 | * **binomialDistribution:** avoid expensive factorial calculations ([#205](https://github.com/simple-statistics/simple-statistics/issues/205)) ([525f9c0](https://github.com/simple-statistics/simple-statistics/commit/525f9c0))
|
209 | * **core:** Improve performance of min, max, sumNthPowerDeviations, variance, sampleVariance ([#195](https://github.com/simple-statistics/simple-statistics/issues/195)) ([9d2569a](https://github.com/simple-statistics/simple-statistics/commit/9d2569a))
|
210 | * **distributions:** return array instead of object ([#209](https://github.com/simple-statistics/simple-statistics/issues/209)) ([6c5df5f](https://github.com/simple-statistics/simple-statistics/commit/6c5df5f))
|
211 | * **poissonDistribution:** avoid expensive factorial calculation ([#206](https://github.com/simple-statistics/simple-statistics/issues/206)) ([b34aceb](https://github.com/simple-statistics/simple-statistics/commit/b34aceb))
|
212 | * **poissonDistribution:** use Math.exp instead of Math.pow ([#208](https://github.com/simple-statistics/simple-statistics/issues/208)) ([6491dfa](https://github.com/simple-statistics/simple-statistics/commit/6491dfa))
|
213 | * **sampleSkewness:** Improve sampleSkewness performance ([#197](https://github.com/simple-statistics/simple-statistics/issues/197)) ([03d37eb](https://github.com/simple-statistics/simple-statistics/commit/03d37eb))
|
214 | * **sum:** Switch from Kahan to Kahan-Babuska algorithm ([1b42d7f](https://github.com/simple-statistics/simple-statistics/commit/1b42d7f))
|
215 |
|
216 |
|
217 | ### BREAKING CHANGES
|
218 |
|
219 | * Removes .mixin(). Instead use simple-statistics in a functional style.
|
220 | * **distributions:** The return value of bernoulliDistribution, binomialDistribution, and poissonDistribution is no longer an Object with number keys, it is now an Array of numbers.
|
221 |
|
222 |
|
223 |
|
224 | <a name="3.0.0"></a>
|
225 | # [3.0.0](https://github.com/simple-statistics/simple-statistics/compare/v2.5.0...v3.0.0) (2017-04-06)
|
226 |
|
227 | **Breaking change**: before this release, simple-statistics would return `NaN`
|
228 | when provided with invalid input. After 3.0.0, simple-statistics will throw
|
229 | exceptions when provided with invalid input. If you previously used `isNaN` to
|
230 | test for these error cases, switch to using `try` and `catch`, or make sure
|
231 | that valid input is given to simple-statistics.
|
232 |
|
233 | ### Features
|
234 |
|
235 | * **mean:** combineMeans, a method for combining calculated means ([d9e3ebc](https://github.com/simple-statistics/simple-statistics/commit/d9e3ebc))
|
236 | * **mean:** subtractFromMean, a method to remove a value from the mean ([afe76e9](https://github.com/simple-statistics/simple-statistics/commit/afe76e9))
|
237 | * **variance:** combineVariances, a method for combining pre-calculated variances of two dataset ([68133f7](https://github.com/simple-statistics/simple-statistics/commit/68133f7))
|
238 |
|
239 |
|
240 |
|
241 | <a name="2.5.0"></a>
|
242 | # [2.5.0](https://github.com/simple-statistics/simple-statistics/compare/v2.4.0...v2.5.0) (2017-02-24)
|
243 |
|
244 |
|
245 | ### Features
|
246 |
|
247 | * **mean:** addToMean, a method to update an mean with a new element ([b6637b4](https://github.com/simple-statistics/simple-statistics/commit/b6637b4))
|
248 |
|
249 |
|
250 |
|
251 | <a name="2.4.0"></a>
|
252 | # [2.4.0](https://github.com/simple-statistics/simple-statistics/compare/v2.3.0...v2.4.0) (2017-02-22)
|
253 |
|
254 |
|
255 | ### Bug Fixes
|
256 |
|
257 | * **build:** Ignore conventional-changelog-core for Flow ([4874868](https://github.com/simple-statistics/simple-statistics/commit/4874868))
|
258 |
|
259 | ### Features
|
260 |
|
261 | * **mode:** Implement modeFast, an indexed mode implementation (#183) ([59b7191](https://github.com/simple-statistics/simple-statistics/commit/59b7191))
|
262 |
|
263 |
|
264 |
|
265 | <a name="2.3.0"></a>
|
266 | # [2.3.0](https://github.com/simple-statistics/simple-statistics/compare/v2.2.0...v2.3.0) (2017-02-17)
|
267 |
|
268 |
|
269 | ### Features
|
270 |
|
271 | * **core:** sampleWithReplacement (#174) ([a8d05d1](https://github.com/simple-statistics/simple-statistics/commit/a8d05d1))
|
272 |
|
273 |
|
274 |
|
275 | # CHANGELOG
|
276 |
|
277 | ## 2.2.0
|
278 |
|
279 | * Improved [Ckmeans](https://github.com/simple-statistics/simple-statistics/pull/163) algorithm
|
280 | from the [updated R project](https://cran.r-project.org/web/packages/Ckmeans.1d.dp/NEWS)
|
281 | that dramatically increases performance.
|
282 | * Adds `permutationHeap` method for computing all permutations of an array.
|
283 | * Adds `combinations` for combinations without replacement
|
284 | * Adds `combinationsReplacement` for combinations with replacement
|
285 |
|
286 | ## 2.1.0
|
287 |
|
288 | * Adds `bisect` method that implements the [bisection method](https://en.wikipedia.org/wiki/Bisection_method)
|
289 | for root-finding. Thanks [Jamie Neubert Pedersen](https://github.com/eikooc)
|
290 | for the contribution!
|
291 |
|
292 | ## 2.0.0
|
293 |
|
294 | New features:
|
295 |
|
296 | * `product`: returns the product of a series of numbers
|
297 | * `medianSorted`: exposes the internal method of `median`
|
298 | that only operates on sorted arrays and works in constant time
|
299 | * `modeSorted`: exposes the internal method of `mode` and works
|
300 | in linear time.
|
301 |
|
302 | Specifications:
|
303 |
|
304 | * Adds [Flow](http://flowtype.org/) annotations to all methods, allowing
|
305 | up-front typechecking if you use Flow in your application.
|
306 |
|
307 | Changes:
|
308 |
|
309 | * Invalid input now uniformly produces the value `NaN` instead
|
310 | of previously a mix of `null` and `undefined`.
|
311 | * The method `sortedUniqueCount` is now called `uniqueCountSorted` to
|
312 | match the other sorted methods, `medianSorted` and `modeSorted`
|
313 |
|
314 | Fixes:
|
315 |
|
316 | * `equalIntervalBreaks` was not exported by `index.js`, and now is.
|
317 |
|
318 | ## 1.0.1
|
319 |
|
320 | Fixes:
|
321 |
|
322 | * Fixes to ckmeans algorithm (thanks to @llimllib) (#125)
|
323 |
|
324 | Housekeeping:
|
325 |
|
326 | * Add keywords to package. Fixes #120
|
327 | * Standardize indentation, add example for epsilon
|
328 | * Browser testing with Sauce Labs
|
329 |
|
330 | Bundle size optimizations:
|
331 |
|
332 | * Add external sourcemaps for minified and unminified standalone bundles
|
333 | * Use bundle-collapser for smaller bundles
|
334 | * Indicate numericSort as an internal method.
|
335 |
|
336 | ## 1.0.0
|
337 |
|
338 | ### Breaking Changes
|
339 |
|
340 | * Removed the .m() and .b() shortcuts from the linear regression
|
341 | class. Use `.mb().b` and `.mb().m` instead.
|
342 | * linearRegression is now a function, and linearRegressionLine is a separate
|
343 | function.
|
344 |
|
345 | **UPGRADING**
|
346 |
|
347 | #### Linear Regression
|
348 |
|
349 | Before:
|
350 |
|
351 | ```js
|
352 | var l = ss.linear_regression().data([[0, 0], [1, 1]]);
|
353 | l.line()(0); // 0
|
354 | ```
|
355 |
|
356 | After:
|
357 |
|
358 | ```js
|
359 | var line = ss.linearRegressionLine(ss.linearRegression([[0, 0], [1, 1]]));
|
360 | line(0); // 0
|
361 | ```
|
362 |
|
363 | #### Jenks -> ckmeans
|
364 |
|
365 | The implementation of Jenks natural breaks was removed: an implementation
|
366 | of Ckmeans, an improvement on its technique, is added. Ckmeans should
|
367 | work better for nearly all Jenks usecases.
|
368 |
|
369 | Before:
|
370 |
|
371 | ```js
|
372 | ss.jenks([1, 2, 4, 5, 7, 9, 10, 20], 3) //= [1, 7, 20, 20]
|
373 | ```
|
374 |
|
375 | After:
|
376 |
|
377 | ```js
|
378 | ss.ckmeans([1, 2, 4, 5, 7, 9, 10, 20], 3))
|
379 |
|
380 | [ [ 1,
|
381 | 2,
|
382 | 4,
|
383 | 5,
|
384 | 7,
|
385 | 9 ],
|
386 | [ 10 ],
|
387 | [ 20 ] ]
|
388 | ```
|
389 |
|
390 | Instead of class breaks, ckmeans returns clustered data. Class breaks
|
391 | can be derived by taking the first value from each cluster:
|
392 |
|
393 | ```js
|
394 | var breaks = ss.ckmeans([1, 2, 4, 5, 7, 9, 10, 20], 3)).map(function(cluster) {
|
395 | return cluster[0];
|
396 | });
|
397 | ```
|
398 |
|
399 | * `BayesModel` is now a class
|
400 | * `PerceptronModel` is now a class, and the `weights` and `bias` members
|
401 | are accessable as properties rather than methods.
|
402 | * All multi-word method names are now camelCase rather than underscore_cased:
|
403 | this means that a method like `ss.r_squared` is now accessible as `ss.rSquared`
|
404 |
|
405 | ### New Features
|
406 |
|
407 | * Ckmeans replaces Jenks
|
408 | * `sortedUniqueCount` provides an extremely fast method for counting
|
409 | unique values of sorted arrays.
|
410 | * `sumNthPowerDeviations` is now exposed, providing a simple way to calculate
|
411 | the fundamental aspect of measures like variance and skewness.
|
412 |
|
413 | ### Non-Breaking Changes
|
414 |
|
415 | * JSDoc documentation throughout
|
416 | * Each function is now its own file, and simple-statistics
|
417 | is assembled with CommonJS-style require() statements. simple-statistics can
|
418 | still be used in a browser with browserify.
|
419 | * The standard normal table is now calculated using the cumulative distribution
|
420 | function, rather than hardcoded.
|
421 |
|
422 | ## 0.9.2
|
423 |
|
424 | * Improved test coverage
|
425 | * Switched linting from JSHint to [eslint](http://eslint.org/) and fixed
|
426 | style issues this uncovered.
|
427 |
|
428 | ## 0.9.1
|
429 |
|
430 | * Fixes `.jenks` corner cases.
|
431 |
|
432 | ## 0.9.0
|
433 |
|
434 | * Adds `.sample` for simple random sampling
|
435 | * Adds `.shuffle` and `.shuffleInPlace` for random permutations
|
436 | * Adds `.chunk` for splitting arrays into chunked subsets
|
437 |
|
438 | ## 0.8.1
|
439 |
|
440 | * fixes a bug in `mode` that favored the last new number
|
441 |
|
442 | ## 0.8.0
|
443 |
|
444 | * `mixin` can now take an array in order to mixin functions into a single array
|
445 | instance rather than the global Array prototype.
|
446 |
|
447 | ## 0.7.0
|
448 |
|
449 | * Adds `simple_statistics.harmonicMean` thanks to [jseppi](https://github.com/jseppi)
|
450 |
|
451 | ## 0.6.0
|
452 |
|
453 | * Adds `simple_statistics.quantileSorted` thanks to [rluta](http://github.com/rluta)
|
454 | * `simple_statistics.quantile` now accepts a sorted list of quantiles as a second argument
|
455 | * Improved test coverage
|
456 |
|
457 | ## 0.5.0
|
458 |
|
459 | * Adds `simple_statistics.cumulativeStdNormalProbability` by [doronlinder](https://github.com/doronlinder)
|
460 | * Adds `simple_statistics.zScore` by doronlinder
|
461 | * Adds `simple_statistics.standardNormalTable`
|
462 |
|
463 | ## 0.4.0
|
464 |
|
465 | * Adds `simple_statistics.median_absolute_deviation()` by siculars
|
466 | * Adds `simple_statistics.iqr()` by siculars
|
467 | * Adds `simple_statistics.skewness()` by Doron Linder
|
468 | * Lower-level accessors for linear regression allow users to do the line
|
469 | equation themselves
|
470 |
|
471 | ## 0.3.0
|
472 |
|
473 | * Adds `simple_statistics.jenks()`
|
474 | * Adds `simple_statistics.jenksMatrices()`
|
475 | * Improves test coverage and validation
|
476 |
|
477 | ## 0.2.0
|
478 |
|
479 | * Adds `simple_statistics.quantile()`
|
480 | * Adds `simple_statistics.mixin()`
|
481 | * Adds `simple_statistics.geometricMean()`
|
482 | * Adds `simple_statistics.sampleVariance()`
|
483 | * Adds `simple_statistics.sampleCovariance()`
|
484 |
|
485 | ## 0.1.0
|
486 |
|
487 | * Adds `simple_statistics.tTest()`
|
488 | * Adds `simple_statistics.min()`
|
489 | * Adds `simple_statistics.max()`
|