deepbox 0.1.0 → 0.2.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/LICENSE +1 -1
- package/README.md +39 -37
- package/dist/{CSRMatrix-KzNt6QpS.d.ts → CSRMatrix-B7XtUAZO.d.cts} +3 -3
- package/dist/{CSRMatrix-CwGwQRea.d.cts → CSRMatrix-CtD23fRM.d.ts} +3 -3
- package/dist/{Tensor-BQLk1ltW.d.cts → Tensor-BORFp_zt.d.ts} +27 -7
- package/dist/{Tensor-g8mUClel.d.ts → Tensor-fxBg-TFZ.d.cts} +27 -7
- package/dist/{chunk-FJYLIGJX.js → chunk-3AX37GPK.js} +33 -7
- package/dist/chunk-3AX37GPK.js.map +1 -0
- package/dist/{chunk-PR647I7R.js → chunk-3YFEYDHN.js} +21 -4
- package/dist/chunk-3YFEYDHN.js.map +1 -0
- package/dist/{chunk-XMWVME2W.js → chunk-6SX26MAJ.js} +4 -4
- package/dist/{chunk-XMWVME2W.js.map → chunk-6SX26MAJ.js.map} +1 -1
- package/dist/{chunk-C4PKXY74.cjs → chunk-6X7XFNDO.cjs} +94 -77
- package/dist/chunk-6X7XFNDO.cjs.map +1 -0
- package/dist/{chunk-6AE5FKKQ.cjs → chunk-724CXHFH.cjs} +1211 -919
- package/dist/chunk-724CXHFH.cjs.map +1 -0
- package/dist/{chunk-AU7XHGKJ.js → chunk-AJTKVBY5.js} +4 -4
- package/dist/{chunk-AU7XHGKJ.js.map → chunk-AJTKVBY5.js.map} +1 -1
- package/dist/{chunk-ZB75FESB.cjs → chunk-AV6WGSYX.cjs} +130 -104
- package/dist/chunk-AV6WGSYX.cjs.map +1 -0
- package/dist/{chunk-ZLW62TJG.cjs → chunk-BWOSU234.cjs} +142 -141
- package/dist/chunk-BWOSU234.cjs.map +1 -0
- package/dist/{chunk-4S73VUBD.js → chunk-CZOMBUI7.js} +3 -3
- package/dist/chunk-CZOMBUI7.js.map +1 -0
- package/dist/{chunk-QERHVCHC.cjs → chunk-EUZHJDZ6.cjs} +419 -364
- package/dist/chunk-EUZHJDZ6.cjs.map +1 -0
- package/dist/{chunk-AD436M45.js → chunk-G2G55ATL.js} +120 -58
- package/dist/chunk-G2G55ATL.js.map +1 -0
- package/dist/{chunk-5R4S63PF.js → chunk-G3WNLNYS.js} +119 -64
- package/dist/chunk-G3WNLNYS.js.map +1 -0
- package/dist/{chunk-XEG44RF6.cjs → chunk-G7KXZHG6.cjs} +105 -95
- package/dist/chunk-G7KXZHG6.cjs.map +1 -0
- package/dist/{chunk-MLBMYKCG.js → chunk-H3JR7SV2.js} +255 -113
- package/dist/chunk-H3JR7SV2.js.map +1 -0
- package/dist/{chunk-PHV2DKRS.cjs → chunk-HDKMIG6E.cjs} +107 -107
- package/dist/{chunk-PHV2DKRS.cjs.map → chunk-HDKMIG6E.cjs.map} +1 -1
- package/dist/{chunk-ALS7ETWZ.cjs → chunk-HI2EZHCJ.cjs} +111 -102
- package/dist/chunk-HI2EZHCJ.cjs.map +1 -0
- package/dist/{chunk-OX6QXFMV.cjs → chunk-IT4BZUYE.cjs} +490 -428
- package/dist/chunk-IT4BZUYE.cjs.map +1 -0
- package/dist/{chunk-E3EU5FZO.cjs → chunk-JTZPRV6E.cjs} +123 -123
- package/dist/{chunk-E3EU5FZO.cjs.map → chunk-JTZPRV6E.cjs.map} +1 -1
- package/dist/{chunk-PL7TAYKI.js → chunk-K2L5C5YH.js} +8 -7
- package/dist/chunk-K2L5C5YH.js.map +1 -0
- package/dist/{chunk-BCR7G3A6.js → chunk-KCF6P34A.js} +356 -64
- package/dist/chunk-KCF6P34A.js.map +1 -0
- package/dist/{chunk-ZXKBDFP3.js → chunk-LZHVHD62.js} +15 -6
- package/dist/chunk-LZHVHD62.js.map +1 -0
- package/dist/{chunk-LWECRCW2.cjs → chunk-MTJF52AJ.cjs} +141 -141
- package/dist/{chunk-LWECRCW2.cjs.map → chunk-MTJF52AJ.cjs.map} +1 -1
- package/dist/{chunk-B5TNKUEY.js → chunk-NDDTUFKK.js} +16 -6
- package/dist/chunk-NDDTUFKK.js.map +1 -0
- package/dist/{chunk-DWZY6PIP.cjs → chunk-NOQI6OFL.cjs} +615 -473
- package/dist/chunk-NOQI6OFL.cjs.map +1 -0
- package/dist/{chunk-F3JWBINJ.js → chunk-OEXDJFHA.js} +4 -4
- package/dist/{chunk-F3JWBINJ.js.map → chunk-OEXDJFHA.js.map} +1 -1
- package/dist/{chunk-JSCDE774.cjs → chunk-Z6BGACIH.cjs} +3 -3
- package/dist/chunk-Z6BGACIH.cjs.map +1 -0
- package/dist/core/index.cjs +50 -50
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/dataframe/index.cjs +6 -6
- package/dist/dataframe/index.d.cts +3 -3
- package/dist/dataframe/index.d.ts +3 -3
- package/dist/dataframe/index.js +3 -3
- package/dist/datasets/index.cjs +34 -34
- package/dist/datasets/index.d.cts +3 -3
- package/dist/datasets/index.d.ts +3 -3
- package/dist/datasets/index.js +3 -3
- package/dist/{index-C1mfVYoo.d.ts → index-B18dHc8q.d.ts} +81 -46
- package/dist/{index-GFAVyOWO.d.ts → index-BHHX0qTY.d.cts} +14 -12
- package/dist/{index-tk4lSYod.d.ts → index-BI6QOUvV.d.ts} +106 -80
- package/dist/{index-DIp_RrRt.d.ts → index-BKvK21lf.d.ts} +13 -35
- package/dist/{index-BJY2SI4i.d.ts → index-BL8jLf3K.d.cts} +12 -11
- package/dist/{index-Cn3SdB0O.d.ts → index-BNbX167d.d.cts} +16 -10
- package/dist/{index-BWGhrDlr.d.ts → index-BT2ofL7Z.d.cts} +35 -35
- package/dist/{index-BbA2Gxfl.d.ts → index-BqcfIcL4.d.ts} +15 -15
- package/dist/{index-ZtI1Iy4L.d.ts → index-BrgrECM2.d.ts} +41 -38
- package/dist/{index-CDw5CnOU.d.ts → index-BtYKI9yJ.d.ts} +10 -8
- package/dist/{index-DIT_OO9C.d.cts → index-C7nLsAOC.d.cts} +10 -8
- package/dist/{index-D9Loo1_A.d.cts → index-CNj2Mxwf.d.cts} +81 -46
- package/dist/{index-DmEg_LCm.d.cts → index-CYlxeNW1.d.cts} +5 -3
- package/dist/{index-D61yaSMY.d.cts → index-CiTd61a5.d.ts} +12 -11
- package/dist/{index-BndMbqsM.d.ts → index-Cjnn0KeN.d.cts} +35 -21
- package/dist/{index-9oQx1HgV.d.cts → index-CkGGAn69.d.cts} +41 -38
- package/dist/{index-74AB8Cyh.d.cts → index-D4URSgqA.d.ts} +16 -10
- package/dist/{index-DoPWVxPo.d.cts → index-D4pn5zLT.d.ts} +35 -21
- package/dist/{index-DuCxd-8d.d.ts → index-D9ztTlDr.d.ts} +60 -42
- package/dist/{index-BgHYAoSS.d.cts → index-DF28ZPB5.d.cts} +60 -42
- package/dist/{index-eJgeni9c.d.cts → index-DLdiQzf0.d.cts} +106 -80
- package/dist/{index-WHQLn0e8.d.cts → index-DN4omPQw.d.ts} +35 -35
- package/dist/{index-CrqLlS-a.d.ts → index-DUnFq1WV.d.ts} +5 -3
- package/dist/{index-DbultU6X.d.cts → index-DgaYshkF.d.ts} +14 -12
- package/dist/{index-B_DK4FKY.d.cts → index-GUHYEhxs.d.cts} +13 -35
- package/dist/{index-CCvlwAmL.d.cts → index-TP--4irE.d.cts} +16 -14
- package/dist/{index-Dx42TZaY.d.ts → index-x0z_sanT.d.ts} +16 -14
- package/dist/{index-DyZ4QQf5.d.cts → index-xWH7ujWa.d.cts} +15 -15
- package/dist/index.cjs +26 -26
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +13 -13
- package/dist/linalg/index.cjs +22 -22
- package/dist/linalg/index.d.cts +3 -3
- package/dist/linalg/index.d.ts +3 -3
- package/dist/linalg/index.js +3 -3
- package/dist/metrics/index.cjs +40 -40
- package/dist/metrics/index.d.cts +3 -3
- package/dist/metrics/index.d.ts +3 -3
- package/dist/metrics/index.js +3 -3
- package/dist/ml/index.cjs +23 -23
- package/dist/ml/index.d.cts +3 -3
- package/dist/ml/index.d.ts +3 -3
- package/dist/ml/index.js +4 -4
- package/dist/ndarray/index.cjs +125 -125
- package/dist/ndarray/index.d.cts +5 -5
- package/dist/ndarray/index.d.ts +5 -5
- package/dist/ndarray/index.js +2 -2
- package/dist/nn/index.cjs +36 -36
- package/dist/nn/index.d.cts +6 -6
- package/dist/nn/index.d.ts +6 -6
- package/dist/nn/index.js +3 -3
- package/dist/optim/index.cjs +19 -19
- package/dist/optim/index.d.cts +4 -4
- package/dist/optim/index.d.ts +4 -4
- package/dist/optim/index.js +2 -2
- package/dist/plot/index.cjs +29 -29
- package/dist/plot/index.d.cts +6 -6
- package/dist/plot/index.d.ts +6 -6
- package/dist/plot/index.js +3 -3
- package/dist/preprocess/index.cjs +21 -21
- package/dist/preprocess/index.d.cts +4 -4
- package/dist/preprocess/index.d.ts +4 -4
- package/dist/preprocess/index.js +3 -3
- package/dist/random/index.cjs +19 -19
- package/dist/random/index.d.cts +3 -3
- package/dist/random/index.d.ts +3 -3
- package/dist/random/index.js +3 -3
- package/dist/stats/index.cjs +36 -36
- package/dist/stats/index.d.cts +3 -3
- package/dist/stats/index.d.ts +3 -3
- package/dist/stats/index.js +3 -3
- package/dist/{tensor-B96jjJLQ.d.cts → tensor-IlVTF0bz.d.cts} +16 -3
- package/dist/{tensor-B96jjJLQ.d.ts → tensor-IlVTF0bz.d.ts} +16 -3
- package/package.json +3 -2
- package/dist/chunk-4S73VUBD.js.map +0 -1
- package/dist/chunk-5R4S63PF.js.map +0 -1
- package/dist/chunk-6AE5FKKQ.cjs.map +0 -1
- package/dist/chunk-AD436M45.js.map +0 -1
- package/dist/chunk-ALS7ETWZ.cjs.map +0 -1
- package/dist/chunk-B5TNKUEY.js.map +0 -1
- package/dist/chunk-BCR7G3A6.js.map +0 -1
- package/dist/chunk-C4PKXY74.cjs.map +0 -1
- package/dist/chunk-DWZY6PIP.cjs.map +0 -1
- package/dist/chunk-FJYLIGJX.js.map +0 -1
- package/dist/chunk-JSCDE774.cjs.map +0 -1
- package/dist/chunk-MLBMYKCG.js.map +0 -1
- package/dist/chunk-OX6QXFMV.cjs.map +0 -1
- package/dist/chunk-PL7TAYKI.js.map +0 -1
- package/dist/chunk-PR647I7R.js.map +0 -1
- package/dist/chunk-QERHVCHC.cjs.map +0 -1
- package/dist/chunk-XEG44RF6.cjs.map +0 -1
- package/dist/chunk-ZB75FESB.cjs.map +0 -1
- package/dist/chunk-ZLW62TJG.cjs.map +0 -1
- package/dist/chunk-ZXKBDFP3.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DType, a as Device, S as Shape } from './tensor-
|
|
2
|
-
import { T as Tensor } from './Tensor-
|
|
1
|
+
import { D as DType, a as Device, S as Shape } from './tensor-IlVTF0bz.js';
|
|
2
|
+
import { T as Tensor } from './Tensor-BORFp_zt.js';
|
|
3
3
|
|
|
4
4
|
type RandomOptions = {
|
|
5
5
|
readonly dtype?: DType;
|
|
@@ -88,7 +88,7 @@ declare function clearSeed(): void;
|
|
|
88
88
|
* // a and b are identical
|
|
89
89
|
* ```
|
|
90
90
|
*
|
|
91
|
-
* @see {@link https://
|
|
91
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
92
92
|
*/
|
|
93
93
|
declare function rand(shape: Shape, opts?: RandomOptions): Tensor;
|
|
94
94
|
/**
|
|
@@ -111,7 +111,7 @@ declare function rand(shape: Shape, opts?: RandomOptions): Tensor;
|
|
|
111
111
|
* const x = randn([2, 3]); // 2x3 matrix of normal random values
|
|
112
112
|
* ```
|
|
113
113
|
*
|
|
114
|
-
* @see {@link https://
|
|
114
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
115
115
|
*/
|
|
116
116
|
declare function randn(shape: Shape, opts?: RandomOptions): Tensor;
|
|
117
117
|
/**
|
|
@@ -139,7 +139,7 @@ declare function randn(shape: Shape, opts?: RandomOptions): Tensor;
|
|
|
139
139
|
* const x = randint(0, 10, [5]); // 5 random integers from 0 to 9
|
|
140
140
|
* ```
|
|
141
141
|
*
|
|
142
|
-
* @see {@link https://
|
|
142
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
143
143
|
*/
|
|
144
144
|
declare function randint(low: number, high: number, shape: Shape, opts?: RandomOptions): Tensor;
|
|
145
145
|
/**
|
|
@@ -166,7 +166,7 @@ declare function randint(low: number, high: number, shape: Shape, opts?: RandomO
|
|
|
166
166
|
* const x = uniform(-1, 1, [3, 3]); // Values between -1 and 1
|
|
167
167
|
* ```
|
|
168
168
|
*
|
|
169
|
-
* @see {@link https://
|
|
169
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
170
170
|
*/
|
|
171
171
|
declare function uniform(low?: number, high?: number, shape?: Shape, opts?: RandomOptions): Tensor;
|
|
172
172
|
/**
|
|
@@ -194,7 +194,7 @@ declare function uniform(low?: number, high?: number, shape?: Shape, opts?: Rand
|
|
|
194
194
|
* const x = normal(0, 2, [100]); // Mean 0, std 2
|
|
195
195
|
* ```
|
|
196
196
|
*
|
|
197
|
-
* @see {@link https://
|
|
197
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
198
198
|
*/
|
|
199
199
|
declare function normal(mean?: number, std?: number, shape?: Shape, opts?: RandomOptions): Tensor;
|
|
200
200
|
/**
|
|
@@ -223,7 +223,7 @@ declare function normal(mean?: number, std?: number, shape?: Shape, opts?: Rando
|
|
|
223
223
|
* const x = binomial(10, 0.5, [100]); // 10 coin flips, 100 times
|
|
224
224
|
* ```
|
|
225
225
|
*
|
|
226
|
-
* @see {@link https://
|
|
226
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
227
227
|
*/
|
|
228
228
|
declare function binomial(n: number, p: number, shape?: Shape, opts?: RandomOptions): Tensor;
|
|
229
229
|
/**
|
|
@@ -249,7 +249,7 @@ declare function binomial(n: number, p: number, shape?: Shape, opts?: RandomOpti
|
|
|
249
249
|
* const x = poisson(5, [100]); // Rate = 5 events
|
|
250
250
|
* ```
|
|
251
251
|
*
|
|
252
|
-
* @see {@link https://
|
|
252
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
253
253
|
*/
|
|
254
254
|
declare function poisson(lambda: number, shape?: Shape, opts?: RandomOptions): Tensor;
|
|
255
255
|
/**
|
|
@@ -275,7 +275,7 @@ declare function poisson(lambda: number, shape?: Shape, opts?: RandomOptions): T
|
|
|
275
275
|
* const x = exponential(2, [100]);
|
|
276
276
|
* ```
|
|
277
277
|
*
|
|
278
|
-
* @see {@link https://
|
|
278
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
279
279
|
*/
|
|
280
280
|
declare function exponential(scale?: number, shape?: Shape, opts?: RandomOptions): Tensor;
|
|
281
281
|
/**
|
|
@@ -304,7 +304,7 @@ declare function exponential(scale?: number, shape?: Shape, opts?: RandomOptions
|
|
|
304
304
|
* const x = gamma(2, 2, [100]);
|
|
305
305
|
* ```
|
|
306
306
|
*
|
|
307
|
-
* @see {@link https://
|
|
307
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
308
308
|
*/
|
|
309
309
|
declare function gamma(shape_param: number, scale?: number, shape?: Shape, opts?: RandomOptions): Tensor;
|
|
310
310
|
/**
|
|
@@ -332,7 +332,7 @@ declare function gamma(shape_param: number, scale?: number, shape?: Shape, opts?
|
|
|
332
332
|
* const x = beta(2, 5, [100]);
|
|
333
333
|
* ```
|
|
334
334
|
*
|
|
335
|
-
* @see {@link https://
|
|
335
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
336
336
|
*/
|
|
337
337
|
declare function beta(alpha: number, beta_param: number, shape?: Shape, opts?: RandomOptions): Tensor;
|
|
338
338
|
/**
|
|
@@ -368,7 +368,7 @@ declare function beta(alpha: number, beta_param: number, shape?: Shape, opts?: R
|
|
|
368
368
|
* const unique = choice(x, 3, false); // All different elements
|
|
369
369
|
* ```
|
|
370
370
|
*
|
|
371
|
-
* @see {@link https://
|
|
371
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
372
372
|
*/
|
|
373
373
|
declare function choice(a: Tensor | number, size?: number | Shape, replace?: boolean, p?: Tensor): Tensor;
|
|
374
374
|
/**
|
|
@@ -396,7 +396,7 @@ declare function choice(a: Tensor | number, size?: number | Shape, replace?: boo
|
|
|
396
396
|
* console.log(x); // e.g., [3, 1, 5, 2, 4]
|
|
397
397
|
* ```
|
|
398
398
|
*
|
|
399
|
-
* @see {@link https://
|
|
399
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
400
400
|
*/
|
|
401
401
|
declare function shuffle(x: Tensor): void;
|
|
402
402
|
/**
|
|
@@ -428,7 +428,7 @@ declare function shuffle(x: Tensor): void;
|
|
|
428
428
|
* // original is unchanged
|
|
429
429
|
* ```
|
|
430
430
|
*
|
|
431
|
-
* @see {@link https://
|
|
431
|
+
* @see {@link https://deepbox.dev/docs/random-distributions | Deepbox Distributions}
|
|
432
432
|
*/
|
|
433
433
|
declare function permutation(x: Tensor | number): Tensor;
|
|
434
434
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Tensor } from './Tensor-
|
|
1
|
+
import { T as Tensor } from './Tensor-BORFp_zt.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Calculates the accuracy classification score.
|
|
@@ -29,7 +29,7 @@ import { T as Tensor } from './Tensor-g8mUClel.js';
|
|
|
29
29
|
* const acc = accuracy(yTrue, yPred); // 0.8 (4 out of 5 correct)
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
|
-
* @see {@link https://
|
|
32
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
33
33
|
*/
|
|
34
34
|
declare function accuracy(yTrue: Tensor, yPred: Tensor): number;
|
|
35
35
|
/**
|
|
@@ -74,7 +74,7 @@ declare function accuracy(yTrue: Tensor, yPred: Tensor): number;
|
|
|
74
74
|
* const precMacro = precision(yTrueMulti, yPredMulti, 'macro');
|
|
75
75
|
* ```
|
|
76
76
|
*
|
|
77
|
-
* @see {@link https://
|
|
77
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
78
78
|
*/
|
|
79
79
|
declare function precision(yTrue: Tensor, yPred: Tensor): number;
|
|
80
80
|
declare function precision(yTrue: Tensor, yPred: Tensor, average: "binary" | "micro" | "macro" | "weighted"): number;
|
|
@@ -110,7 +110,7 @@ declare function precision(yTrue: Tensor, yPred: Tensor, average: null): number[
|
|
|
110
110
|
* const rec = recall(yTrue, yPred); // 0.667 (2 out of 3 positives found)
|
|
111
111
|
* ```
|
|
112
112
|
*
|
|
113
|
-
* @see {@link https://
|
|
113
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
114
114
|
*/
|
|
115
115
|
declare function recall(yTrue: Tensor, yPred: Tensor): number;
|
|
116
116
|
declare function recall(yTrue: Tensor, yPred: Tensor, average: "binary" | "micro" | "macro" | "weighted"): number;
|
|
@@ -146,11 +146,14 @@ declare function recall(yTrue: Tensor, yPred: Tensor, average: null): number[];
|
|
|
146
146
|
* const f1 = f1Score(yTrue, yPred); // 0.8
|
|
147
147
|
* ```
|
|
148
148
|
*
|
|
149
|
-
* @see {@link https://
|
|
149
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
150
150
|
*/
|
|
151
151
|
declare function f1Score(yTrue: Tensor, yPred: Tensor): number;
|
|
152
152
|
declare function f1Score(yTrue: Tensor, yPred: Tensor, average: "binary" | "micro" | "macro" | "weighted"): number;
|
|
153
153
|
declare function f1Score(yTrue: Tensor, yPred: Tensor, average: null): number[];
|
|
154
|
+
declare function f1Score(yTrue: Tensor, yPred: Tensor, average: {
|
|
155
|
+
average: "binary" | "micro" | "macro" | "weighted";
|
|
156
|
+
}): number;
|
|
154
157
|
/**
|
|
155
158
|
* Calculates the F-beta score.
|
|
156
159
|
*
|
|
@@ -185,7 +188,7 @@ declare function f1Score(yTrue: Tensor, yPred: Tensor, average: null): number[];
|
|
|
185
188
|
* const fb05 = fbetaScore(yTrue, yPred, 0.5); // Favors precision
|
|
186
189
|
* ```
|
|
187
190
|
*
|
|
188
|
-
* @see {@link https://
|
|
191
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
189
192
|
*/
|
|
190
193
|
declare function fbetaScore(yTrue: Tensor, yPred: Tensor, beta: number): number;
|
|
191
194
|
declare function fbetaScore(yTrue: Tensor, yPred: Tensor, beta: number, average: "binary" | "micro" | "macro" | "weighted"): number;
|
|
@@ -219,7 +222,7 @@ declare function fbetaScore(yTrue: Tensor, yPred: Tensor, beta: number, average:
|
|
|
219
222
|
* // [1, 2]]
|
|
220
223
|
* ```
|
|
221
224
|
*
|
|
222
|
-
* @see {@link https://
|
|
225
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
223
226
|
*/
|
|
224
227
|
declare function confusionMatrix(yTrue: Tensor, yPred: Tensor): Tensor;
|
|
225
228
|
/**
|
|
@@ -254,7 +257,7 @@ declare function confusionMatrix(yTrue: Tensor, yPred: Tensor): Tensor;
|
|
|
254
257
|
* // Accuracy: 0.8000
|
|
255
258
|
* ```
|
|
256
259
|
*
|
|
257
|
-
* @see {@link https://
|
|
260
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
258
261
|
*/
|
|
259
262
|
declare function classificationReport(yTrue: Tensor, yPred: Tensor): string;
|
|
260
263
|
/**
|
|
@@ -282,7 +285,7 @@ declare function classificationReport(yTrue: Tensor, yPred: Tensor): string;
|
|
|
282
285
|
* @throws {InvalidParameterError} If yTrue contains non-binary values
|
|
283
286
|
* @throws {DataValidationError} If inputs contain NaN or infinite values
|
|
284
287
|
*
|
|
285
|
-
* @see {@link https://
|
|
288
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
286
289
|
*/
|
|
287
290
|
declare function rocCurve(yTrue: Tensor, yScore: Tensor): [Tensor, Tensor, Tensor];
|
|
288
291
|
/**
|
|
@@ -315,7 +318,7 @@ declare function rocCurve(yTrue: Tensor, yScore: Tensor): [Tensor, Tensor, Tenso
|
|
|
315
318
|
* const auc = rocAucScore(yTrue, yScore); // ~0.75
|
|
316
319
|
* ```
|
|
317
320
|
*
|
|
318
|
-
* @see {@link https://
|
|
321
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
319
322
|
*/
|
|
320
323
|
declare function rocAucScore(yTrue: Tensor, yScore: Tensor): number;
|
|
321
324
|
/**
|
|
@@ -351,7 +354,7 @@ declare function rocAucScore(yTrue: Tensor, yScore: Tensor): number;
|
|
|
351
354
|
* const [prec, rec, thresh] = precisionRecallCurve(yTrue, yScore);
|
|
352
355
|
* ```
|
|
353
356
|
*
|
|
354
|
-
* @see {@link https://
|
|
357
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
355
358
|
*/
|
|
356
359
|
declare function precisionRecallCurve(yTrue: Tensor, yScore: Tensor): [Tensor, Tensor, Tensor];
|
|
357
360
|
/**
|
|
@@ -385,7 +388,7 @@ declare function precisionRecallCurve(yTrue: Tensor, yScore: Tensor): [Tensor, T
|
|
|
385
388
|
* const ap = averagePrecisionScore(yTrue, yScore);
|
|
386
389
|
* ```
|
|
387
390
|
*
|
|
388
|
-
* @see {@link https://
|
|
391
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
389
392
|
*/
|
|
390
393
|
declare function averagePrecisionScore(yTrue: Tensor, yScore: Tensor): number;
|
|
391
394
|
/**
|
|
@@ -409,7 +412,7 @@ declare function averagePrecisionScore(yTrue: Tensor, yScore: Tensor): number;
|
|
|
409
412
|
* @throws {InvalidParameterError} If yTrue is not binary or yPred is outside [0, 1]
|
|
410
413
|
* @throws {DataValidationError} If inputs contain NaN or infinite values
|
|
411
414
|
*
|
|
412
|
-
* @see {@link https://
|
|
415
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
413
416
|
*/
|
|
414
417
|
declare function logLoss(yTrue: Tensor, yPred: Tensor): number;
|
|
415
418
|
/**
|
|
@@ -442,7 +445,7 @@ declare function logLoss(yTrue: Tensor, yPred: Tensor): number;
|
|
|
442
445
|
* const loss = hammingLoss(yTrue, yPred); // 0.2
|
|
443
446
|
* ```
|
|
444
447
|
*
|
|
445
|
-
* @see {@link https://
|
|
448
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
446
449
|
*/
|
|
447
450
|
declare function hammingLoss(yTrue: Tensor, yPred: Tensor): number;
|
|
448
451
|
/**
|
|
@@ -480,7 +483,7 @@ declare function hammingLoss(yTrue: Tensor, yPred: Tensor): number;
|
|
|
480
483
|
* const score = jaccardScore(yTrue, yPred); // 0.667
|
|
481
484
|
* ```
|
|
482
485
|
*
|
|
483
|
-
* @see {@link https://
|
|
486
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
484
487
|
*/
|
|
485
488
|
declare function jaccardScore(yTrue: Tensor, yPred: Tensor): number;
|
|
486
489
|
/**
|
|
@@ -514,7 +517,7 @@ declare function jaccardScore(yTrue: Tensor, yPred: Tensor): number;
|
|
|
514
517
|
* const mcc = matthewsCorrcoef(yTrue, yPred); // ~0.667
|
|
515
518
|
* ```
|
|
516
519
|
*
|
|
517
|
-
* @see {@link https://
|
|
520
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
518
521
|
*/
|
|
519
522
|
declare function matthewsCorrcoef(yTrue: Tensor, yPred: Tensor): number;
|
|
520
523
|
/**
|
|
@@ -550,7 +553,7 @@ declare function matthewsCorrcoef(yTrue: Tensor, yPred: Tensor): number;
|
|
|
550
553
|
* const kappa = cohenKappaScore(yTrue, yPred); // ~0.615
|
|
551
554
|
* ```
|
|
552
555
|
*
|
|
553
|
-
* @see {@link https://
|
|
556
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
554
557
|
*/
|
|
555
558
|
declare function cohenKappaScore(yTrue: Tensor, yPred: Tensor): number;
|
|
556
559
|
/**
|
|
@@ -583,7 +586,7 @@ declare function cohenKappaScore(yTrue: Tensor, yPred: Tensor): number;
|
|
|
583
586
|
* const bacc = balancedAccuracyScore(yTrue, yPred); // 0.5 (not 0.8!)
|
|
584
587
|
* ```
|
|
585
588
|
*
|
|
586
|
-
* @see {@link https://
|
|
589
|
+
* @see {@link https://deepbox.dev/docs/metrics-classification | Deepbox Classification Metrics}
|
|
587
590
|
*/
|
|
588
591
|
declare function balancedAccuracyScore(yTrue: Tensor, yPred: Tensor): number;
|
|
589
592
|
|
|
@@ -616,7 +619,7 @@ type SilhouetteMetric = "euclidean" | "precomputed";
|
|
|
616
619
|
* @throws {DTypeError} If labels are string or X is non-numeric
|
|
617
620
|
* @throws {DataValidationError} If X contains non-finite values
|
|
618
621
|
*
|
|
619
|
-
* @see {@link https://
|
|
622
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
620
623
|
*/
|
|
621
624
|
declare function silhouetteScore(X: Tensor, labels: Tensor, metric?: SilhouetteMetric, options?: {
|
|
622
625
|
sampleSize?: number;
|
|
@@ -641,7 +644,7 @@ declare function silhouetteScore(X: Tensor, labels: Tensor, metric?: SilhouetteM
|
|
|
641
644
|
* @throws {DTypeError} If labels are string or X is non-numeric
|
|
642
645
|
* @throws {DataValidationError} If X contains non-finite values
|
|
643
646
|
*
|
|
644
|
-
* @see {@link https://
|
|
647
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
645
648
|
*/
|
|
646
649
|
declare function silhouetteSamples(X: Tensor, labels: Tensor, metric?: SilhouetteMetric): Tensor;
|
|
647
650
|
/**
|
|
@@ -662,7 +665,7 @@ declare function silhouetteSamples(X: Tensor, labels: Tensor, metric?: Silhouett
|
|
|
662
665
|
* @throws {DTypeError} If labels are string or X is non-numeric
|
|
663
666
|
* @throws {DataValidationError} If X contains non-finite values
|
|
664
667
|
*
|
|
665
|
-
* @see {@link https://
|
|
668
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
666
669
|
*/
|
|
667
670
|
declare function daviesBouldinScore(X: Tensor, labels: Tensor): number;
|
|
668
671
|
/**
|
|
@@ -683,7 +686,7 @@ declare function daviesBouldinScore(X: Tensor, labels: Tensor): number;
|
|
|
683
686
|
* @throws {DTypeError} If labels are string or X is non-numeric
|
|
684
687
|
* @throws {DataValidationError} If X contains non-finite values
|
|
685
688
|
*
|
|
686
|
-
* @see {@link https://
|
|
689
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
687
690
|
*/
|
|
688
691
|
declare function calinskiHarabaszScore(X: Tensor, labels: Tensor): number;
|
|
689
692
|
/**
|
|
@@ -704,7 +707,7 @@ declare function calinskiHarabaszScore(X: Tensor, labels: Tensor): number;
|
|
|
704
707
|
* @throws {DTypeError} If labels are string
|
|
705
708
|
* @throws {DataValidationError} If labels contain non-finite or non-integer values
|
|
706
709
|
*
|
|
707
|
-
* @see {@link https://
|
|
710
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
708
711
|
*/
|
|
709
712
|
declare function adjustedRandScore(labelsTrue: Tensor, labelsPred: Tensor): number;
|
|
710
713
|
/**
|
|
@@ -725,7 +728,7 @@ declare function adjustedRandScore(labelsTrue: Tensor, labelsPred: Tensor): numb
|
|
|
725
728
|
* @throws {DTypeError} If labels are string
|
|
726
729
|
* @throws {DataValidationError} If labels contain non-finite or non-integer values
|
|
727
730
|
*
|
|
728
|
-
* @see {@link https://
|
|
731
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
729
732
|
*/
|
|
730
733
|
declare function adjustedMutualInfoScore(labelsTrue: Tensor, labelsPred: Tensor, averageMethod?: AverageMethod): number;
|
|
731
734
|
/**
|
|
@@ -746,7 +749,7 @@ declare function adjustedMutualInfoScore(labelsTrue: Tensor, labelsPred: Tensor,
|
|
|
746
749
|
* @throws {DTypeError} If labels are string
|
|
747
750
|
* @throws {DataValidationError} If labels contain non-finite or non-integer values
|
|
748
751
|
*
|
|
749
|
-
* @see {@link https://
|
|
752
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
750
753
|
*/
|
|
751
754
|
declare function normalizedMutualInfoScore(labelsTrue: Tensor, labelsPred: Tensor, averageMethod?: AverageMethod): number;
|
|
752
755
|
/**
|
|
@@ -766,7 +769,7 @@ declare function normalizedMutualInfoScore(labelsTrue: Tensor, labelsPred: Tenso
|
|
|
766
769
|
* @throws {DTypeError} If labels are string
|
|
767
770
|
* @throws {DataValidationError} If labels contain non-finite or non-integer values
|
|
768
771
|
*
|
|
769
|
-
* @see {@link https://
|
|
772
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
770
773
|
*/
|
|
771
774
|
declare function fowlkesMallowsScore(labelsTrue: Tensor, labelsPred: Tensor): number;
|
|
772
775
|
/**
|
|
@@ -787,7 +790,7 @@ declare function fowlkesMallowsScore(labelsTrue: Tensor, labelsPred: Tensor): nu
|
|
|
787
790
|
* @throws {DTypeError} If labels are string
|
|
788
791
|
* @throws {DataValidationError} If labels contain non-finite or non-integer values
|
|
789
792
|
*
|
|
790
|
-
* @see {@link https://
|
|
793
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
791
794
|
*/
|
|
792
795
|
declare function homogeneityScore(labelsTrue: Tensor, labelsPred: Tensor): number;
|
|
793
796
|
/**
|
|
@@ -808,7 +811,7 @@ declare function homogeneityScore(labelsTrue: Tensor, labelsPred: Tensor): numbe
|
|
|
808
811
|
* @throws {DTypeError} If labels are string
|
|
809
812
|
* @throws {DataValidationError} If labels contain non-finite or non-integer values
|
|
810
813
|
*
|
|
811
|
-
* @see {@link https://
|
|
814
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
812
815
|
*/
|
|
813
816
|
declare function completenessScore(labelsTrue: Tensor, labelsPred: Tensor): number;
|
|
814
817
|
/**
|
|
@@ -833,7 +836,7 @@ declare function completenessScore(labelsTrue: Tensor, labelsPred: Tensor): numb
|
|
|
833
836
|
* @throws {InvalidParameterError} If beta is not a positive finite number
|
|
834
837
|
* @throws {DataValidationError} If labels contain non-finite or non-integer values
|
|
835
838
|
*
|
|
836
|
-
* @see {@link https://
|
|
839
|
+
* @see {@link https://deepbox.dev/docs/metrics-clustering | Deepbox Clustering Metrics}
|
|
837
840
|
*/
|
|
838
841
|
declare function vMeasureScore(labelsTrue: Tensor, labelsPred: Tensor, beta?: number): number;
|
|
839
842
|
|
|
@@ -865,7 +868,7 @@ declare function vMeasureScore(labelsTrue: Tensor, labelsPred: Tensor, beta?: nu
|
|
|
865
868
|
* const error = mse(yTrue, yPred); // 0.375
|
|
866
869
|
* ```
|
|
867
870
|
*
|
|
868
|
-
* @see {@link https://
|
|
871
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
869
872
|
*/
|
|
870
873
|
declare function mse(yTrue: Tensor, yPred: Tensor): number;
|
|
871
874
|
/**
|
|
@@ -896,7 +899,7 @@ declare function mse(yTrue: Tensor, yPred: Tensor): number;
|
|
|
896
899
|
* const error = rmse(yTrue, yPred); // √0.375 ≈ 0.612
|
|
897
900
|
* ```
|
|
898
901
|
*
|
|
899
|
-
* @see {@link https://
|
|
902
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
900
903
|
*/
|
|
901
904
|
declare function rmse(yTrue: Tensor, yPred: Tensor): number;
|
|
902
905
|
/**
|
|
@@ -927,7 +930,7 @@ declare function rmse(yTrue: Tensor, yPred: Tensor): number;
|
|
|
927
930
|
* const error = mae(yTrue, yPred); // 0.5
|
|
928
931
|
* ```
|
|
929
932
|
*
|
|
930
|
-
* @see {@link https://
|
|
933
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
931
934
|
*/
|
|
932
935
|
declare function mae(yTrue: Tensor, yPred: Tensor): number;
|
|
933
936
|
/**
|
|
@@ -963,7 +966,7 @@ declare function mae(yTrue: Tensor, yPred: Tensor): number;
|
|
|
963
966
|
* const score = r2Score(yTrue, yPred); // Close to 1 for good fit
|
|
964
967
|
* ```
|
|
965
968
|
*
|
|
966
|
-
* @see {@link https://
|
|
969
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
967
970
|
*/
|
|
968
971
|
declare function r2Score(yTrue: Tensor, yPred: Tensor): number;
|
|
969
972
|
/**
|
|
@@ -1001,7 +1004,7 @@ declare function r2Score(yTrue: Tensor, yPred: Tensor): number;
|
|
|
1001
1004
|
* const score = adjustedR2Score(yTrue, yPred, 2); // Adjusted for 2 features
|
|
1002
1005
|
* ```
|
|
1003
1006
|
*
|
|
1004
|
-
* @see {@link https://
|
|
1007
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
1005
1008
|
*/
|
|
1006
1009
|
declare function adjustedR2Score(yTrue: Tensor, yPred: Tensor, nFeatures: number): number;
|
|
1007
1010
|
/**
|
|
@@ -1037,7 +1040,7 @@ declare function adjustedR2Score(yTrue: Tensor, yPred: Tensor, nFeatures: number
|
|
|
1037
1040
|
* const error = mape(yTrue, yPred); // Percentage error
|
|
1038
1041
|
* ```
|
|
1039
1042
|
*
|
|
1040
|
-
* @see {@link https://
|
|
1043
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
1041
1044
|
*/
|
|
1042
1045
|
declare function mape(yTrue: Tensor, yPred: Tensor): number;
|
|
1043
1046
|
/**
|
|
@@ -1068,7 +1071,7 @@ declare function mape(yTrue: Tensor, yPred: Tensor): number;
|
|
|
1068
1071
|
* const error = medianAbsoluteError(yTrue, yPred);
|
|
1069
1072
|
* ```
|
|
1070
1073
|
*
|
|
1071
|
-
* @see {@link https://
|
|
1074
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
1072
1075
|
*/
|
|
1073
1076
|
declare function medianAbsoluteError(yTrue: Tensor, yPred: Tensor): number;
|
|
1074
1077
|
/**
|
|
@@ -1099,7 +1102,7 @@ declare function medianAbsoluteError(yTrue: Tensor, yPred: Tensor): number;
|
|
|
1099
1102
|
* const error = maxError(yTrue, yPred); // 1.0 (worst prediction)
|
|
1100
1103
|
* ```
|
|
1101
1104
|
*
|
|
1102
|
-
* @see {@link https://
|
|
1105
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
1103
1106
|
*/
|
|
1104
1107
|
declare function maxError(yTrue: Tensor, yPred: Tensor): number;
|
|
1105
1108
|
/**
|
|
@@ -1132,7 +1135,7 @@ declare function maxError(yTrue: Tensor, yPred: Tensor): number;
|
|
|
1132
1135
|
* const score = explainedVarianceScore(yTrue, yPred);
|
|
1133
1136
|
* ```
|
|
1134
1137
|
*
|
|
1135
|
-
* @see {@link https://
|
|
1138
|
+
* @see {@link https://deepbox.dev/docs/metrics-regression | Deepbox Regression Metrics}
|
|
1136
1139
|
*/
|
|
1137
1140
|
declare function explainedVarianceScore(yTrue: Tensor, yPred: Tensor): number;
|
|
1138
1141
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DType, a as Device, S as Shape, A as Axis,
|
|
1
|
+
import { D as DType, a as Device, S as Shape, A as Axis, T as TypedArray, d as DEVICES, e as DTYPES, E as ElementOf, c as ScalarDType, b as TensorLike, f as TensorStorage, i as isDType, g as isDevice } from './tensor-IlVTF0bz.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Global configuration for Deepbox.
|
|
@@ -150,7 +150,7 @@ declare class DeepboxError extends Error {
|
|
|
150
150
|
* ```
|
|
151
151
|
*
|
|
152
152
|
* References:
|
|
153
|
-
* -
|
|
153
|
+
* - Deepbox broadcasting: https://deepbox.dev/docs/ndarray-ops
|
|
154
154
|
*/
|
|
155
155
|
declare class BroadcastError extends DeepboxError {
|
|
156
156
|
name: string;
|
|
@@ -188,8 +188,8 @@ type ConvergenceErrorDetails = {
|
|
|
188
188
|
* ```
|
|
189
189
|
*
|
|
190
190
|
* References:
|
|
191
|
-
* -
|
|
192
|
-
* https://
|
|
191
|
+
* - Deepbox convergence diagnostics:
|
|
192
|
+
* https://deepbox.dev/docs/core-errors
|
|
193
193
|
*/
|
|
194
194
|
declare class ConvergenceError extends DeepboxError {
|
|
195
195
|
name: string;
|
|
@@ -296,7 +296,7 @@ declare class MemoryError extends DeepboxError {
|
|
|
296
296
|
/**
|
|
297
297
|
* Error thrown when a model or estimator is used before being fitted.
|
|
298
298
|
*
|
|
299
|
-
*
|
|
299
|
+
* Thrown when a model is used before calling fit().
|
|
300
300
|
*
|
|
301
301
|
* @example
|
|
302
302
|
* ```ts
|
|
@@ -318,7 +318,7 @@ declare class MemoryError extends DeepboxError {
|
|
|
318
318
|
* ```
|
|
319
319
|
*
|
|
320
320
|
* References:
|
|
321
|
-
* -
|
|
321
|
+
* - Deepbox NotFittedError: https://deepbox.dev/docs/core-errors
|
|
322
322
|
*/
|
|
323
323
|
declare class NotFittedError extends DeepboxError {
|
|
324
324
|
name: string;
|
|
@@ -449,7 +449,7 @@ type NumericDType = Exclude<DType, "string">;
|
|
|
449
449
|
* @returns The same dtype narrowed to numeric types
|
|
450
450
|
* @throws {DTypeError} If dtype is 'string'
|
|
451
451
|
*/
|
|
452
|
-
declare function ensureNumericDType(dtype: DType, context
|
|
452
|
+
declare function ensureNumericDType(dtype: DType, context?: string): NumericDType;
|
|
453
453
|
/**
|
|
454
454
|
* Get TypedArray constructor for a given DType.
|
|
455
455
|
*
|
|
@@ -724,6 +724,7 @@ declare const index_DeepboxError: typeof DeepboxError;
|
|
|
724
724
|
declare const index_Device: typeof Device;
|
|
725
725
|
type index_DeviceError = DeviceError;
|
|
726
726
|
declare const index_DeviceError: typeof DeviceError;
|
|
727
|
+
declare const index_ElementOf: typeof ElementOf;
|
|
727
728
|
type index_IndexError = IndexError;
|
|
728
729
|
declare const index_IndexError: typeof IndexError;
|
|
729
730
|
type index_InvalidParameterError = InvalidParameterError;
|
|
@@ -736,6 +737,7 @@ type index_NotImplementedError = NotImplementedError;
|
|
|
736
737
|
declare const index_NotImplementedError: typeof NotImplementedError;
|
|
737
738
|
type index_NumericDType = NumericDType;
|
|
738
739
|
type index_NumericTypedArray = NumericTypedArray;
|
|
740
|
+
declare const index_ScalarDType: typeof ScalarDType;
|
|
739
741
|
declare const index_Shape: typeof Shape;
|
|
740
742
|
type index_ShapeError = ShapeError;
|
|
741
743
|
declare const index_ShapeError: typeof ShapeError;
|
|
@@ -779,7 +781,7 @@ declare const index_validatePositive: typeof validatePositive;
|
|
|
779
781
|
declare const index_validateRange: typeof validateRange;
|
|
780
782
|
declare const index_validateShape: typeof validateShape;
|
|
781
783
|
declare namespace index {
|
|
782
|
-
export { index_Axis as Axis, index_BroadcastError as BroadcastError, index_ConvergenceError as ConvergenceError, type index_ConvergenceErrorDetails as ConvergenceErrorDetails, index_DEVICES as DEVICES, index_DTYPES as DTYPES, index_DType as DType, index_DTypeError as DTypeError, index_DataValidationError as DataValidationError, type index_DeepboxConfig as DeepboxConfig, index_DeepboxError as DeepboxError, index_Device as Device, index_DeviceError as DeviceError, index_IndexError as IndexError, index_InvalidParameterError as InvalidParameterError, index_MemoryError as MemoryError, index_NotFittedError as NotFittedError, index_NotImplementedError as NotImplementedError, type index_NumericDType as NumericDType, type index_NumericTypedArray as NumericTypedArray, index_Shape as Shape, index_ShapeError as ShapeError, type index_ShapeErrorDetails as ShapeErrorDetails, index_TensorLike as TensorLike, index_TensorStorage as TensorStorage, index_TypedArray as TypedArray, index_asReadonlyArray as asReadonlyArray, index_dtypeToTypedArrayCtor as dtypeToTypedArrayCtor, index_ensureNumericDType as ensureNumericDType, index_getArrayElement as getArrayElement, index_getBigIntElement as getBigIntElement, index_getConfig as getConfig, index_getDevice as getDevice, index_getDtype as getDtype, index_getElementAsNumber as getElementAsNumber, index_getNumericElement as getNumericElement, index_getSeed as getSeed, index_getShapeDim as getShapeDim, index_getStringElement as getStringElement, index_isBigInt64Array as isBigInt64Array, index_isDType as isDType, index_isDevice as isDevice, index_isNumericTypedArray as isNumericTypedArray, index_isTypedArray as isTypedArray, index_normalizeAxes as normalizeAxes, index_normalizeAxis as normalizeAxis, index_resetConfig as resetConfig, index_setConfig as setConfig, index_setDevice as setDevice, index_setDtype as setDtype, index_setSeed as setSeed, index_shapeToSize as shapeToSize, index_validateArray as validateArray, index_validateDevice as validateDevice, index_validateDtype as validateDtype, index_validateInteger as validateInteger, index_validateNonNegative as validateNonNegative, index_validateOneOf as validateOneOf, index_validatePositive as validatePositive, index_validateRange as validateRange, index_validateShape as validateShape };
|
|
784
|
+
export { index_Axis as Axis, index_BroadcastError as BroadcastError, index_ConvergenceError as ConvergenceError, type index_ConvergenceErrorDetails as ConvergenceErrorDetails, index_DEVICES as DEVICES, index_DTYPES as DTYPES, index_DType as DType, index_DTypeError as DTypeError, index_DataValidationError as DataValidationError, type index_DeepboxConfig as DeepboxConfig, index_DeepboxError as DeepboxError, index_Device as Device, index_DeviceError as DeviceError, index_ElementOf as ElementOf, index_IndexError as IndexError, index_InvalidParameterError as InvalidParameterError, index_MemoryError as MemoryError, index_NotFittedError as NotFittedError, index_NotImplementedError as NotImplementedError, type index_NumericDType as NumericDType, type index_NumericTypedArray as NumericTypedArray, index_ScalarDType as ScalarDType, index_Shape as Shape, index_ShapeError as ShapeError, type index_ShapeErrorDetails as ShapeErrorDetails, index_TensorLike as TensorLike, index_TensorStorage as TensorStorage, index_TypedArray as TypedArray, index_asReadonlyArray as asReadonlyArray, index_dtypeToTypedArrayCtor as dtypeToTypedArrayCtor, index_ensureNumericDType as ensureNumericDType, index_getArrayElement as getArrayElement, index_getBigIntElement as getBigIntElement, index_getConfig as getConfig, index_getDevice as getDevice, index_getDtype as getDtype, index_getElementAsNumber as getElementAsNumber, index_getNumericElement as getNumericElement, index_getSeed as getSeed, index_getShapeDim as getShapeDim, index_getStringElement as getStringElement, index_isBigInt64Array as isBigInt64Array, index_isDType as isDType, index_isDevice as isDevice, index_isNumericTypedArray as isNumericTypedArray, index_isTypedArray as isTypedArray, index_normalizeAxes as normalizeAxes, index_normalizeAxis as normalizeAxis, index_resetConfig as resetConfig, index_setConfig as setConfig, index_setDevice as setDevice, index_setDtype as setDtype, index_setSeed as setSeed, index_shapeToSize as shapeToSize, index_validateArray as validateArray, index_validateDevice as validateDevice, index_validateDtype as validateDtype, index_validateInteger as validateInteger, index_validateNonNegative as validateNonNegative, index_validateOneOf as validateOneOf, index_validatePositive as validatePositive, index_validateRange as validateRange, index_validateShape as validateShape };
|
|
783
785
|
}
|
|
784
786
|
|
|
785
787
|
export { getStringElement as A, BroadcastError as B, ConvergenceError as C, type DeepboxConfig as D, isBigInt64Array as E, isNumericTypedArray as F, isTypedArray as G, type NumericDType as H, IndexError as I, type NumericTypedArray as J, normalizeAxes as K, normalizeAxis as L, MemoryError as M, NotFittedError as N, shapeToSize as O, validateArray as P, validateDevice as Q, validateDtype as R, ShapeError as S, validateInteger as T, validateNonNegative as U, validateOneOf as V, validatePositive as W, validateRange as X, validateShape as Y, getDevice as a, getDtype as b, getSeed as c, setDevice as d, setDtype as e, setSeed as f, getConfig as g, type ConvergenceErrorDetails as h, index as i, DataValidationError as j, DeepboxError as k, DeviceError as l, DTypeError as m, InvalidParameterError as n, NotImplementedError as o, type ShapeErrorDetails as p, asReadonlyArray as q, resetConfig as r, setConfig as s, dtypeToTypedArrayCtor as t, ensureNumericDType as u, getArrayElement as v, getBigIntElement as w, getElementAsNumber as x, getNumericElement as y, getShapeDim as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DType, a as Device, S as Shape, A as Axis,
|
|
1
|
+
import { D as DType, a as Device, S as Shape, A as Axis, T as TypedArray, d as DEVICES, e as DTYPES, E as ElementOf, c as ScalarDType, b as TensorLike, f as TensorStorage, i as isDType, g as isDevice } from './tensor-IlVTF0bz.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Global configuration for Deepbox.
|
|
@@ -150,7 +150,7 @@ declare class DeepboxError extends Error {
|
|
|
150
150
|
* ```
|
|
151
151
|
*
|
|
152
152
|
* References:
|
|
153
|
-
* -
|
|
153
|
+
* - Deepbox broadcasting: https://deepbox.dev/docs/ndarray-ops
|
|
154
154
|
*/
|
|
155
155
|
declare class BroadcastError extends DeepboxError {
|
|
156
156
|
name: string;
|
|
@@ -188,8 +188,8 @@ type ConvergenceErrorDetails = {
|
|
|
188
188
|
* ```
|
|
189
189
|
*
|
|
190
190
|
* References:
|
|
191
|
-
* -
|
|
192
|
-
* https://
|
|
191
|
+
* - Deepbox convergence diagnostics:
|
|
192
|
+
* https://deepbox.dev/docs/core-errors
|
|
193
193
|
*/
|
|
194
194
|
declare class ConvergenceError extends DeepboxError {
|
|
195
195
|
name: string;
|
|
@@ -296,7 +296,7 @@ declare class MemoryError extends DeepboxError {
|
|
|
296
296
|
/**
|
|
297
297
|
* Error thrown when a model or estimator is used before being fitted.
|
|
298
298
|
*
|
|
299
|
-
*
|
|
299
|
+
* Thrown when a model is used before calling fit().
|
|
300
300
|
*
|
|
301
301
|
* @example
|
|
302
302
|
* ```ts
|
|
@@ -318,7 +318,7 @@ declare class MemoryError extends DeepboxError {
|
|
|
318
318
|
* ```
|
|
319
319
|
*
|
|
320
320
|
* References:
|
|
321
|
-
* -
|
|
321
|
+
* - Deepbox NotFittedError: https://deepbox.dev/docs/core-errors
|
|
322
322
|
*/
|
|
323
323
|
declare class NotFittedError extends DeepboxError {
|
|
324
324
|
name: string;
|
|
@@ -449,7 +449,7 @@ type NumericDType = Exclude<DType, "string">;
|
|
|
449
449
|
* @returns The same dtype narrowed to numeric types
|
|
450
450
|
* @throws {DTypeError} If dtype is 'string'
|
|
451
451
|
*/
|
|
452
|
-
declare function ensureNumericDType(dtype: DType, context
|
|
452
|
+
declare function ensureNumericDType(dtype: DType, context?: string): NumericDType;
|
|
453
453
|
/**
|
|
454
454
|
* Get TypedArray constructor for a given DType.
|
|
455
455
|
*
|
|
@@ -724,6 +724,7 @@ declare const index_DeepboxError: typeof DeepboxError;
|
|
|
724
724
|
declare const index_Device: typeof Device;
|
|
725
725
|
type index_DeviceError = DeviceError;
|
|
726
726
|
declare const index_DeviceError: typeof DeviceError;
|
|
727
|
+
declare const index_ElementOf: typeof ElementOf;
|
|
727
728
|
type index_IndexError = IndexError;
|
|
728
729
|
declare const index_IndexError: typeof IndexError;
|
|
729
730
|
type index_InvalidParameterError = InvalidParameterError;
|
|
@@ -736,6 +737,7 @@ type index_NotImplementedError = NotImplementedError;
|
|
|
736
737
|
declare const index_NotImplementedError: typeof NotImplementedError;
|
|
737
738
|
type index_NumericDType = NumericDType;
|
|
738
739
|
type index_NumericTypedArray = NumericTypedArray;
|
|
740
|
+
declare const index_ScalarDType: typeof ScalarDType;
|
|
739
741
|
declare const index_Shape: typeof Shape;
|
|
740
742
|
type index_ShapeError = ShapeError;
|
|
741
743
|
declare const index_ShapeError: typeof ShapeError;
|
|
@@ -779,7 +781,7 @@ declare const index_validatePositive: typeof validatePositive;
|
|
|
779
781
|
declare const index_validateRange: typeof validateRange;
|
|
780
782
|
declare const index_validateShape: typeof validateShape;
|
|
781
783
|
declare namespace index {
|
|
782
|
-
export { index_Axis as Axis, index_BroadcastError as BroadcastError, index_ConvergenceError as ConvergenceError, type index_ConvergenceErrorDetails as ConvergenceErrorDetails, index_DEVICES as DEVICES, index_DTYPES as DTYPES, index_DType as DType, index_DTypeError as DTypeError, index_DataValidationError as DataValidationError, type index_DeepboxConfig as DeepboxConfig, index_DeepboxError as DeepboxError, index_Device as Device, index_DeviceError as DeviceError, index_IndexError as IndexError, index_InvalidParameterError as InvalidParameterError, index_MemoryError as MemoryError, index_NotFittedError as NotFittedError, index_NotImplementedError as NotImplementedError, type index_NumericDType as NumericDType, type index_NumericTypedArray as NumericTypedArray, index_Shape as Shape, index_ShapeError as ShapeError, type index_ShapeErrorDetails as ShapeErrorDetails, index_TensorLike as TensorLike, index_TensorStorage as TensorStorage, index_TypedArray as TypedArray, index_asReadonlyArray as asReadonlyArray, index_dtypeToTypedArrayCtor as dtypeToTypedArrayCtor, index_ensureNumericDType as ensureNumericDType, index_getArrayElement as getArrayElement, index_getBigIntElement as getBigIntElement, index_getConfig as getConfig, index_getDevice as getDevice, index_getDtype as getDtype, index_getElementAsNumber as getElementAsNumber, index_getNumericElement as getNumericElement, index_getSeed as getSeed, index_getShapeDim as getShapeDim, index_getStringElement as getStringElement, index_isBigInt64Array as isBigInt64Array, index_isDType as isDType, index_isDevice as isDevice, index_isNumericTypedArray as isNumericTypedArray, index_isTypedArray as isTypedArray, index_normalizeAxes as normalizeAxes, index_normalizeAxis as normalizeAxis, index_resetConfig as resetConfig, index_setConfig as setConfig, index_setDevice as setDevice, index_setDtype as setDtype, index_setSeed as setSeed, index_shapeToSize as shapeToSize, index_validateArray as validateArray, index_validateDevice as validateDevice, index_validateDtype as validateDtype, index_validateInteger as validateInteger, index_validateNonNegative as validateNonNegative, index_validateOneOf as validateOneOf, index_validatePositive as validatePositive, index_validateRange as validateRange, index_validateShape as validateShape };
|
|
784
|
+
export { index_Axis as Axis, index_BroadcastError as BroadcastError, index_ConvergenceError as ConvergenceError, type index_ConvergenceErrorDetails as ConvergenceErrorDetails, index_DEVICES as DEVICES, index_DTYPES as DTYPES, index_DType as DType, index_DTypeError as DTypeError, index_DataValidationError as DataValidationError, type index_DeepboxConfig as DeepboxConfig, index_DeepboxError as DeepboxError, index_Device as Device, index_DeviceError as DeviceError, index_ElementOf as ElementOf, index_IndexError as IndexError, index_InvalidParameterError as InvalidParameterError, index_MemoryError as MemoryError, index_NotFittedError as NotFittedError, index_NotImplementedError as NotImplementedError, type index_NumericDType as NumericDType, type index_NumericTypedArray as NumericTypedArray, index_ScalarDType as ScalarDType, index_Shape as Shape, index_ShapeError as ShapeError, type index_ShapeErrorDetails as ShapeErrorDetails, index_TensorLike as TensorLike, index_TensorStorage as TensorStorage, index_TypedArray as TypedArray, index_asReadonlyArray as asReadonlyArray, index_dtypeToTypedArrayCtor as dtypeToTypedArrayCtor, index_ensureNumericDType as ensureNumericDType, index_getArrayElement as getArrayElement, index_getBigIntElement as getBigIntElement, index_getConfig as getConfig, index_getDevice as getDevice, index_getDtype as getDtype, index_getElementAsNumber as getElementAsNumber, index_getNumericElement as getNumericElement, index_getSeed as getSeed, index_getShapeDim as getShapeDim, index_getStringElement as getStringElement, index_isBigInt64Array as isBigInt64Array, index_isDType as isDType, index_isDevice as isDevice, index_isNumericTypedArray as isNumericTypedArray, index_isTypedArray as isTypedArray, index_normalizeAxes as normalizeAxes, index_normalizeAxis as normalizeAxis, index_resetConfig as resetConfig, index_setConfig as setConfig, index_setDevice as setDevice, index_setDtype as setDtype, index_setSeed as setSeed, index_shapeToSize as shapeToSize, index_validateArray as validateArray, index_validateDevice as validateDevice, index_validateDtype as validateDtype, index_validateInteger as validateInteger, index_validateNonNegative as validateNonNegative, index_validateOneOf as validateOneOf, index_validatePositive as validatePositive, index_validateRange as validateRange, index_validateShape as validateShape };
|
|
783
785
|
}
|
|
784
786
|
|
|
785
787
|
export { getStringElement as A, BroadcastError as B, ConvergenceError as C, type DeepboxConfig as D, isBigInt64Array as E, isNumericTypedArray as F, isTypedArray as G, type NumericDType as H, IndexError as I, type NumericTypedArray as J, normalizeAxes as K, normalizeAxis as L, MemoryError as M, NotFittedError as N, shapeToSize as O, validateArray as P, validateDevice as Q, validateDtype as R, ShapeError as S, validateInteger as T, validateNonNegative as U, validateOneOf as V, validatePositive as W, validateRange as X, validateShape as Y, getDevice as a, getDtype as b, getSeed as c, setDevice as d, setDtype as e, setSeed as f, getConfig as g, type ConvergenceErrorDetails as h, index as i, DataValidationError as j, DeepboxError as k, DeviceError as l, DTypeError as m, InvalidParameterError as n, NotImplementedError as o, type ShapeErrorDetails as p, asReadonlyArray as q, resetConfig as r, setConfig as s, dtypeToTypedArrayCtor as t, ensureNumericDType as u, getArrayElement as v, getBigIntElement as w, getElementAsNumber as x, getNumericElement as y, getShapeDim as z };
|