UNPKG

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