simple-statistics
Advanced tools
Changelog
1.0.0
.mb().b
and .mb().m
instead.UPGRADING
Before:
var l = ss.linear_regression().data([[0, 0], [1, 1]]);
l.line()(0); // 0
After:
var line = ss.linearRegressionLine(ss.linearRegression([[0, 0], [1, 1]]));
line(0); // 0
The implementation of Jenks natural breaks was removed: an implementation of Ckmeans, an improvement on its technique, is added. Ckmeans should work better for nearly all Jenks usecases.
Before:
ss.jenks([1, 2, 4, 5, 7, 9, 10, 20], 3) //= [1, 7, 20, 20]
After:
ss.ckmeans([1, 2, 4, 5, 7, 9, 10, 20], 3))
[ [ 1,
2,
4,
5,
7,
9 ],
[ 10 ],
[ 20 ] ]
Instead of class breaks, ckmeans returns clustered data. Class breaks can be derived by taking the first value from each cluster:
var breaks = ss.ckmeans([1, 2, 4, 5, 7, 9, 10, 20], 3)).map(function(cluster) {
return cluster[0];
});
BayesModel
is now a classPerceptronModel
is now a class, and the weights
and bias
members
are accessable as properties rather than methods.ss.r_squared
is now accessible as ss.rSquared
sortedUniqueCount
provides an extremely fast method for counting
unique values of sorted arrays.sumNthPowerDeviations
is now exposed, providing a simple way to calculate
the fundamental aspect of measures like variance and skewness.Changelog
0.9.0
.sample
for simple random sampling.shuffle
and .shuffleInPlace
for random permutations.chunk
for splitting arrays into chunked subsetsChangelog
0.8.0
mixin
can now take an array in order to mixin functions into a single array
instance rather than the global Array prototype.Changelog
0.5.0
simple_statistics.cumulativeStdNormalProbability
by doronlindersimple_statistics.zScore
by doronlindersimple_statistics.standardNormalTable