@danielsimonjr/mathts-functions 0.7.0 → 0.8.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/dist/cas-integration.d.ts.map +1 -1
- package/dist/clustering-extra.d.ts +4 -0
- package/dist/clustering-extra.d.ts.map +1 -1
- package/dist/descriptive-stats.d.ts +1 -1
- package/dist/descriptive-stats.d.ts.map +1 -1
- package/dist/geometry-extra.d.ts.map +1 -1
- package/dist/hypothesis-extra.d.ts.map +1 -1
- package/dist/index.js +128 -22
- package/dist/linalg-extra.d.ts.map +1 -1
- package/dist/numeric-extra.d.ts.map +1 -1
- package/dist/optimization-extra.d.ts.map +1 -1
- package/dist/regression-extra.d.ts.map +1 -1
- package/dist/signal-filter-extra.d.ts.map +1 -1
- package/dist/timeseries-extra.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cas-integration.d.ts","sourceRoot":"","sources":["../src/cas-integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cas-integration.d.ts","sourceRoot":"","sources":["../src/cas-integration.ts"],"names":[],"mappings":"AA2KA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,SAAM,GAAG,MAAM,CAOrE"}
|
|
@@ -2,6 +2,10 @@ export interface KMeansResult {
|
|
|
2
2
|
labels: number[];
|
|
3
3
|
centroids: number[][];
|
|
4
4
|
inertia: number;
|
|
5
|
+
/** Number of Lloyd iterations actually run. */
|
|
6
|
+
iterations: number;
|
|
7
|
+
/** True if the assignment stabilized before `maxIter` (false = hit the cap). */
|
|
8
|
+
converged: boolean;
|
|
5
9
|
}
|
|
6
10
|
/**
|
|
7
11
|
* k-means clustering (Lloyd's algorithm) of row-vectors `data` into `k` clusters.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clustering-extra.d.ts","sourceRoot":"","sources":["../src/clustering-extra.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"clustering-extra.d.ts","sourceRoot":"","sources":["../src/clustering-extra.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EACzB,CAAC,EAAE,MAAM,EACT,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,YAAY,CA2Dd;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,EAC9B,CAAC,EAAE,MAAM,EACT,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9B,MAAM,EAAE,CASV"}
|
|
@@ -6,7 +6,7 @@ type Vec = readonly number[] | Float64Array;
|
|
|
6
6
|
export declare function rankdata(x: Vec): number[];
|
|
7
7
|
/** Geometric mean: `exp(mean(ln x))` (stable form). All entries must be > 0. */
|
|
8
8
|
export declare function gmean(x: Vec): number;
|
|
9
|
-
/** Harmonic mean: `n / Σ(1/xᵢ)`. */
|
|
9
|
+
/** Harmonic mean: `n / Σ(1/xᵢ)`. All entries must be > 0. */
|
|
10
10
|
export declare function hmean(x: Vec): number;
|
|
11
11
|
/** Raw or central k-th moment. `central` (default true) subtracts the mean first. */
|
|
12
12
|
export declare function moment(x: Vec, k: number, central?: boolean): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptive-stats.d.ts","sourceRoot":"","sources":["../src/descriptive-stats.ts"],"names":[],"mappings":"AAsBA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAiB5C;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAazC;AAED,gFAAgF;AAChF,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"descriptive-stats.d.ts","sourceRoot":"","sources":["../src/descriptive-stats.ts"],"names":[],"mappings":"AAsBA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAiB5C;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAazC;AAED,gFAAgF;AAChF,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAKpC;AAED,6DAA6D;AAC7D,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAKpC;AAED,qFAAqF;AACrF,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,UAAO,GAAG,MAAM,CAOhE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAatE;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAaxF;AAED,wDAAwD;AACxD,wBAAgB,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAGlC;AAED,oDAAoD;AACpD,wBAAgB,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAIlC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAOvC;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,SAAI,GAAG,MAAM,GAAG,MAAM,EAAE,EAAE,CAgC/E;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAOvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry-extra.d.ts","sourceRoot":"","sources":["../src/geometry-extra.ts"],"names":[],"mappings":"AAQA,iEAAiE;AACjE,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,SAAkB,GACvB,MAAM,CAQR;AAED,KAAK,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,MAAM,EAAE,CAAC;AAClE,KAAK,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,MAAM,EAAE,CAAC;AAM1E;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"geometry-extra.d.ts","sourceRoot":"","sources":["../src/geometry-extra.ts"],"names":[],"mappings":"AAQA,iEA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extra.d.ts","sourceRoot":"","sources":["../src/hypothesis-extra.ts"],"names":[],"mappings":"AAcA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AA+B5C,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"hypothesis-extra.d.ts","sourceRoot":"","sources":["../src/hypothesis-extra.ts"],"names":[],"mappings":"AAcA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AA+B5C,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,WAAW,CAajD;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,GAAG,gBAAgB,CASnD;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,aAAa,CAmB7D;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,cAAc,CAsBxD;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAQD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC,GAAG,iBAAiB,CAiBrG;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAe5E;AAED,mFAAmF;AACnF,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAoBjF;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,KAAK,SAAO,GAAG,eAAe,EAAE,CA6BvE"}
|
package/dist/index.js
CHANGED
|
@@ -45154,11 +45154,13 @@ function rankdata(x) {
|
|
|
45154
45154
|
function gmean(x) {
|
|
45155
45155
|
const a = arr(x);
|
|
45156
45156
|
if (a.length === 0) return NaN;
|
|
45157
|
+
if (a.some((v) => v <= 0)) throw new Error("gmean: all entries must be > 0");
|
|
45157
45158
|
return Math.exp(mean2(a.map(Math.log)));
|
|
45158
45159
|
}
|
|
45159
45160
|
function hmean(x) {
|
|
45160
45161
|
const a = arr(x);
|
|
45161
45162
|
if (a.length === 0) return NaN;
|
|
45163
|
+
if (a.some((v) => v <= 0)) throw new Error("hmean: all entries must be > 0");
|
|
45162
45164
|
return a.length / sum2(a.map((v) => 1 / v));
|
|
45163
45165
|
}
|
|
45164
45166
|
function moment(x, k, central = true) {
|
|
@@ -45173,9 +45175,11 @@ function skewness(x, opts = {}) {
|
|
|
45173
45175
|
const a = arr(x);
|
|
45174
45176
|
const n = a.length;
|
|
45175
45177
|
const m2 = centralMoment(a, 2);
|
|
45178
|
+
if (m2 === 0) throw new Error("skewness: variance is zero (constant input); skewness undefined");
|
|
45176
45179
|
const m3 = centralMoment(a, 3);
|
|
45177
45180
|
const g1 = m3 / Math.pow(m2, 1.5);
|
|
45178
|
-
if (opts.bias === false
|
|
45181
|
+
if (opts.bias === false) {
|
|
45182
|
+
if (n <= 2) return NaN;
|
|
45179
45183
|
return Math.sqrt(n * (n - 1)) / (n - 2) * g1;
|
|
45180
45184
|
}
|
|
45181
45185
|
return g1;
|
|
@@ -45184,9 +45188,11 @@ function kurtosis(x, opts = {}) {
|
|
|
45184
45188
|
const a = arr(x);
|
|
45185
45189
|
const n = a.length;
|
|
45186
45190
|
const m2 = centralMoment(a, 2);
|
|
45191
|
+
if (m2 === 0) throw new Error("kurtosis: variance is zero (constant input); kurtosis undefined");
|
|
45187
45192
|
const m4 = centralMoment(a, 4);
|
|
45188
45193
|
let g2 = m4 / (m2 * m2);
|
|
45189
|
-
if (opts.bias === false
|
|
45194
|
+
if (opts.bias === false) {
|
|
45195
|
+
if (n <= 3) return NaN;
|
|
45190
45196
|
g2 = (n - 1) / ((n - 2) * (n - 3)) * ((n + 1) * g2 - 3 * (n - 1)) + 3;
|
|
45191
45197
|
}
|
|
45192
45198
|
return opts.fisher === false ? g2 : g2 - 3;
|
|
@@ -45202,8 +45208,10 @@ function sem(x) {
|
|
|
45202
45208
|
}
|
|
45203
45209
|
function zscore(x) {
|
|
45204
45210
|
const a = arr(x);
|
|
45211
|
+
if (a.length === 0) return [];
|
|
45205
45212
|
const m = mean2(a);
|
|
45206
45213
|
const s = stdPop(a);
|
|
45214
|
+
if (s === 0) throw new Error("zscore: standard deviation is zero (constant input)");
|
|
45207
45215
|
return a.map((v) => (v - m) / s);
|
|
45208
45216
|
}
|
|
45209
45217
|
function cov(x, y, ddof = 1) {
|
|
@@ -45211,6 +45219,8 @@ function cov(x, y, ddof = 1) {
|
|
|
45211
45219
|
const a = arr(x);
|
|
45212
45220
|
const b = arr(y);
|
|
45213
45221
|
if (a.length !== b.length) throw new Error(`cov: length mismatch ${a.length} vs ${b.length}`);
|
|
45222
|
+
if (a.length <= ddof)
|
|
45223
|
+
throw new Error(`cov: need more than ddof=${ddof} observations (got n=${a.length})`);
|
|
45214
45224
|
const ma = mean2(a);
|
|
45215
45225
|
const mb = mean2(b);
|
|
45216
45226
|
let acc = 0;
|
|
@@ -45219,7 +45229,9 @@ function cov(x, y, ddof = 1) {
|
|
|
45219
45229
|
}
|
|
45220
45230
|
const M = x.map((r) => Array.from(r));
|
|
45221
45231
|
const nObs = M.length;
|
|
45222
|
-
|
|
45232
|
+
if (nObs <= ddof)
|
|
45233
|
+
throw new Error(`cov: need more than ddof=${ddof} observations (got n=${nObs})`);
|
|
45234
|
+
const nVar = M[0].length;
|
|
45223
45235
|
const cols = Array.from({ length: nVar }, (_, j) => M.map((r) => r[j]));
|
|
45224
45236
|
const means = cols.map(mean2);
|
|
45225
45237
|
const out = Array.from({ length: nVar }, () => new Array(nVar).fill(0));
|
|
@@ -45246,6 +45258,11 @@ function corrcoef(matrix2) {
|
|
|
45246
45258
|
|
|
45247
45259
|
// src/numeric-extra.ts
|
|
45248
45260
|
var toArr = (x) => Array.isArray(x) ? x : Array.from(x);
|
|
45261
|
+
var maxOf = (a) => {
|
|
45262
|
+
let m = -Infinity;
|
|
45263
|
+
for (let i = 0; i < a.length; i++) if (a[i] > m) m = a[i];
|
|
45264
|
+
return m;
|
|
45265
|
+
};
|
|
45249
45266
|
function clamp(x, lo, hi) {
|
|
45250
45267
|
const c = (v) => v < lo ? lo : v > hi ? hi : v;
|
|
45251
45268
|
return Array.isArray(x) ? x.map(c) : c(x);
|
|
@@ -45257,7 +45274,7 @@ function sigmoid(x) {
|
|
|
45257
45274
|
function logsumexp(x) {
|
|
45258
45275
|
const a = toArr(x);
|
|
45259
45276
|
if (a.length === 0) return -Infinity;
|
|
45260
|
-
const m =
|
|
45277
|
+
const m = maxOf(a);
|
|
45261
45278
|
if (!Number.isFinite(m)) return m;
|
|
45262
45279
|
let acc = 0;
|
|
45263
45280
|
for (let i = 0; i < a.length; i++) acc += Math.exp(a[i] - m);
|
|
@@ -45266,7 +45283,7 @@ function logsumexp(x) {
|
|
|
45266
45283
|
function softmax(x) {
|
|
45267
45284
|
const a = toArr(x);
|
|
45268
45285
|
if (a.length === 0) return [];
|
|
45269
|
-
const m =
|
|
45286
|
+
const m = maxOf(a);
|
|
45270
45287
|
const e = a.map((v) => Math.exp(v - m));
|
|
45271
45288
|
const z = sum(e);
|
|
45272
45289
|
return e.map((v) => v / z);
|
|
@@ -45304,7 +45321,17 @@ function cummin(x) {
|
|
|
45304
45321
|
function cumtrapz(y, x) {
|
|
45305
45322
|
const a = toArr(y);
|
|
45306
45323
|
const out = new Array(a.length).fill(0);
|
|
45307
|
-
|
|
45324
|
+
let dxAt;
|
|
45325
|
+
if (typeof x === "number") {
|
|
45326
|
+
dxAt = () => x;
|
|
45327
|
+
} else if (x !== void 0) {
|
|
45328
|
+
const xs = toArr(x);
|
|
45329
|
+
if (xs.length < a.length)
|
|
45330
|
+
throw new Error(`cumtrapz: abscissa x (length ${xs.length}) is shorter than y (length ${a.length})`);
|
|
45331
|
+
dxAt = (i) => xs[i + 1] - xs[i];
|
|
45332
|
+
} else {
|
|
45333
|
+
dxAt = () => 1;
|
|
45334
|
+
}
|
|
45308
45335
|
let acc = 0;
|
|
45309
45336
|
for (let i = 1; i < a.length; i++) {
|
|
45310
45337
|
acc += (a[i] + a[i - 1]) / 2 * dxAt(i - 1);
|
|
@@ -45367,9 +45394,13 @@ function tieTerm(values) {
|
|
|
45367
45394
|
function fTest(x, y) {
|
|
45368
45395
|
const a = arr2(x);
|
|
45369
45396
|
const b = arr2(y);
|
|
45397
|
+
if (a.length < 2 || b.length < 2)
|
|
45398
|
+
throw new Error("fTest: each sample needs at least 2 observations");
|
|
45370
45399
|
const df1 = a.length - 1;
|
|
45371
45400
|
const df2 = b.length - 1;
|
|
45372
|
-
const
|
|
45401
|
+
const vb = sampleVar(b);
|
|
45402
|
+
if (vb === 0) throw new Error("fTest: denominator sample has zero variance");
|
|
45403
|
+
const statistic = sampleVar(a) / vb;
|
|
45373
45404
|
const lower = fCDF(statistic, df1, df2);
|
|
45374
45405
|
const pValue = 2 * Math.min(lower, 1 - lower);
|
|
45375
45406
|
return { statistic, pValue, df1, df2 };
|
|
@@ -45377,6 +45408,7 @@ function fTest(x, y) {
|
|
|
45377
45408
|
function jarqueBera(x) {
|
|
45378
45409
|
const a = arr2(x);
|
|
45379
45410
|
const n = a.length;
|
|
45411
|
+
if (n < 2) throw new Error("jarqueBera: need at least 2 observations");
|
|
45380
45412
|
const s = skewness(a);
|
|
45381
45413
|
const k = kurtosis(a);
|
|
45382
45414
|
const statistic = n / 6 * (s * s + k * k / 4);
|
|
@@ -45385,6 +45417,7 @@ function jarqueBera(x) {
|
|
|
45385
45417
|
}
|
|
45386
45418
|
function kruskalWallis(...groups) {
|
|
45387
45419
|
const arrs = groups.map(arr2).filter((g) => g.length > 0);
|
|
45420
|
+
if (arrs.length < 2) throw new Error("kruskalWallis: need at least 2 non-empty groups");
|
|
45388
45421
|
const pooled = arrs.flat();
|
|
45389
45422
|
const N = pooled.length;
|
|
45390
45423
|
const ranks = rankdata(pooled);
|
|
@@ -45404,9 +45437,13 @@ function kruskalWallis(...groups) {
|
|
|
45404
45437
|
}
|
|
45405
45438
|
function wilcoxon(x, y) {
|
|
45406
45439
|
const a = arr2(x);
|
|
45407
|
-
const
|
|
45440
|
+
const yy = y !== void 0 ? arr2(y) : void 0;
|
|
45441
|
+
if (yy !== void 0 && yy.length !== a.length)
|
|
45442
|
+
throw new Error(`wilcoxon: paired samples must have equal length (${a.length} vs ${yy.length})`);
|
|
45443
|
+
const diffs = yy !== void 0 ? a.map((v, i) => v - yy[i]) : a;
|
|
45408
45444
|
const d = diffs.filter((v) => v !== 0);
|
|
45409
45445
|
const n = d.length;
|
|
45446
|
+
if (n === 0) throw new Error("wilcoxon: all differences are zero (test undefined)");
|
|
45410
45447
|
const ranks = rankdata(d.map(Math.abs));
|
|
45411
45448
|
let wPlus = 0;
|
|
45412
45449
|
let wMinus = 0;
|
|
@@ -45449,18 +45486,27 @@ function rangeProb(w, k) {
|
|
|
45449
45486
|
return Math.min(1, Math.max(0, simpson2(integrand, -8.5, 8.5, 240)));
|
|
45450
45487
|
}
|
|
45451
45488
|
function studentizedRangeCDF(q, k, df) {
|
|
45489
|
+
if (!(k >= 2)) throw new Error("studentizedRangeCDF: k (number of groups) must be >= 2");
|
|
45452
45490
|
if (q <= 0) return 0;
|
|
45453
45491
|
if (!Number.isFinite(df)) return rangeProb(q, k);
|
|
45492
|
+
if (!(df > 0)) throw new Error("studentizedRangeCDF: df must be > 0");
|
|
45454
45493
|
const nu = df;
|
|
45455
45494
|
const logc = nu / 2 * Math.log(nu) - (nu / 2 - 1) * Math.log(2) - lgamma3(nu / 2);
|
|
45456
45495
|
const fU = (u) => Math.exp(logc + (nu - 1) * Math.log(u) - nu * u * u / 2);
|
|
45457
|
-
|
|
45496
|
+
let umax = 1 + 12 / Math.sqrt(nu);
|
|
45497
|
+
for (let iter = 0; iter < 20 && simpson2(fU, 1e-5, umax, 120) < 1 - 1e-6; iter++) umax *= 1.5;
|
|
45458
45498
|
return Math.min(1, Math.max(0, simpson2((u) => fU(u) * rangeProb(q * u, k), 1e-5, umax, 120)));
|
|
45459
45499
|
}
|
|
45460
45500
|
function studentizedRangeQuantile(p, k, df) {
|
|
45501
|
+
if (!(p > 0 && p < 1)) throw new Error("studentizedRangeQuantile: p must be in (0, 1)");
|
|
45461
45502
|
let lo = 0;
|
|
45462
|
-
let hi =
|
|
45463
|
-
for (let
|
|
45503
|
+
let hi = 1;
|
|
45504
|
+
for (let iter = 0; studentizedRangeCDF(hi, k, df) < p; iter++) {
|
|
45505
|
+
if (iter >= 60)
|
|
45506
|
+
throw new Error(`studentizedRangeQuantile: failed to bracket p=${p} (CDF plateaued below p)`);
|
|
45507
|
+
hi *= 2;
|
|
45508
|
+
}
|
|
45509
|
+
for (let i = 0; i < 45; i++) {
|
|
45464
45510
|
const mid = (lo + hi) / 2;
|
|
45465
45511
|
if (studentizedRangeCDF(mid, k, df) < p) lo = mid;
|
|
45466
45512
|
else hi = mid;
|
|
@@ -45470,9 +45516,12 @@ function studentizedRangeQuantile(p, k, df) {
|
|
|
45470
45516
|
function tukeyHSD(groups, alpha = 0.05) {
|
|
45471
45517
|
const gs = groups.map(arr2);
|
|
45472
45518
|
const k = gs.length;
|
|
45519
|
+
if (k < 2) throw new Error("tukeyHSD: need at least 2 groups");
|
|
45473
45520
|
const means = gs.map(mean3);
|
|
45474
45521
|
const N = gs.reduce((s, g) => s + g.length, 0);
|
|
45475
45522
|
const dfErr = N - k;
|
|
45523
|
+
if (dfErr <= 0)
|
|
45524
|
+
throw new Error("tukeyHSD: residual df must be > 0 (groups must hold more observations than groups)");
|
|
45476
45525
|
const sse = gs.reduce((s, g) => s + sampleVar(g) * (g.length - 1), 0);
|
|
45477
45526
|
const mse = sse / dfErr;
|
|
45478
45527
|
const qCrit = studentizedRangeQuantile(1 - alpha, k, dfErr);
|
|
@@ -45526,6 +45575,13 @@ function realSchur(M) {
|
|
|
45526
45575
|
A = _multiply(R, Q2).map((r, i) => r.map((v, j) => v + (i === j ? s : 0)));
|
|
45527
45576
|
U = _multiply(U, Q2);
|
|
45528
45577
|
}
|
|
45578
|
+
for (let i = 2; i < n; i++) {
|
|
45579
|
+
for (let j = 0; j < i - 1; j++) {
|
|
45580
|
+
if (Math.abs(A[i][j]) > 1e-8 * (1 + Math.abs(A[i][i]) + Math.abs(A[j][j]))) {
|
|
45581
|
+
throw new Error("realSchur: QR iteration failed to converge to (quasi-)triangular form");
|
|
45582
|
+
}
|
|
45583
|
+
}
|
|
45584
|
+
}
|
|
45529
45585
|
return { U, S: A };
|
|
45530
45586
|
}
|
|
45531
45587
|
var arr3 = (x) => Array.isArray(x) ? x : Array.from(x);
|
|
@@ -45569,6 +45625,7 @@ function companion(coeffs) {
|
|
|
45569
45625
|
const a = arr3(coeffs);
|
|
45570
45626
|
const n = a.length - 1;
|
|
45571
45627
|
if (n < 1) throw new Error("companion: need at least 2 coefficients");
|
|
45628
|
+
if (a[0] === 0) throw new Error("companion: leading coefficient must be nonzero");
|
|
45572
45629
|
const C = Array.from({ length: n }, () => new Array(n).fill(0));
|
|
45573
45630
|
for (let j = 0; j < n; j++) C[0][j] = -a[j + 1] / a[0];
|
|
45574
45631
|
for (let i = 1; i < n; i++) C[i][i - 1] = 1;
|
|
@@ -45692,6 +45749,7 @@ function movingAverage(x, w) {
|
|
|
45692
45749
|
function ewma(x, alpha) {
|
|
45693
45750
|
const a = arr4(x);
|
|
45694
45751
|
if (alpha <= 0 || alpha > 1) throw new Error("ewma: alpha must be in (0, 1]");
|
|
45752
|
+
if (a.length === 0) throw new Error("ewma: input series is empty");
|
|
45695
45753
|
const out = new Array(a.length);
|
|
45696
45754
|
let prev = a[0];
|
|
45697
45755
|
out[0] = prev;
|
|
@@ -45708,6 +45766,7 @@ function detrend(x, type = "linear") {
|
|
|
45708
45766
|
const m = mean4(a);
|
|
45709
45767
|
return a.map((v) => v - m);
|
|
45710
45768
|
}
|
|
45769
|
+
if (n < 2) return a.map(() => 0);
|
|
45711
45770
|
const t = Array.from({ length: n }, (_, i) => i);
|
|
45712
45771
|
const mt = mean4(t);
|
|
45713
45772
|
const my = mean4(a);
|
|
@@ -45724,10 +45783,13 @@ function detrend(x, type = "linear") {
|
|
|
45724
45783
|
function acf(x, nlags) {
|
|
45725
45784
|
const a = arr4(x);
|
|
45726
45785
|
const n = a.length;
|
|
45786
|
+
if (nlags < 0 || nlags >= n)
|
|
45787
|
+
throw new Error(`acf: nlags ${nlags} out of range for series length ${n}`);
|
|
45727
45788
|
const m = mean4(a);
|
|
45728
45789
|
const dev = a.map((v) => v - m);
|
|
45729
45790
|
let c0 = 0;
|
|
45730
45791
|
for (let i = 0; i < n; i++) c0 += dev[i] * dev[i];
|
|
45792
|
+
if (c0 === 0) throw new Error("acf: series has zero variance");
|
|
45731
45793
|
const out = new Array(nlags + 1);
|
|
45732
45794
|
for (let k = 0; k <= nlags; k++) {
|
|
45733
45795
|
let ck = 0;
|
|
@@ -45745,6 +45807,8 @@ function linearRegression(x, y) {
|
|
|
45745
45807
|
const b = arr5(y);
|
|
45746
45808
|
const n = a.length;
|
|
45747
45809
|
if (b.length !== n) throw new Error(`linearRegression: length mismatch ${n} vs ${b.length}`);
|
|
45810
|
+
if (n < 3)
|
|
45811
|
+
throw new Error("linearRegression: need at least 3 points for a slope significance test");
|
|
45748
45812
|
const mx = mean5(a);
|
|
45749
45813
|
const my = mean5(b);
|
|
45750
45814
|
let sxx = 0;
|
|
@@ -45757,6 +45821,7 @@ function linearRegression(x, y) {
|
|
|
45757
45821
|
syy += dy * dy;
|
|
45758
45822
|
sxy += dx * dy;
|
|
45759
45823
|
}
|
|
45824
|
+
if (sxx === 0) throw new Error("linearRegression: predictor x has zero variance");
|
|
45760
45825
|
const slope = sxy / sxx;
|
|
45761
45826
|
const intercept = my - slope * mx;
|
|
45762
45827
|
const rValue = sxy / Math.sqrt(sxx * syy);
|
|
@@ -45899,9 +45964,12 @@ function levenbergMarquardt(residual, x0, opts = {}) {
|
|
|
45899
45964
|
try {
|
|
45900
45965
|
const Ainv = _inv2(A);
|
|
45901
45966
|
delta = Ainv.map((row2) => row2.reduce((s, v, k) => s - v * Jtr[k], 0));
|
|
45902
|
-
} catch {
|
|
45903
|
-
|
|
45904
|
-
|
|
45967
|
+
} catch (e) {
|
|
45968
|
+
if (e instanceof Error && /determinant is zero|singular|zero pivot/i.test(e.message)) {
|
|
45969
|
+
lambda *= 10;
|
|
45970
|
+
continue;
|
|
45971
|
+
}
|
|
45972
|
+
throw e;
|
|
45905
45973
|
}
|
|
45906
45974
|
const xNew = x.map((v, i) => v + delta[i]);
|
|
45907
45975
|
const rNew = residual(xNew);
|
|
@@ -45928,6 +45996,8 @@ var dist2 = (a, b) => a.reduce((s, v, i) => s + (v - b[i]) * (v - b[i]), 0);
|
|
|
45928
45996
|
function kmeans(data, k, opts = {}) {
|
|
45929
45997
|
const { maxIter = 100 } = opts;
|
|
45930
45998
|
const n = data.length;
|
|
45999
|
+
if (n === 0) throw new Error("kmeans: data is empty");
|
|
46000
|
+
if (!Number.isInteger(k) || k < 1) throw new Error("kmeans: k must be a positive integer");
|
|
45931
46001
|
const d = data[0].length;
|
|
45932
46002
|
if (k > n) throw new Error("kmeans: k exceeds number of points");
|
|
45933
46003
|
const mean6 = new Array(d).fill(0);
|
|
@@ -45948,7 +46018,10 @@ function kmeans(data, k, opts = {}) {
|
|
|
45948
46018
|
centroids.push(data[best].slice());
|
|
45949
46019
|
}
|
|
45950
46020
|
const labels = new Array(n).fill(0);
|
|
46021
|
+
let iterations = 0;
|
|
46022
|
+
let converged = false;
|
|
45951
46023
|
for (let iter = 0; iter < maxIter; iter++) {
|
|
46024
|
+
iterations = iter + 1;
|
|
45952
46025
|
let changed = false;
|
|
45953
46026
|
for (let i = 0; i < n; i++) {
|
|
45954
46027
|
let best = 0;
|
|
@@ -45971,10 +46044,13 @@ function kmeans(data, k, opts = {}) {
|
|
|
45971
46044
|
for (let j = 0; j < d; j++)
|
|
45972
46045
|
centroids[c][j] = members.reduce((s, p) => s + p[j], 0) / members.length;
|
|
45973
46046
|
}
|
|
45974
|
-
if (!changed)
|
|
46047
|
+
if (!changed) {
|
|
46048
|
+
converged = true;
|
|
46049
|
+
break;
|
|
46050
|
+
}
|
|
45975
46051
|
}
|
|
45976
46052
|
const inertia = data.reduce((s, p, i) => s + dist2(p, centroids[labels[i]]), 0);
|
|
45977
|
-
return { labels, centroids, inertia };
|
|
46053
|
+
return { labels, centroids, inertia, iterations, converged };
|
|
45978
46054
|
}
|
|
45979
46055
|
function spectralClustering(adjacency, k, opts = {}) {
|
|
45980
46056
|
const L = laplacianMatrix(adjacency, { normalized: true });
|
|
@@ -45992,6 +46068,16 @@ var parse2 = parse;
|
|
|
45992
46068
|
var evaluate2 = evaluate;
|
|
45993
46069
|
var NotIntegrable = class extends Error {
|
|
45994
46070
|
};
|
|
46071
|
+
function evalConst(s) {
|
|
46072
|
+
let v;
|
|
46073
|
+
try {
|
|
46074
|
+
v = evaluate2(s);
|
|
46075
|
+
} catch {
|
|
46076
|
+
throw new NotIntegrable(`non-numeric constant ${s}`);
|
|
46077
|
+
}
|
|
46078
|
+
if (!Number.isFinite(v)) throw new NotIntegrable(`non-finite constant ${s}`);
|
|
46079
|
+
return v;
|
|
46080
|
+
}
|
|
45995
46081
|
var unwrap = (n) => n.type === "ParenthesisNode" && n.content ? unwrap(n.content) : n;
|
|
45996
46082
|
function isConst(n, x) {
|
|
45997
46083
|
const node = unwrap(n);
|
|
@@ -46008,8 +46094,9 @@ function linearSlope(u, x) {
|
|
|
46008
46094
|
const a2 = evaluate2(u, { [x]: 5 }) - evaluate2(u, { [x]: 4 });
|
|
46009
46095
|
if (Math.abs(a1 - a2) < 1e-9 && Math.abs(a1) > 1e-12) return a1;
|
|
46010
46096
|
return null;
|
|
46011
|
-
} catch {
|
|
46012
|
-
return null;
|
|
46097
|
+
} catch (e) {
|
|
46098
|
+
if (e instanceof Error && /undefined symbol/i.test(e.message)) return null;
|
|
46099
|
+
throw e;
|
|
46013
46100
|
}
|
|
46014
46101
|
}
|
|
46015
46102
|
function integrateNode(raw, x) {
|
|
@@ -46040,7 +46127,7 @@ function integrateNode(raw, x) {
|
|
|
46040
46127
|
if (isConst(args[0], x)) {
|
|
46041
46128
|
const a = linearSlope(args[1].toString(), x);
|
|
46042
46129
|
if (a !== null) {
|
|
46043
|
-
const k =
|
|
46130
|
+
const k = evalConst(args[0].toString()) / a;
|
|
46044
46131
|
return `${num(k)} * log(abs(${args[1].toString()}))`;
|
|
46045
46132
|
}
|
|
46046
46133
|
}
|
|
@@ -46050,7 +46137,7 @@ function integrateNode(raw, x) {
|
|
|
46050
46137
|
const base = args[0];
|
|
46051
46138
|
const exp2 = args[1];
|
|
46052
46139
|
if (!isConst(exp2, x)) throw new NotIntegrable("variable exponent");
|
|
46053
|
-
const n =
|
|
46140
|
+
const n = evalConst(exp2.toString());
|
|
46054
46141
|
const a = linearSlope(base.toString(), x);
|
|
46055
46142
|
if (a === null) throw new NotIntegrable("non-linear base");
|
|
46056
46143
|
const b = `(${base.toString()})`;
|
|
@@ -46107,6 +46194,8 @@ var _inv3 = inv;
|
|
|
46107
46194
|
var arr6 = (x) => Array.isArray(x) ? x : Array.from(x);
|
|
46108
46195
|
var sinc = (x) => x === 0 ? 1 : Math.sin(Math.PI * x) / (Math.PI * x);
|
|
46109
46196
|
function firwin(numtaps, cutoff) {
|
|
46197
|
+
if (!Number.isInteger(numtaps) || numtaps < 2)
|
|
46198
|
+
throw new Error("firwin: numtaps must be an integer >= 2");
|
|
46110
46199
|
const M = numtaps - 1;
|
|
46111
46200
|
const h = new Array(numtaps);
|
|
46112
46201
|
for (let n = 0; n <= M; n++) {
|
|
@@ -46114,6 +46203,8 @@ function firwin(numtaps, cutoff) {
|
|
|
46114
46203
|
h[n] = cutoff * sinc(cutoff * (n - M / 2)) * w;
|
|
46115
46204
|
}
|
|
46116
46205
|
const s = h.reduce((a, b) => a + b, 0);
|
|
46206
|
+
if (Math.abs(s) < 1e-12)
|
|
46207
|
+
throw new Error("firwin: degenerate design \u2014 taps sum to ~0 (cutoff at/near 0)");
|
|
46117
46208
|
return h.map((v) => v / s);
|
|
46118
46209
|
}
|
|
46119
46210
|
function padCoeffs(b, a) {
|
|
@@ -46148,8 +46239,16 @@ function lfilterZi(b, a) {
|
|
|
46148
46239
|
(_, i) => Array.from({ length: n - 1 }, (_2, j) => (i === j ? 1 : 0) - C[j][i])
|
|
46149
46240
|
);
|
|
46150
46241
|
const B = Array.from({ length: n - 1 }, (_, i) => bb[i + 1] - aa[i + 1] * bb[0]);
|
|
46151
|
-
|
|
46152
|
-
|
|
46242
|
+
let Minv;
|
|
46243
|
+
try {
|
|
46244
|
+
Minv = _inv3(M);
|
|
46245
|
+
} catch {
|
|
46246
|
+
throw new Error("lfilterZi: filter has a pole at z=1 (singular I \u2212 A\u1D40); steady-state zi is undefined");
|
|
46247
|
+
}
|
|
46248
|
+
const zi = Minv.map((row2) => row2.reduce((s, v, k) => s + v * B[k], 0));
|
|
46249
|
+
if (zi.some((v) => !Number.isFinite(v)))
|
|
46250
|
+
throw new Error("lfilterZi: non-finite steady state (unstable or marginally-stable filter)");
|
|
46251
|
+
return zi;
|
|
46153
46252
|
}
|
|
46154
46253
|
function filtfilt(b, a, x) {
|
|
46155
46254
|
const bb = arr6(b);
|
|
@@ -46187,6 +46286,9 @@ function polyFromRoots(roots) {
|
|
|
46187
46286
|
return c.map((z) => z.re);
|
|
46188
46287
|
}
|
|
46189
46288
|
function butter(N, Wn) {
|
|
46289
|
+
if (!Number.isInteger(N) || N < 1) throw new Error("butter: order N must be a positive integer");
|
|
46290
|
+
if (!(Wn > 0 && Wn < 1))
|
|
46291
|
+
throw new Error("butter: Wn must satisfy 0 < Wn < 1 (normalized to Nyquist)");
|
|
46190
46292
|
const ap = [];
|
|
46191
46293
|
for (let k = 0; k < N; k++) {
|
|
46192
46294
|
const m = -N + 1 + 2 * k;
|
|
@@ -46224,6 +46326,7 @@ var norm3 = (a) => Math.sqrt(dot2(a, a));
|
|
|
46224
46326
|
function slerp(v0, v1, t) {
|
|
46225
46327
|
const n0 = norm3(v0);
|
|
46226
46328
|
const n16 = norm3(v1);
|
|
46329
|
+
if (n0 === 0 || n16 === 0) throw new Error("slerp: input vectors must be non-zero");
|
|
46227
46330
|
const u0 = v0.map((v) => v / n0);
|
|
46228
46331
|
const u1 = v1.map((v) => v / n16);
|
|
46229
46332
|
let cos2 = dot2(u0, u1);
|
|
@@ -46231,6 +46334,8 @@ function slerp(v0, v1, t) {
|
|
|
46231
46334
|
const omega = Math.acos(cos2);
|
|
46232
46335
|
const mag = n0 + (n16 - n0) * t;
|
|
46233
46336
|
if (omega < 1e-9) return u0.map((v, i) => (v + (u1[i] - v) * t) * mag);
|
|
46337
|
+
if (Math.PI - omega < 1e-9)
|
|
46338
|
+
throw new Error("slerp: antipodal directions have no unique interpolation path");
|
|
46234
46339
|
const s = Math.sin(omega);
|
|
46235
46340
|
const a = Math.sin((1 - t) * omega) / s;
|
|
46236
46341
|
const b = Math.sin(t * omega) / s;
|
|
@@ -46251,6 +46356,7 @@ function quaternionConjugate(q) {
|
|
|
46251
46356
|
}
|
|
46252
46357
|
function quaternionNormalize(q) {
|
|
46253
46358
|
const m = norm3(q);
|
|
46359
|
+
if (m === 0) throw new Error("quaternionNormalize: zero-magnitude quaternion");
|
|
46254
46360
|
return q.map((v) => v / m);
|
|
46255
46361
|
}
|
|
46256
46362
|
function quaternionFromAxisAngle(axis, angle) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linalg-extra.d.ts","sourceRoot":"","sources":["../src/linalg-extra.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"linalg-extra.d.ts","sourceRoot":"","sources":["../src/linalg-extra.ts"],"names":[],"mappings":"AA0EA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAG5C;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,EACtB,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,GACrB;IAAE,MAAM,EAAE,KAAK,CAAC,MAAM,GAA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AAC,EAAE,SAAS,MAAM,EAAE,EAAE,GACrB;IAAE,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC;IAAC,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC;IAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;CAAE,CASlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeric-extra.d.ts","sourceRoot":"","sources":["../src/numeric-extra.ts"],"names":[],"mappings":"AAUA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"numeric-extra.d.ts","sourceRoot":"","sources":["../src/numeric-extra.ts"],"names":[],"mappings":"AAUA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAe5C,oEAAoE;AACpE,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;AACjE,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;AAM9E,gFAAgF;AAChF,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AAC3C,wBAAgB,OAAO,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AAMxD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAQxC;AAED,+EAA+E;AAC/E,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAOxC;AAED,+EAA+E;AAC/E,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CASxC;AAED,wCAAwC;AACxC,wBAAgB,MAAM,CA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AED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,EACnC,EAAE,EAAE,SAAS,MAAM,EAAE,EACrB,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5C,QAAQ,CAwEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regression-extra.d.ts","sourceRoot":"","sources":["../src/regression-extra.ts"],"names":[],"mappings":"AAQA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAI5C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"regression-extra.d.ts","sourceRoot":"","sources":["../src/regression-extra.ts"],"names":[],"mappings":"AAQA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAI5C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,gBAAgB,CA6BjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signal-filter-extra.d.ts","sourceRoot":"","sources":["../src/signal-filter-extra.ts"],"names":[],"mappings":"AAYA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAK5C;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"signal-filter-extra.d.ts","sourceRoot":"","sources":["../src/signal-filter-extra.ts"],"names":[],"mappings":"AAYA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAK5C;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAahE;AAkCD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAExD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAqBlD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,CAqBzD;AAuBD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CA4B1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeseries-extra.d.ts","sourceRoot":"","sources":["../src/timeseries-extra.ts"],"names":[],"mappings":"AAQA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAI5C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAWzD;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"timeseries-extra.d.ts","sourceRoot":"","sources":["../src/timeseries-extra.ts"],"names":[],"mappings":"AAQA,KAAK,GAAG,GAAG,SAAS,MAAM,EAAE,GAAG,YAAY,CAAC;AAI5C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAWzD;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAYpD;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,GAAE,QAAQ,GAAG,UAAqB,GAAG,MAAM,EAAE,CAuBhF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAiBnD"}
|
package/package.json
CHANGED