@danielsimonjr/mathts-statistics 0.3.53 → 0.4.0
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.
- package/README.md +30 -21
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -387
- package/package.json +18 -8
package/README.md
CHANGED
|
@@ -19,26 +19,35 @@ npm install @danielsimonjr/mathts-statistics
|
|
|
19
19
|
|
|
20
20
|
## What's included
|
|
21
21
|
|
|
22
|
-
- **Descriptive statistics** — `mean`, `median`, `mode`, `variance`, `std`, `quantileSeq`, `mad
|
|
23
|
-
`iqr`, `sem`, `zscore`, `moment`, `skewness`, `kurtosis`, `gmean`,
|
|
24
|
-
`
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- **
|
|
34
|
-
`
|
|
35
|
-
`
|
|
36
|
-
|
|
37
|
-
`
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
`
|
|
41
|
-
`
|
|
22
|
+
- **Descriptive statistics** — `mean`, `median`, `mode`, `variance`, `std`, `quantileSeq`, `mad`
|
|
23
|
+
(median absolute deviation), `iqr`, `sem`, `zscore`, `moment`, `skewness`, `kurtosis`, `gmean`,
|
|
24
|
+
`hmean`, `cov`, `corr`, `corrcoef`, `rankdata`, `ptp`, `trimmedMean`, `variation`, `describe`,
|
|
25
|
+
`logsumexp`, `softmax`, `detrend`, `movingAverage`, `ewma`, `acf`, and the correlation helpers
|
|
26
|
+
`pearsonr`, `spearman`, `spearmanr`, `kendalltau` / `kendallTau`.
|
|
27
|
+
- **Parallel reductions** — `parallelStat*` helpers mirror the typed reductions on `Float64Array`;
|
|
28
|
+
most op thresholds in `ComputePool` are `'never'` today (inline JS), but the API stays
|
|
29
|
+
`async`-friendly where the typed layer returns a `Promise`. Factory `mad` is **median**
|
|
30
|
+
absolute deviation; `parallelStatMAD` / `parallelStatMeanAD` are **mean** absolute deviation
|
|
31
|
+
from the mean (not the same statistic). `quickSelect` / `medianSelect` / `minSelect` /
|
|
32
|
+
`maxSelect` are synchronous selection utilities.
|
|
33
|
+
- **Regression & resampling** — `linearRegression`, `polyFit`, `linregress`, `pearsonr`,
|
|
34
|
+
`spearman`, `spearmanr`, `kendalltau`, `meanCI`, `proportionCI`, `bootstrapCI`,
|
|
35
|
+
`permutationTest`, `mahalanobis`, `hotellingT2`, `kmeans`, `spectralClustering`.
|
|
36
|
+
- **Probability distributions** — distribution objects with `.pdf/.cdf/.quantile/.mean/.variance/.sample`
|
|
37
|
+
(`normalDist`, `gammaDist`, `betaDist`, `binomialDist`, `poissonDist`, `exponentialDist`,
|
|
38
|
+
`chiSquaredDist`, `fDist`, `tDist`, `logNormalDist`, `uniformDist`, `weibullDist`,
|
|
39
|
+
`hypergeometricDist`, `negativeBinomialDist`, `paretoDist`, `rayleighDist`, `triangularDist`,
|
|
40
|
+
`discreteUniformDist`, `gumbelDist`, `invGaussDist`, `multivariateNormal`), plus free CDF/quantile
|
|
41
|
+
functions, `studentizedRangeCDF` / `studentizedRangeQuantile`, and `entropy` / `jsDivergence`.
|
|
42
|
+
- **Hypothesis tests** — `studentTTest` (one/two-sample), `studentTTestPaired`, `anova`, `anova2`,
|
|
43
|
+
`chiSquareTest`, `kolmogorovSmirnovTest` + `kolmogorovSmirnov2Test`, `mannWhitneyTest`,
|
|
44
|
+
`shapiroWilkTest`, `leveneTest`, `bartlettTest`, `proportionZTest`, `binomialTest`, `fTest`,
|
|
45
|
+
`jarqueBera`, `kruskalWallis`, `wilcoxon`, `fisherExact`, `tukeyHSD`, `andersonDarlingTest`,
|
|
46
|
+
`dagostinoTest`, `friedmanTest`, `multipleComparison`, `principalComponentAnalysis`.
|
|
47
|
+
- **Probability & combinatorics** — `combinations`, `combinationsWithRep`, `permutations`,
|
|
48
|
+
`multinomial`, `factorial`, `doubleFactorial`, `risingFactorial`, `fallingFactorial`,
|
|
49
|
+
`subfactorial`, `bernoulli`, `gamma`, `lgamma`, `kldivergence`, and seedable RNG (`random`,
|
|
50
|
+
`randomInt`, `pickRandom`, `seedProbabilityRng`).
|
|
42
51
|
|
|
43
52
|
## Example
|
|
44
53
|
|
|
@@ -55,7 +64,7 @@ anova([
|
|
|
55
64
|
[9.1, 9.5, 8.9],
|
|
56
65
|
]); // one-way ANOVA F + p
|
|
57
66
|
kendallTau([1, 2, 3, 4, 5], [2, 1, 4, 3, 5]); // 0.6
|
|
58
|
-
hypergeometricDist(50, 5, 10).
|
|
67
|
+
hypergeometricDist(50, 5, 10).pdf(1); // 0.4313371972
|
|
59
68
|
kolmogorovSmirnov2Test([1, 2, 3], [2, 3, 4]); // { statistic, pValue }
|
|
60
69
|
```
|
|
61
70
|
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @packageDocumentation
|
|
14
14
|
*/
|
|
15
15
|
export { mean, median, mode, variance, std, quantileSeq, mad, corr, cumsum, sum, prod, min, max, rankdata, spearman, kendallTau, gmean, hmean, moment, skewness, kurtosis, iqr, sem, zscore, cov, corrcoef, } from '@danielsimonjr/mathts-functions';
|
|
16
|
-
export { parallelStatSum, parallelStatMean, parallelStatVariance, parallelStatStd, parallelStatMin, parallelStatMax, parallelStatMinMax, parallelStatMedian, parallelStatMode, parallelStatProd, parallelStatNorm, parallelStatDistance, parallelStatCorr, parallelStatMAD, parallelStatCumsum, parallelStatQuantile, parallelStatPercentile, parallelStatHistogram, quickSelect, medianSelect, minSelect, maxSelect, typedStatistics, } from '@danielsimonjr/mathts-functions';
|
|
16
|
+
export { parallelStatSum, parallelStatMean, parallelStatVariance, parallelStatStd, parallelStatMin, parallelStatMax, parallelStatMinMax, parallelStatMedian, parallelStatMode, parallelStatProd, parallelStatNorm, parallelStatDistance, parallelStatCorr, parallelStatMAD, parallelStatMeanAD, parallelStatCumsum, parallelStatQuantile, parallelStatPercentile, parallelStatHistogram, quickSelect, medianSelect, minSelect, maxSelect, typedStatistics, } from '@danielsimonjr/mathts-functions';
|
|
17
17
|
export { normalDist, betaDist, binomialDist, chiSquaredDist, exponentialDist, fDist, gammaDist, logNormalDist, poissonDist, tDist, uniformDist, weibullDist, hypergeometricDist, negativeBinomialDist, DIST_WORKER_THRESHOLD, normalPDF, normalCDF, exponentialPDF, exponentialCDF, poissonPMF, binomialPMF, geometricPMF, bernoulliPMF, betaPDF, gammaPDF, studentTPDF, noncentralChi2PDF, entropy, jsDivergence, typedDistributions, normalQuantile, studentTCDF, studentTQuantile, chiSquaredCDF, chiSquaredQuantile, fCDF, fQuantile, gammaCDF, gammaQuantile, betaCDF, betaQuantile, cauchyPDF, cauchyCDF, cauchyQuantile, laplacePDF, laplaceCDF, laplaceQuantile, logisticPDF, logisticCDF, logisticQuantile, } from '@danielsimonjr/mathts-functions';
|
|
18
18
|
export type { Distribution, SampleNOptions } from '@danielsimonjr/mathts-functions';
|
|
19
19
|
export { studentTTest, studentTTestPaired, chiSquareTest, anova, kolmogorovSmirnovTest, kolmogorovSmirnov2Test, mannWhitneyTest, shapiroWilkTest, leveneTest, bartlettTest, proportionZTest, binomialTest, principalComponentAnalysis, fTest, jarqueBera, kruskalWallis, wilcoxon, fisherExact, studentizedRangeCDF, studentizedRangeQuantile, tukeyHSD, } from '@danielsimonjr/mathts-functions';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,WAAW,EACX,GAAG,EACH,IAAI,EACJ,MAAM,EACN,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,EAEH,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QA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iC,CAAC;AAKhF,OAAO,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,EACX,WAAW,GACZ,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAChB,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,WAAW,EACX,GAAG,EACH,IAAI,EACJ,MAAM,EACN,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,EAEH,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,KAAK,EACL,KAAK,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,GAAG,EACH,MAAM,EACN,GAAG,EACH,QAAQ,GACT,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,SAAS,EACT,eAAe,GAChB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,KAAK,EACL,SAAS,EACT,aAAa,EACb,WAAW,EACX,KAAK,EACL,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EAErB,SAAS,EACT,SAAS,EACT,cAAc,EACd,cAAc,EACd,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;AAKzC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,GAAG,EACH,SAAS,EACT,WAAW,EACX,QAAQ,EACR,SAAS,GACV,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,eAAe,GAChB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,MAAM,EACN,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,GACb,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EACL,UAAU,EACV,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAKhF,OAAO,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,EACX,WAAW,GACZ,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAChB,MAAM,iCAAiC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,387 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
mean,
|
|
4
|
-
median,
|
|
5
|
-
mode,
|
|
6
|
-
variance,
|
|
7
|
-
std,
|
|
8
|
-
quantileSeq,
|
|
9
|
-
mad,
|
|
10
|
-
corr,
|
|
11
|
-
cumsum,
|
|
12
|
-
sum,
|
|
13
|
-
prod,
|
|
14
|
-
min,
|
|
15
|
-
max,
|
|
16
|
-
rankdata,
|
|
17
|
-
spearman,
|
|
18
|
-
kendallTau,
|
|
19
|
-
gmean,
|
|
20
|
-
hmean,
|
|
21
|
-
moment,
|
|
22
|
-
skewness,
|
|
23
|
-
kurtosis,
|
|
24
|
-
iqr,
|
|
25
|
-
sem,
|
|
26
|
-
zscore,
|
|
27
|
-
cov,
|
|
28
|
-
corrcoef
|
|
29
|
-
} from "@danielsimonjr/mathts-functions";
|
|
30
|
-
import {
|
|
31
|
-
parallelStatSum,
|
|
32
|
-
parallelStatMean,
|
|
33
|
-
parallelStatVariance,
|
|
34
|
-
parallelStatStd,
|
|
35
|
-
parallelStatMin,
|
|
36
|
-
parallelStatMax,
|
|
37
|
-
parallelStatMinMax,
|
|
38
|
-
parallelStatMedian,
|
|
39
|
-
parallelStatMode,
|
|
40
|
-
parallelStatProd,
|
|
41
|
-
parallelStatNorm,
|
|
42
|
-
parallelStatDistance,
|
|
43
|
-
parallelStatCorr,
|
|
44
|
-
parallelStatMAD,
|
|
45
|
-
parallelStatCumsum,
|
|
46
|
-
parallelStatQuantile,
|
|
47
|
-
parallelStatPercentile,
|
|
48
|
-
parallelStatHistogram,
|
|
49
|
-
quickSelect,
|
|
50
|
-
medianSelect,
|
|
51
|
-
minSelect,
|
|
52
|
-
maxSelect,
|
|
53
|
-
typedStatistics
|
|
54
|
-
} from "@danielsimonjr/mathts-functions";
|
|
55
|
-
import {
|
|
56
|
-
normalDist,
|
|
57
|
-
betaDist,
|
|
58
|
-
binomialDist,
|
|
59
|
-
chiSquaredDist,
|
|
60
|
-
exponentialDist,
|
|
61
|
-
fDist,
|
|
62
|
-
gammaDist,
|
|
63
|
-
logNormalDist,
|
|
64
|
-
poissonDist,
|
|
65
|
-
tDist,
|
|
66
|
-
uniformDist,
|
|
67
|
-
weibullDist,
|
|
68
|
-
hypergeometricDist,
|
|
69
|
-
negativeBinomialDist,
|
|
70
|
-
DIST_WORKER_THRESHOLD,
|
|
71
|
-
normalPDF,
|
|
72
|
-
normalCDF,
|
|
73
|
-
exponentialPDF,
|
|
74
|
-
exponentialCDF,
|
|
75
|
-
poissonPMF,
|
|
76
|
-
binomialPMF,
|
|
77
|
-
geometricPMF,
|
|
78
|
-
bernoulliPMF,
|
|
79
|
-
betaPDF,
|
|
80
|
-
gammaPDF,
|
|
81
|
-
studentTPDF,
|
|
82
|
-
noncentralChi2PDF,
|
|
83
|
-
entropy,
|
|
84
|
-
jsDivergence,
|
|
85
|
-
typedDistributions,
|
|
86
|
-
normalQuantile,
|
|
87
|
-
studentTCDF,
|
|
88
|
-
studentTQuantile,
|
|
89
|
-
chiSquaredCDF,
|
|
90
|
-
chiSquaredQuantile,
|
|
91
|
-
fCDF,
|
|
92
|
-
fQuantile,
|
|
93
|
-
gammaCDF,
|
|
94
|
-
gammaQuantile,
|
|
95
|
-
betaCDF,
|
|
96
|
-
betaQuantile,
|
|
97
|
-
cauchyPDF,
|
|
98
|
-
cauchyCDF,
|
|
99
|
-
cauchyQuantile,
|
|
100
|
-
laplacePDF,
|
|
101
|
-
laplaceCDF,
|
|
102
|
-
laplaceQuantile,
|
|
103
|
-
logisticPDF,
|
|
104
|
-
logisticCDF,
|
|
105
|
-
logisticQuantile
|
|
106
|
-
} from "@danielsimonjr/mathts-functions";
|
|
107
|
-
import {
|
|
108
|
-
studentTTest,
|
|
109
|
-
studentTTestPaired,
|
|
110
|
-
chiSquareTest,
|
|
111
|
-
anova,
|
|
112
|
-
kolmogorovSmirnovTest,
|
|
113
|
-
kolmogorovSmirnov2Test,
|
|
114
|
-
mannWhitneyTest,
|
|
115
|
-
shapiroWilkTest,
|
|
116
|
-
leveneTest,
|
|
117
|
-
bartlettTest,
|
|
118
|
-
proportionZTest,
|
|
119
|
-
binomialTest,
|
|
120
|
-
principalComponentAnalysis,
|
|
121
|
-
fTest,
|
|
122
|
-
jarqueBera,
|
|
123
|
-
kruskalWallis,
|
|
124
|
-
wilcoxon,
|
|
125
|
-
fisherExact,
|
|
126
|
-
studentizedRangeCDF,
|
|
127
|
-
studentizedRangeQuantile,
|
|
128
|
-
tukeyHSD
|
|
129
|
-
} from "@danielsimonjr/mathts-functions";
|
|
130
|
-
import {
|
|
131
|
-
combinations,
|
|
132
|
-
combinationsWithRep,
|
|
133
|
-
permutations,
|
|
134
|
-
multinomial,
|
|
135
|
-
factorial,
|
|
136
|
-
doubleFactorial,
|
|
137
|
-
risingFactorial,
|
|
138
|
-
fallingFactorial,
|
|
139
|
-
subfactorial,
|
|
140
|
-
bernoulli,
|
|
141
|
-
gamma,
|
|
142
|
-
lgamma,
|
|
143
|
-
kldivergence,
|
|
144
|
-
random,
|
|
145
|
-
randomInt,
|
|
146
|
-
pickRandom,
|
|
147
|
-
seedProbabilityRng,
|
|
148
|
-
typedProbability
|
|
149
|
-
} from "@danielsimonjr/mathts-functions";
|
|
150
|
-
import {
|
|
151
|
-
linearRegression,
|
|
152
|
-
polyFit,
|
|
153
|
-
cummax,
|
|
154
|
-
cummin,
|
|
155
|
-
cumprod,
|
|
156
|
-
cumtrapz,
|
|
157
|
-
trapzF64,
|
|
158
|
-
movingAverage,
|
|
159
|
-
ewma,
|
|
160
|
-
detrend,
|
|
161
|
-
acf,
|
|
162
|
-
logsumexp,
|
|
163
|
-
softmax,
|
|
164
|
-
kmeans,
|
|
165
|
-
spectralClustering,
|
|
166
|
-
beta,
|
|
167
|
-
digamma
|
|
168
|
-
} from "@danielsimonjr/mathts-functions";
|
|
169
|
-
import {
|
|
170
|
-
linregress,
|
|
171
|
-
pearsonr,
|
|
172
|
-
spearmanr,
|
|
173
|
-
kendalltau,
|
|
174
|
-
ptp,
|
|
175
|
-
variation,
|
|
176
|
-
trimmedMean,
|
|
177
|
-
describe,
|
|
178
|
-
histogram
|
|
179
|
-
} from "@danielsimonjr/mathts-functions";
|
|
180
|
-
import {
|
|
181
|
-
andersonDarlingTest,
|
|
182
|
-
dagostinoTest,
|
|
183
|
-
friedmanTest,
|
|
184
|
-
anova2,
|
|
185
|
-
multipleComparison
|
|
186
|
-
} from "@danielsimonjr/mathts-functions";
|
|
187
|
-
import {
|
|
188
|
-
paretoDist,
|
|
189
|
-
rayleighDist,
|
|
190
|
-
triangularDist,
|
|
191
|
-
discreteUniformDist,
|
|
192
|
-
gumbelDist,
|
|
193
|
-
invGaussDist,
|
|
194
|
-
multivariateNormal
|
|
195
|
-
} from "@danielsimonjr/mathts-functions";
|
|
196
|
-
import {
|
|
197
|
-
meanCI,
|
|
198
|
-
proportionCI,
|
|
199
|
-
bootstrapCI,
|
|
200
|
-
permutationTest,
|
|
201
|
-
mahalanobis,
|
|
202
|
-
hotellingT2
|
|
203
|
-
} from "@danielsimonjr/mathts-functions";
|
|
204
|
-
export {
|
|
205
|
-
DIST_WORKER_THRESHOLD,
|
|
206
|
-
acf,
|
|
207
|
-
andersonDarlingTest,
|
|
208
|
-
anova,
|
|
209
|
-
anova2,
|
|
210
|
-
bartlettTest,
|
|
211
|
-
bernoulli,
|
|
212
|
-
bernoulliPMF,
|
|
213
|
-
beta,
|
|
214
|
-
betaCDF,
|
|
215
|
-
betaDist,
|
|
216
|
-
betaPDF,
|
|
217
|
-
betaQuantile,
|
|
218
|
-
binomialDist,
|
|
219
|
-
binomialPMF,
|
|
220
|
-
binomialTest,
|
|
221
|
-
bootstrapCI,
|
|
222
|
-
cauchyCDF,
|
|
223
|
-
cauchyPDF,
|
|
224
|
-
cauchyQuantile,
|
|
225
|
-
chiSquareTest,
|
|
226
|
-
chiSquaredCDF,
|
|
227
|
-
chiSquaredDist,
|
|
228
|
-
chiSquaredQuantile,
|
|
229
|
-
combinations,
|
|
230
|
-
combinationsWithRep,
|
|
231
|
-
corr,
|
|
232
|
-
corrcoef,
|
|
233
|
-
cov,
|
|
234
|
-
cummax,
|
|
235
|
-
cummin,
|
|
236
|
-
cumprod,
|
|
237
|
-
cumsum,
|
|
238
|
-
cumtrapz,
|
|
239
|
-
dagostinoTest,
|
|
240
|
-
describe,
|
|
241
|
-
detrend,
|
|
242
|
-
digamma,
|
|
243
|
-
discreteUniformDist,
|
|
244
|
-
doubleFactorial,
|
|
245
|
-
entropy,
|
|
246
|
-
ewma,
|
|
247
|
-
exponentialCDF,
|
|
248
|
-
exponentialDist,
|
|
249
|
-
exponentialPDF,
|
|
250
|
-
fCDF,
|
|
251
|
-
fDist,
|
|
252
|
-
fQuantile,
|
|
253
|
-
fTest,
|
|
254
|
-
factorial,
|
|
255
|
-
fallingFactorial,
|
|
256
|
-
fisherExact,
|
|
257
|
-
friedmanTest,
|
|
258
|
-
gamma,
|
|
259
|
-
gammaCDF,
|
|
260
|
-
gammaDist,
|
|
261
|
-
gammaPDF,
|
|
262
|
-
gammaQuantile,
|
|
263
|
-
geometricPMF,
|
|
264
|
-
gmean,
|
|
265
|
-
gumbelDist,
|
|
266
|
-
histogram,
|
|
267
|
-
hmean,
|
|
268
|
-
hotellingT2,
|
|
269
|
-
hypergeometricDist,
|
|
270
|
-
invGaussDist,
|
|
271
|
-
iqr,
|
|
272
|
-
jarqueBera,
|
|
273
|
-
jsDivergence,
|
|
274
|
-
kendallTau,
|
|
275
|
-
kendalltau,
|
|
276
|
-
kldivergence,
|
|
277
|
-
kmeans,
|
|
278
|
-
kolmogorovSmirnov2Test,
|
|
279
|
-
kolmogorovSmirnovTest,
|
|
280
|
-
kruskalWallis,
|
|
281
|
-
kurtosis,
|
|
282
|
-
laplaceCDF,
|
|
283
|
-
laplacePDF,
|
|
284
|
-
laplaceQuantile,
|
|
285
|
-
leveneTest,
|
|
286
|
-
lgamma,
|
|
287
|
-
linearRegression,
|
|
288
|
-
linregress,
|
|
289
|
-
logNormalDist,
|
|
290
|
-
logisticCDF,
|
|
291
|
-
logisticPDF,
|
|
292
|
-
logisticQuantile,
|
|
293
|
-
logsumexp,
|
|
294
|
-
mad,
|
|
295
|
-
mahalanobis,
|
|
296
|
-
mannWhitneyTest,
|
|
297
|
-
max,
|
|
298
|
-
maxSelect,
|
|
299
|
-
mean,
|
|
300
|
-
meanCI,
|
|
301
|
-
median,
|
|
302
|
-
medianSelect,
|
|
303
|
-
min,
|
|
304
|
-
minSelect,
|
|
305
|
-
mode,
|
|
306
|
-
moment,
|
|
307
|
-
movingAverage,
|
|
308
|
-
multinomial,
|
|
309
|
-
multipleComparison,
|
|
310
|
-
multivariateNormal,
|
|
311
|
-
negativeBinomialDist,
|
|
312
|
-
noncentralChi2PDF,
|
|
313
|
-
normalCDF,
|
|
314
|
-
normalDist,
|
|
315
|
-
normalPDF,
|
|
316
|
-
normalQuantile,
|
|
317
|
-
parallelStatCorr,
|
|
318
|
-
parallelStatCumsum,
|
|
319
|
-
parallelStatDistance,
|
|
320
|
-
parallelStatHistogram,
|
|
321
|
-
parallelStatMAD,
|
|
322
|
-
parallelStatMax,
|
|
323
|
-
parallelStatMean,
|
|
324
|
-
parallelStatMedian,
|
|
325
|
-
parallelStatMin,
|
|
326
|
-
parallelStatMinMax,
|
|
327
|
-
parallelStatMode,
|
|
328
|
-
parallelStatNorm,
|
|
329
|
-
parallelStatPercentile,
|
|
330
|
-
parallelStatProd,
|
|
331
|
-
parallelStatQuantile,
|
|
332
|
-
parallelStatStd,
|
|
333
|
-
parallelStatSum,
|
|
334
|
-
parallelStatVariance,
|
|
335
|
-
paretoDist,
|
|
336
|
-
pearsonr,
|
|
337
|
-
permutationTest,
|
|
338
|
-
permutations,
|
|
339
|
-
pickRandom,
|
|
340
|
-
poissonDist,
|
|
341
|
-
poissonPMF,
|
|
342
|
-
polyFit,
|
|
343
|
-
principalComponentAnalysis,
|
|
344
|
-
prod,
|
|
345
|
-
proportionCI,
|
|
346
|
-
proportionZTest,
|
|
347
|
-
ptp,
|
|
348
|
-
quantileSeq,
|
|
349
|
-
quickSelect,
|
|
350
|
-
random,
|
|
351
|
-
randomInt,
|
|
352
|
-
rankdata,
|
|
353
|
-
rayleighDist,
|
|
354
|
-
risingFactorial,
|
|
355
|
-
seedProbabilityRng,
|
|
356
|
-
sem,
|
|
357
|
-
shapiroWilkTest,
|
|
358
|
-
skewness,
|
|
359
|
-
softmax,
|
|
360
|
-
spearman,
|
|
361
|
-
spearmanr,
|
|
362
|
-
spectralClustering,
|
|
363
|
-
std,
|
|
364
|
-
studentTCDF,
|
|
365
|
-
studentTPDF,
|
|
366
|
-
studentTQuantile,
|
|
367
|
-
studentTTest,
|
|
368
|
-
studentTTestPaired,
|
|
369
|
-
studentizedRangeCDF,
|
|
370
|
-
studentizedRangeQuantile,
|
|
371
|
-
subfactorial,
|
|
372
|
-
sum,
|
|
373
|
-
tDist,
|
|
374
|
-
trapzF64,
|
|
375
|
-
triangularDist,
|
|
376
|
-
trimmedMean,
|
|
377
|
-
tukeyHSD,
|
|
378
|
-
typedDistributions,
|
|
379
|
-
typedProbability,
|
|
380
|
-
typedStatistics,
|
|
381
|
-
uniformDist,
|
|
382
|
-
variance,
|
|
383
|
-
variation,
|
|
384
|
-
weibullDist,
|
|
385
|
-
wilcoxon,
|
|
386
|
-
zscore
|
|
387
|
-
};
|
|
1
|
+
export { DIST_WORKER_THRESHOLD, acf, andersonDarlingTest, anova, anova2, bartlettTest, bernoulli, bernoulliPMF, beta, betaCDF, betaDist, betaPDF, betaQuantile, binomialDist, binomialPMF, binomialTest, bootstrapCI, cauchyCDF, cauchyPDF, cauchyQuantile, chiSquareTest, chiSquaredCDF, chiSquaredDist, chiSquaredQuantile, combinations, combinationsWithRep, corr, corrcoef, cov, cummax, cummin, cumprod, cumsum, cumtrapz, dagostinoTest, describe, detrend, digamma, discreteUniformDist, doubleFactorial, entropy, ewma, exponentialCDF, exponentialDist, exponentialPDF, fCDF, fDist, fQuantile, fTest, factorial, fallingFactorial, fisherExact, friedmanTest, gamma, gammaCDF, gammaDist, gammaPDF, gammaQuantile, geometricPMF, gmean, gumbelDist, histogram, hmean, hotellingT2, hypergeometricDist, invGaussDist, iqr, jarqueBera, jsDivergence, kendallTau, kendalltau, kldivergence, kmeans, kolmogorovSmirnov2Test, kolmogorovSmirnovTest, kruskalWallis, kurtosis, laplaceCDF, laplacePDF, laplaceQuantile, leveneTest, lgamma, linearRegression, linregress, logNormalDist, logisticCDF, logisticPDF, logisticQuantile, logsumexp, mad, mahalanobis, mannWhitneyTest, max, maxSelect, mean, meanCI, median, medianSelect, min, minSelect, mode, moment, movingAverage, multinomial, multipleComparison, multivariateNormal, negativeBinomialDist, noncentralChi2PDF, normalCDF, normalDist, normalPDF, normalQuantile, parallelStatCorr, parallelStatCumsum, parallelStatDistance, parallelStatHistogram, parallelStatMAD, parallelStatMax, parallelStatMean, parallelStatMeanAD, parallelStatMedian, parallelStatMin, parallelStatMinMax, parallelStatMode, parallelStatNorm, parallelStatPercentile, parallelStatProd, parallelStatQuantile, parallelStatStd, parallelStatSum, parallelStatVariance, paretoDist, pearsonr, permutationTest, permutations, pickRandom, poissonDist, poissonPMF, polyFit, principalComponentAnalysis, prod, proportionCI, proportionZTest, ptp, quantileSeq, quickSelect, random, randomInt, rankdata, rayleighDist, risingFactorial, seedProbabilityRng, sem, shapiroWilkTest, skewness, softmax, spearman, spearmanr, spectralClustering, std, studentTCDF, studentTPDF, studentTQuantile, studentTTest, studentTTestPaired, studentizedRangeCDF, studentizedRangeQuantile, subfactorial, sum, tDist, trapzF64, triangularDist, trimmedMean, tukeyHSD, typedDistributions, typedProbability, typedStatistics, uniformDist, variance, variation, weibullDist, wilcoxon, zscore } from "@danielsimonjr/mathts-functions";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/mathts-statistics",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Statistics & probability for MathTS
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Statistics & probability for MathTS — descriptive stats, distributions, hypothesis tests, and combinatorics, every function externally oracle-pinned (SciPy/NumPy/closed-form)",
|
|
5
5
|
"author": "Daniel Simon Jr.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "
|
|
23
|
-
"dev": "
|
|
22
|
+
"build": "tsdown src/index.ts --format esm && tsc -p tsconfig.dts.json",
|
|
23
|
+
"dev": "tsdown src/index.ts --format esm --watch --on-success \"tsc -p tsconfig.dts.json\"",
|
|
24
24
|
"test": "bun test",
|
|
25
25
|
"test:watch": "vitest",
|
|
26
26
|
"test:coverage": "bun test --coverage",
|
|
@@ -28,15 +28,25 @@
|
|
|
28
28
|
"lint": "oxlint src",
|
|
29
29
|
"lint:fix": "oxlint src --fix",
|
|
30
30
|
"clean": "rm -rf dist",
|
|
31
|
-
"build:prod": "
|
|
31
|
+
"build:prod": "tsdown src/index.ts --format esm --minify && tsc -p tsconfig.dts.json"
|
|
32
|
+
},
|
|
33
|
+
"tsdown": {
|
|
34
|
+
"fixedExtension": false,
|
|
35
|
+
"dts": false,
|
|
36
|
+
"outputOptions": {
|
|
37
|
+
"comments": {
|
|
38
|
+
"legal": true,
|
|
39
|
+
"annotation": true,
|
|
40
|
+
"jsdoc": false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
32
43
|
},
|
|
33
44
|
"dependencies": {
|
|
34
|
-
"@danielsimonjr/mathts-functions": "^0.
|
|
35
|
-
"typed-function": "^4.0.0"
|
|
45
|
+
"@danielsimonjr/mathts-functions": "^0.70.0"
|
|
36
46
|
},
|
|
37
47
|
"devDependencies": {
|
|
38
48
|
"@types/node": "^26.4.0",
|
|
39
|
-
"
|
|
49
|
+
"tsdown": "^0.23.0",
|
|
40
50
|
"typescript": "^7.0.2",
|
|
41
51
|
"vitest": "^5.0.0"
|
|
42
52
|
},
|