deepbox 0.1.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 +21 -0
- package/README.md +344 -0
- package/dist/CSRMatrix-CwGwQRea.d.cts +219 -0
- package/dist/CSRMatrix-KzNt6QpS.d.ts +219 -0
- package/dist/Tensor-BQLk1ltW.d.cts +147 -0
- package/dist/Tensor-g8mUClel.d.ts +147 -0
- package/dist/chunk-4S73VUBD.js +677 -0
- package/dist/chunk-4S73VUBD.js.map +1 -0
- package/dist/chunk-5R4S63PF.js +2925 -0
- package/dist/chunk-5R4S63PF.js.map +1 -0
- package/dist/chunk-6AE5FKKQ.cjs +9264 -0
- package/dist/chunk-6AE5FKKQ.cjs.map +1 -0
- package/dist/chunk-AD436M45.js +3854 -0
- package/dist/chunk-AD436M45.js.map +1 -0
- package/dist/chunk-ALS7ETWZ.cjs +4263 -0
- package/dist/chunk-ALS7ETWZ.cjs.map +1 -0
- package/dist/chunk-AU7XHGKJ.js +2092 -0
- package/dist/chunk-AU7XHGKJ.js.map +1 -0
- package/dist/chunk-B5TNKUEY.js +1481 -0
- package/dist/chunk-B5TNKUEY.js.map +1 -0
- package/dist/chunk-BCR7G3A6.js +9136 -0
- package/dist/chunk-BCR7G3A6.js.map +1 -0
- package/dist/chunk-C4PKXY74.cjs +1917 -0
- package/dist/chunk-C4PKXY74.cjs.map +1 -0
- package/dist/chunk-DWZY6PIP.cjs +6400 -0
- package/dist/chunk-DWZY6PIP.cjs.map +1 -0
- package/dist/chunk-E3EU5FZO.cjs +2113 -0
- package/dist/chunk-E3EU5FZO.cjs.map +1 -0
- package/dist/chunk-F3JWBINJ.js +1054 -0
- package/dist/chunk-F3JWBINJ.js.map +1 -0
- package/dist/chunk-FJYLIGJX.js +1940 -0
- package/dist/chunk-FJYLIGJX.js.map +1 -0
- package/dist/chunk-JSCDE774.cjs +729 -0
- package/dist/chunk-JSCDE774.cjs.map +1 -0
- package/dist/chunk-LWECRCW2.cjs +2412 -0
- package/dist/chunk-LWECRCW2.cjs.map +1 -0
- package/dist/chunk-MLBMYKCG.js +6379 -0
- package/dist/chunk-MLBMYKCG.js.map +1 -0
- package/dist/chunk-OX6QXFMV.cjs +3874 -0
- package/dist/chunk-OX6QXFMV.cjs.map +1 -0
- package/dist/chunk-PHV2DKRS.cjs +1072 -0
- package/dist/chunk-PHV2DKRS.cjs.map +1 -0
- package/dist/chunk-PL7TAYKI.js +4056 -0
- package/dist/chunk-PL7TAYKI.js.map +1 -0
- package/dist/chunk-PR647I7R.js +1898 -0
- package/dist/chunk-PR647I7R.js.map +1 -0
- package/dist/chunk-QERHVCHC.cjs +2960 -0
- package/dist/chunk-QERHVCHC.cjs.map +1 -0
- package/dist/chunk-XEG44RF6.cjs +1514 -0
- package/dist/chunk-XEG44RF6.cjs.map +1 -0
- package/dist/chunk-XMWVME2W.js +2377 -0
- package/dist/chunk-XMWVME2W.js.map +1 -0
- package/dist/chunk-ZB75FESB.cjs +1979 -0
- package/dist/chunk-ZB75FESB.cjs.map +1 -0
- package/dist/chunk-ZLW62TJG.cjs +4061 -0
- package/dist/chunk-ZLW62TJG.cjs.map +1 -0
- package/dist/chunk-ZXKBDFP3.js +4235 -0
- package/dist/chunk-ZXKBDFP3.js.map +1 -0
- package/dist/core/index.cjs +204 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +2 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -0
- package/dist/dataframe/index.cjs +22 -0
- package/dist/dataframe/index.cjs.map +1 -0
- package/dist/dataframe/index.d.cts +3 -0
- package/dist/dataframe/index.d.ts +3 -0
- package/dist/dataframe/index.js +5 -0
- package/dist/dataframe/index.js.map +1 -0
- package/dist/datasets/index.cjs +134 -0
- package/dist/datasets/index.cjs.map +1 -0
- package/dist/datasets/index.d.cts +3 -0
- package/dist/datasets/index.d.ts +3 -0
- package/dist/datasets/index.js +5 -0
- package/dist/datasets/index.js.map +1 -0
- package/dist/index-74AB8Cyh.d.cts +1126 -0
- package/dist/index-9oQx1HgV.d.cts +1180 -0
- package/dist/index-BJY2SI4i.d.ts +483 -0
- package/dist/index-BWGhrDlr.d.ts +733 -0
- package/dist/index-B_DK4FKY.d.cts +242 -0
- package/dist/index-BbA2Gxfl.d.ts +456 -0
- package/dist/index-BgHYAoSS.d.cts +837 -0
- package/dist/index-BndMbqsM.d.ts +1439 -0
- package/dist/index-C1mfVYoo.d.ts +2517 -0
- package/dist/index-CCvlwAmL.d.cts +809 -0
- package/dist/index-CDw5CnOU.d.ts +785 -0
- package/dist/index-Cn3SdB0O.d.ts +1126 -0
- package/dist/index-CrqLlS-a.d.ts +776 -0
- package/dist/index-D61yaSMY.d.cts +483 -0
- package/dist/index-D9Loo1_A.d.cts +2517 -0
- package/dist/index-DIT_OO9C.d.cts +785 -0
- package/dist/index-DIp_RrRt.d.ts +242 -0
- package/dist/index-DbultU6X.d.cts +1427 -0
- package/dist/index-DmEg_LCm.d.cts +776 -0
- package/dist/index-DoPWVxPo.d.cts +1439 -0
- package/dist/index-DuCxd-8d.d.ts +837 -0
- package/dist/index-Dx42TZaY.d.ts +809 -0
- package/dist/index-DyZ4QQf5.d.cts +456 -0
- package/dist/index-GFAVyOWO.d.ts +1427 -0
- package/dist/index-WHQLn0e8.d.cts +733 -0
- package/dist/index-ZtI1Iy4L.d.ts +1180 -0
- package/dist/index-eJgeni9c.d.cts +1911 -0
- package/dist/index-tk4lSYod.d.ts +1911 -0
- package/dist/index.cjs +72 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/linalg/index.cjs +86 -0
- package/dist/linalg/index.cjs.map +1 -0
- package/dist/linalg/index.d.cts +3 -0
- package/dist/linalg/index.d.ts +3 -0
- package/dist/linalg/index.js +5 -0
- package/dist/linalg/index.js.map +1 -0
- package/dist/metrics/index.cjs +158 -0
- package/dist/metrics/index.cjs.map +1 -0
- package/dist/metrics/index.d.cts +3 -0
- package/dist/metrics/index.d.ts +3 -0
- package/dist/metrics/index.js +5 -0
- package/dist/metrics/index.js.map +1 -0
- package/dist/ml/index.cjs +87 -0
- package/dist/ml/index.cjs.map +1 -0
- package/dist/ml/index.d.cts +3 -0
- package/dist/ml/index.d.ts +3 -0
- package/dist/ml/index.js +6 -0
- package/dist/ml/index.js.map +1 -0
- package/dist/ndarray/index.cjs +501 -0
- package/dist/ndarray/index.cjs.map +1 -0
- package/dist/ndarray/index.d.cts +5 -0
- package/dist/ndarray/index.d.ts +5 -0
- package/dist/ndarray/index.js +4 -0
- package/dist/ndarray/index.js.map +1 -0
- package/dist/nn/index.cjs +142 -0
- package/dist/nn/index.cjs.map +1 -0
- package/dist/nn/index.d.cts +6 -0
- package/dist/nn/index.d.ts +6 -0
- package/dist/nn/index.js +5 -0
- package/dist/nn/index.js.map +1 -0
- package/dist/optim/index.cjs +77 -0
- package/dist/optim/index.cjs.map +1 -0
- package/dist/optim/index.d.cts +4 -0
- package/dist/optim/index.d.ts +4 -0
- package/dist/optim/index.js +4 -0
- package/dist/optim/index.js.map +1 -0
- package/dist/plot/index.cjs +114 -0
- package/dist/plot/index.cjs.map +1 -0
- package/dist/plot/index.d.cts +6 -0
- package/dist/plot/index.d.ts +6 -0
- package/dist/plot/index.js +5 -0
- package/dist/plot/index.js.map +1 -0
- package/dist/preprocess/index.cjs +82 -0
- package/dist/preprocess/index.cjs.map +1 -0
- package/dist/preprocess/index.d.cts +4 -0
- package/dist/preprocess/index.d.ts +4 -0
- package/dist/preprocess/index.js +5 -0
- package/dist/preprocess/index.js.map +1 -0
- package/dist/random/index.cjs +74 -0
- package/dist/random/index.cjs.map +1 -0
- package/dist/random/index.d.cts +3 -0
- package/dist/random/index.d.ts +3 -0
- package/dist/random/index.js +5 -0
- package/dist/random/index.js.map +1 -0
- package/dist/stats/index.cjs +142 -0
- package/dist/stats/index.cjs.map +1 -0
- package/dist/stats/index.d.cts +3 -0
- package/dist/stats/index.d.ts +3 -0
- package/dist/stats/index.js +5 -0
- package/dist/stats/index.js.map +1 -0
- package/dist/tensor-B96jjJLQ.d.cts +205 -0
- package/dist/tensor-B96jjJLQ.d.ts +205 -0
- package/package.json +226 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
import { T as Tensor } from './Tensor-BQLk1ltW.cjs';
|
|
2
|
+
|
|
3
|
+
type DataLoaderOptions = {
|
|
4
|
+
batchSize?: number;
|
|
5
|
+
shuffle?: boolean;
|
|
6
|
+
dropLast?: boolean;
|
|
7
|
+
seed?: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Data loader for batching and shuffling datasets.
|
|
11
|
+
*
|
|
12
|
+
* Similar to PyTorch's DataLoader. Provides efficient iteration over datasets with support for
|
|
13
|
+
* batching, shuffling, and deterministic reproducibility.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* **Iteration Behavior:**
|
|
17
|
+
* - Each iteration creates a fresh shuffle (if enabled), so multiple iterations over the same
|
|
18
|
+
* loader will produce different orderings unless a seed is provided.
|
|
19
|
+
* - With a seed, all iterations produce identical shuffles (deterministic).
|
|
20
|
+
* - The underlying tensors are not copied; batches reference the same data via gather operations.
|
|
21
|
+
*
|
|
22
|
+
* **Shuffling:**
|
|
23
|
+
* - Uses Fisher-Yates shuffle algorithm for uniform random permutation.
|
|
24
|
+
* - When `seed` is provided, shuffling is deterministic and reproducible across runs.
|
|
25
|
+
* - Shuffle happens per iteration, not per construction.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { DataLoader } from 'deepbox/datasets';
|
|
30
|
+
* import { tensor } from 'deepbox/ndarray';
|
|
31
|
+
*
|
|
32
|
+
* const X = tensor([[1, 2], [3, 4], [5, 6], [7, 8]]);
|
|
33
|
+
* const y = tensor([0, 1, 0, 1]);
|
|
34
|
+
*
|
|
35
|
+
* // Training loop with shuffling
|
|
36
|
+
* const loader = new DataLoader(X, y, {
|
|
37
|
+
* batchSize: 2,
|
|
38
|
+
* shuffle: true,
|
|
39
|
+
* seed: 42 // Deterministic shuffling
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* for (const [xBatch, yBatch] of loader) {
|
|
43
|
+
* // Train on batch
|
|
44
|
+
* console.log(xBatch.shape, yBatch.shape); // [2, 2], [2]
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* // Inference without labels
|
|
51
|
+
* const testLoader = new DataLoader(X, undefined, {
|
|
52
|
+
* batchSize: 4,
|
|
53
|
+
* shuffle: false
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* for (const [xBatch] of testLoader) {
|
|
57
|
+
* // Make predictions
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @see {@link https://pytorch.org/docs/stable/data.html#torch.utils.data.DataLoader | PyTorch DataLoader}
|
|
62
|
+
*/
|
|
63
|
+
declare class DataLoader<TTarget extends Tensor | undefined = undefined> {
|
|
64
|
+
private X;
|
|
65
|
+
private y;
|
|
66
|
+
private batchSize;
|
|
67
|
+
private shuffle;
|
|
68
|
+
private dropLast;
|
|
69
|
+
private indices;
|
|
70
|
+
private seed;
|
|
71
|
+
private nSamples;
|
|
72
|
+
constructor(X: Tensor, y: TTarget, options?: DataLoaderOptions);
|
|
73
|
+
constructor(X: Tensor, options?: DataLoaderOptions);
|
|
74
|
+
/**
|
|
75
|
+
* Number of batches in the data loader.
|
|
76
|
+
*/
|
|
77
|
+
get length(): number;
|
|
78
|
+
[Symbol.iterator](this: DataLoader<Tensor>): IterableIterator<[Tensor, Tensor]>;
|
|
79
|
+
[Symbol.iterator](this: DataLoader<undefined>): IterableIterator<[Tensor]>;
|
|
80
|
+
private prepareIteration;
|
|
81
|
+
private iterateX;
|
|
82
|
+
private iterateXY;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Generate a random n-class classification dataset.
|
|
87
|
+
*
|
|
88
|
+
* Produces informative features drawn from class-conditional Gaussians,
|
|
89
|
+
* redundant features as random linear combinations of the informative ones,
|
|
90
|
+
* and noise features sampled from N(0, 1).
|
|
91
|
+
*
|
|
92
|
+
* @param options - Configuration options.
|
|
93
|
+
* @param options.nSamples - Number of samples (default: 100).
|
|
94
|
+
* @param options.nFeatures - Total number of features (default: 20).
|
|
95
|
+
* @param options.nInformative - Number of informative features (default: 2).
|
|
96
|
+
* @param options.nRedundant - Number of redundant features (default: 2).
|
|
97
|
+
* @param options.nClasses - Number of classes (default: 2).
|
|
98
|
+
* @param options.randomState - Seed for reproducibility.
|
|
99
|
+
* @returns A tuple `[X, y]` where X has shape `[nSamples, nFeatures]` and y has shape `[nSamples]` with dtype `int32`.
|
|
100
|
+
*
|
|
101
|
+
* @see {@link https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_classification.html | sklearn.datasets.make_classification}
|
|
102
|
+
*/
|
|
103
|
+
declare function makeClassification(options?: {
|
|
104
|
+
nSamples?: number;
|
|
105
|
+
nFeatures?: number;
|
|
106
|
+
nInformative?: number;
|
|
107
|
+
nRedundant?: number;
|
|
108
|
+
nClasses?: number;
|
|
109
|
+
randomState?: number;
|
|
110
|
+
}): [Tensor, Tensor];
|
|
111
|
+
/**
|
|
112
|
+
* Generate a random regression dataset.
|
|
113
|
+
*
|
|
114
|
+
* Features are drawn from N(0, 1) and the target is a linear combination
|
|
115
|
+
* of the features with optional Gaussian noise.
|
|
116
|
+
*
|
|
117
|
+
* @param options - Configuration options.
|
|
118
|
+
* @param options.nSamples - Number of samples (default: 100).
|
|
119
|
+
* @param options.nFeatures - Number of features (default: 100).
|
|
120
|
+
* @param options.noise - Standard deviation of Gaussian noise on the target (default: 0).
|
|
121
|
+
* @param options.randomState - Seed for reproducibility.
|
|
122
|
+
* @returns A tuple `[X, y]` where X has shape `[nSamples, nFeatures]` and y has shape `[nSamples]`.
|
|
123
|
+
*
|
|
124
|
+
* @see {@link https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_regression.html | sklearn.datasets.make_regression}
|
|
125
|
+
*/
|
|
126
|
+
declare function makeRegression(options?: {
|
|
127
|
+
nSamples?: number;
|
|
128
|
+
nFeatures?: number;
|
|
129
|
+
noise?: number;
|
|
130
|
+
randomState?: number;
|
|
131
|
+
}): [Tensor, Tensor];
|
|
132
|
+
/**
|
|
133
|
+
* Generate isotropic Gaussian blobs for clustering.
|
|
134
|
+
*
|
|
135
|
+
* Samples are drawn from Gaussian distributions centered at randomly generated
|
|
136
|
+
* or user-specified locations. Useful for testing clustering algorithms.
|
|
137
|
+
*
|
|
138
|
+
* @param options - Configuration options.
|
|
139
|
+
* @param options.nSamples - Total number of samples (default: 100).
|
|
140
|
+
* @param options.nFeatures - Number of features per sample (default: 2). Ignored when `centers` is an array.
|
|
141
|
+
* @param options.centers - Number of cluster centers or explicit center coordinates (default: 3).
|
|
142
|
+
* @param options.clusterStd - Standard deviation of each cluster (default: 1.0).
|
|
143
|
+
* @param options.shuffle - Whether to shuffle the samples (default: true).
|
|
144
|
+
* @param options.randomState - Seed for reproducibility.
|
|
145
|
+
* @returns A tuple `[X, y]` where X has shape `[nSamples, nFeatures]` and y has shape `[nSamples]` with dtype `int32`.
|
|
146
|
+
*
|
|
147
|
+
* @see {@link https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_blobs.html | sklearn.datasets.make_blobs}
|
|
148
|
+
*/
|
|
149
|
+
declare function makeBlobs(options?: {
|
|
150
|
+
nSamples?: number;
|
|
151
|
+
nFeatures?: number;
|
|
152
|
+
centers?: number | number[][];
|
|
153
|
+
clusterStd?: number;
|
|
154
|
+
randomState?: number;
|
|
155
|
+
shuffle?: boolean;
|
|
156
|
+
}): [Tensor, Tensor];
|
|
157
|
+
/**
|
|
158
|
+
* Generate two interleaving half-circle (moons) dataset.
|
|
159
|
+
*
|
|
160
|
+
* Useful for testing algorithms that handle non-linearly separable data.
|
|
161
|
+
*
|
|
162
|
+
* @param options - Configuration options.
|
|
163
|
+
* @param options.nSamples - Total number of samples, split evenly between the two moons (default: 100).
|
|
164
|
+
* @param options.noise - Standard deviation of Gaussian noise (default: 0).
|
|
165
|
+
* @param options.shuffle - Whether to shuffle the samples (default: true).
|
|
166
|
+
* @param options.randomState - Seed for reproducibility.
|
|
167
|
+
* @returns A tuple `[X, y]` where X has shape `[nSamples, 2]` and y has shape `[nSamples]` with dtype `int32`.
|
|
168
|
+
*
|
|
169
|
+
* @see {@link https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_moons.html | sklearn.datasets.make_moons}
|
|
170
|
+
*/
|
|
171
|
+
declare function makeMoons(options?: {
|
|
172
|
+
nSamples?: number;
|
|
173
|
+
noise?: number;
|
|
174
|
+
randomState?: number;
|
|
175
|
+
shuffle?: boolean;
|
|
176
|
+
}): [Tensor, Tensor];
|
|
177
|
+
/**
|
|
178
|
+
* Generate a large circle containing a smaller circle in 2D.
|
|
179
|
+
*
|
|
180
|
+
* Useful for testing algorithms that handle non-linearly separable data.
|
|
181
|
+
*
|
|
182
|
+
* @param options - Configuration options.
|
|
183
|
+
* @param options.nSamples - Total number of samples, split evenly between inner and outer circles (default: 100).
|
|
184
|
+
* @param options.noise - Standard deviation of Gaussian noise (default: 0).
|
|
185
|
+
* @param options.factor - Scale factor between inner and outer circle, must be in (0, 1) (default: 0.8).
|
|
186
|
+
* @param options.shuffle - Whether to shuffle the samples (default: true).
|
|
187
|
+
* @param options.randomState - Seed for reproducibility.
|
|
188
|
+
* @returns A tuple `[X, y]` where X has shape `[nSamples, 2]` and y has shape `[nSamples]` with dtype `int32`.
|
|
189
|
+
*
|
|
190
|
+
* @see {@link https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_circles.html | sklearn.datasets.make_circles}
|
|
191
|
+
*/
|
|
192
|
+
declare function makeCircles(options?: {
|
|
193
|
+
nSamples?: number;
|
|
194
|
+
noise?: number;
|
|
195
|
+
factor?: number;
|
|
196
|
+
randomState?: number;
|
|
197
|
+
shuffle?: boolean;
|
|
198
|
+
}): [Tensor, Tensor];
|
|
199
|
+
/**
|
|
200
|
+
* Generate a dataset with classes separated by concentric Gaussian quantile shells.
|
|
201
|
+
*
|
|
202
|
+
* Samples are drawn from an isotropic Gaussian and assigned to classes based on
|
|
203
|
+
* quantile boundaries of their Euclidean distance from the origin.
|
|
204
|
+
*
|
|
205
|
+
* @param options - Configuration options.
|
|
206
|
+
* @param options.nSamples - Number of samples (default: 100).
|
|
207
|
+
* @param options.nFeatures - Number of features (default: 2).
|
|
208
|
+
* @param options.nClasses - Number of classes (default: 3).
|
|
209
|
+
* @param options.randomState - Seed for reproducibility.
|
|
210
|
+
* @returns A tuple `[X, y]` where X has shape `[nSamples, nFeatures]` and y has shape `[nSamples]` with dtype `int32`.
|
|
211
|
+
*
|
|
212
|
+
* @see {@link https://scikit-learn.org/stable/modules/generated/sklearn.datasets.make_gaussian_quantiles.html | sklearn.datasets.make_gaussian_quantiles}
|
|
213
|
+
*/
|
|
214
|
+
declare function makeGaussianQuantiles(options?: {
|
|
215
|
+
nSamples?: number;
|
|
216
|
+
nFeatures?: number;
|
|
217
|
+
nClasses?: number;
|
|
218
|
+
randomState?: number;
|
|
219
|
+
}): [Tensor, Tensor];
|
|
220
|
+
|
|
221
|
+
type Dataset = {
|
|
222
|
+
data: Tensor;
|
|
223
|
+
target: Tensor;
|
|
224
|
+
featureNames: string[];
|
|
225
|
+
targetNames?: string[];
|
|
226
|
+
description: string;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Load the synthetic Iris dataset.
|
|
230
|
+
*
|
|
231
|
+
* 150 samples, 4 features, 3 classes (setosa, versicolor, virginica).
|
|
232
|
+
* Deterministic — always returns the same data.
|
|
233
|
+
*
|
|
234
|
+
* @returns A {@link Dataset} with `data` shape `[150, 4]` and `target` shape `[150]` (int32).
|
|
235
|
+
*/
|
|
236
|
+
declare function loadIris(): Dataset;
|
|
237
|
+
/**
|
|
238
|
+
* Load the synthetic Digits dataset.
|
|
239
|
+
*
|
|
240
|
+
* 1797 samples, 64 features (8×8 pixel values 0–15), 10 classes (digits 0–9).
|
|
241
|
+
* Deterministic — always returns the same data.
|
|
242
|
+
*
|
|
243
|
+
* @returns A {@link Dataset} with `data` shape `[1797, 64]` and `target` shape `[1797]` (int32).
|
|
244
|
+
*/
|
|
245
|
+
declare function loadDigits(): Dataset;
|
|
246
|
+
/**
|
|
247
|
+
* Load the synthetic Breast Cancer dataset.
|
|
248
|
+
*
|
|
249
|
+
* 569 samples, 30 features, 2 classes (malignant, benign).
|
|
250
|
+
* Deterministic — always returns the same data.
|
|
251
|
+
*
|
|
252
|
+
* @returns A {@link Dataset} with `data` shape `[569, 30]` and `target` shape `[569]` (int32).
|
|
253
|
+
*/
|
|
254
|
+
declare function loadBreastCancer(): Dataset;
|
|
255
|
+
/**
|
|
256
|
+
* Load the synthetic Diabetes regression dataset.
|
|
257
|
+
*
|
|
258
|
+
* 442 samples, 10 features, continuous target.
|
|
259
|
+
* Deterministic — always returns the same data.
|
|
260
|
+
*
|
|
261
|
+
* @returns A {@link Dataset} with `data` shape `[442, 10]` and `target` shape `[442]`.
|
|
262
|
+
*/
|
|
263
|
+
declare function loadDiabetes(): Dataset;
|
|
264
|
+
/**
|
|
265
|
+
* Load the synthetic Linnerud multi-output regression dataset.
|
|
266
|
+
*
|
|
267
|
+
* 20 samples, 3 exercise features, 3 physiological targets.
|
|
268
|
+
* Deterministic — always returns the same data.
|
|
269
|
+
*
|
|
270
|
+
* @returns A {@link Dataset} with `data` shape `[20, 3]` and `target` shape `[20, 3]`.
|
|
271
|
+
*/
|
|
272
|
+
declare function loadLinnerud(): Dataset;
|
|
273
|
+
/**
|
|
274
|
+
* Load the synthetic Flowers Extended classification dataset.
|
|
275
|
+
*
|
|
276
|
+
* 180 samples, 6 features, 4 species.
|
|
277
|
+
* Deterministic — always returns the same data.
|
|
278
|
+
*
|
|
279
|
+
* @returns A {@link Dataset} with `data` shape `[180, 6]` and `target` shape `[180]` (int32).
|
|
280
|
+
*/
|
|
281
|
+
declare function loadFlowersExtended(): Dataset;
|
|
282
|
+
/**
|
|
283
|
+
* Load the synthetic Leaf Shapes classification dataset.
|
|
284
|
+
*
|
|
285
|
+
* 150 samples, 8 geometric features, 5 plant species.
|
|
286
|
+
* Deterministic — always returns the same data.
|
|
287
|
+
*
|
|
288
|
+
* @returns A {@link Dataset} with `data` shape `[150, 8]` and `target` shape `[150]` (int32).
|
|
289
|
+
*/
|
|
290
|
+
declare function loadLeafShapes(): Dataset;
|
|
291
|
+
/**
|
|
292
|
+
* Load the synthetic Fruit Quality classification dataset.
|
|
293
|
+
*
|
|
294
|
+
* 150 samples, 5 features, 3 fruit classes.
|
|
295
|
+
* Deterministic — always returns the same data.
|
|
296
|
+
*
|
|
297
|
+
* @returns A {@link Dataset} with `data` shape `[150, 5]` and `target` shape `[150]` (int32).
|
|
298
|
+
*/
|
|
299
|
+
declare function loadFruitQuality(): Dataset;
|
|
300
|
+
/**
|
|
301
|
+
* Load the synthetic Seed Morphology classification dataset.
|
|
302
|
+
*
|
|
303
|
+
* 150 samples, 4 features, 3 seed types.
|
|
304
|
+
* Deterministic — always returns the same data.
|
|
305
|
+
*
|
|
306
|
+
* @returns A {@link Dataset} with `data` shape `[150, 4]` and `target` shape `[150]` (int32).
|
|
307
|
+
*/
|
|
308
|
+
declare function loadSeedMorphology(): Dataset;
|
|
309
|
+
/**
|
|
310
|
+
* Load the synthetic Moons-Multi classification dataset.
|
|
311
|
+
*
|
|
312
|
+
* 150 samples, 2D, 3 interleaving rotated moon classes.
|
|
313
|
+
* Deterministic — always returns the same data.
|
|
314
|
+
*
|
|
315
|
+
* @returns A {@link Dataset} with `data` shape `[150, 2]` and `target` shape `[150]` (int32).
|
|
316
|
+
*/
|
|
317
|
+
declare function loadMoonsMulti(): Dataset;
|
|
318
|
+
/**
|
|
319
|
+
* Load the synthetic Concentric Rings classification dataset.
|
|
320
|
+
*
|
|
321
|
+
* 150 samples, 2D, 3 concentric circle classes.
|
|
322
|
+
* Deterministic — always returns the same data.
|
|
323
|
+
*
|
|
324
|
+
* @returns A {@link Dataset} with `data` shape `[150, 2]` and `target` shape `[150]` (int32).
|
|
325
|
+
*/
|
|
326
|
+
declare function loadConcentricRings(): Dataset;
|
|
327
|
+
/**
|
|
328
|
+
* Load the synthetic Spiral Arms classification dataset.
|
|
329
|
+
*
|
|
330
|
+
* 150 samples, 2D, 3 spiral classes.
|
|
331
|
+
* Deterministic — always returns the same data.
|
|
332
|
+
*
|
|
333
|
+
* @returns A {@link Dataset} with `data` shape `[150, 2]` and `target` shape `[150]` (int32).
|
|
334
|
+
*/
|
|
335
|
+
declare function loadSpiralArms(): Dataset;
|
|
336
|
+
/**
|
|
337
|
+
* Load the synthetic Gaussian Islands classification dataset.
|
|
338
|
+
*
|
|
339
|
+
* 200 samples, 3D, 4 separated Gaussian clusters.
|
|
340
|
+
* Deterministic — always returns the same data.
|
|
341
|
+
*
|
|
342
|
+
* @returns A {@link Dataset} with `data` shape `[200, 3]` and `target` shape `[200]` (int32).
|
|
343
|
+
*/
|
|
344
|
+
declare function loadGaussianIslands(): Dataset;
|
|
345
|
+
/**
|
|
346
|
+
* Load the synthetic Plant Growth regression dataset.
|
|
347
|
+
*
|
|
348
|
+
* 200 samples, 3 features (sunlight, water, soil quality), target: height (cm).
|
|
349
|
+
* Deterministic — always returns the same data.
|
|
350
|
+
*
|
|
351
|
+
* @returns A {@link Dataset} with `data` shape `[200, 3]` and `target` shape `[200]`.
|
|
352
|
+
*/
|
|
353
|
+
declare function loadPlantGrowth(): Dataset;
|
|
354
|
+
/**
|
|
355
|
+
* Load the synthetic Housing-Mini regression dataset.
|
|
356
|
+
*
|
|
357
|
+
* 200 samples, 4 features (size, rooms, age, distance), target: price (thousands).
|
|
358
|
+
* Deterministic — always returns the same data.
|
|
359
|
+
*
|
|
360
|
+
* @returns A {@link Dataset} with `data` shape `[200, 4]` and `target` shape `[200]`.
|
|
361
|
+
*/
|
|
362
|
+
declare function loadHousingMini(): Dataset;
|
|
363
|
+
/**
|
|
364
|
+
* Load the synthetic Energy Efficiency regression dataset.
|
|
365
|
+
*
|
|
366
|
+
* 200 samples, 3 features (insulation, window area, orientation), target: energy usage (kWh).
|
|
367
|
+
* Deterministic — always returns the same data.
|
|
368
|
+
*
|
|
369
|
+
* @returns A {@link Dataset} with `data` shape `[200, 3]` and `target` shape `[200]`.
|
|
370
|
+
*/
|
|
371
|
+
declare function loadEnergyEfficiency(): Dataset;
|
|
372
|
+
/**
|
|
373
|
+
* Load the synthetic Crop Yield regression dataset.
|
|
374
|
+
*
|
|
375
|
+
* 200 samples, 3 features (rainfall, fertilizer, temperature), target: yield (tons/ha).
|
|
376
|
+
* Deterministic — always returns the same data.
|
|
377
|
+
*
|
|
378
|
+
* @returns A {@link Dataset} with `data` shape `[200, 3]` and `target` shape `[200]`.
|
|
379
|
+
*/
|
|
380
|
+
declare function loadCropYield(): Dataset;
|
|
381
|
+
/**
|
|
382
|
+
* Load the synthetic Customer Segments clustering dataset.
|
|
383
|
+
*
|
|
384
|
+
* 200 samples, 3 features (age, income, spending score), 4 natural clusters.
|
|
385
|
+
* Deterministic — always returns the same data.
|
|
386
|
+
*
|
|
387
|
+
* @returns A {@link Dataset} with `data` shape `[200, 3]` and `target` shape `[200]` (int32).
|
|
388
|
+
*/
|
|
389
|
+
declare function loadCustomerSegments(): Dataset;
|
|
390
|
+
/**
|
|
391
|
+
* Load the synthetic Sensor States classification dataset.
|
|
392
|
+
*
|
|
393
|
+
* 180 samples, 6 sensor readings, 3 hidden operating modes.
|
|
394
|
+
* Deterministic — always returns the same data.
|
|
395
|
+
*
|
|
396
|
+
* @returns A {@link Dataset} with `data` shape `[180, 6]` and `target` shape `[180]` (int32).
|
|
397
|
+
*/
|
|
398
|
+
declare function loadSensorStates(): Dataset;
|
|
399
|
+
/**
|
|
400
|
+
* Load the synthetic Student Performance classification dataset.
|
|
401
|
+
*
|
|
402
|
+
* 150 samples, 3 integer features, 3 outcome classes.
|
|
403
|
+
* Deterministic — always returns the same data.
|
|
404
|
+
*
|
|
405
|
+
* @returns A {@link Dataset} with `data` shape `[150, 3]` and `target` shape `[150]` (int32).
|
|
406
|
+
*/
|
|
407
|
+
declare function loadStudentPerformance(): Dataset;
|
|
408
|
+
/**
|
|
409
|
+
* Load the synthetic Traffic Conditions classification dataset.
|
|
410
|
+
*
|
|
411
|
+
* 150 samples, 3 features, 3 traffic level classes.
|
|
412
|
+
* Deterministic — always returns the same data.
|
|
413
|
+
*
|
|
414
|
+
* @returns A {@link Dataset} with `data` shape `[150, 3]` and `target` shape `[150]` (int32).
|
|
415
|
+
*/
|
|
416
|
+
declare function loadTrafficConditions(): Dataset;
|
|
417
|
+
/**
|
|
418
|
+
* Load the synthetic Fitness Scores multi-output regression dataset.
|
|
419
|
+
*
|
|
420
|
+
* 100 samples, 3 exercise features, 3 fitness targets (strength, endurance, flexibility).
|
|
421
|
+
* Deterministic — always returns the same data.
|
|
422
|
+
*
|
|
423
|
+
* @returns A {@link Dataset} with `data` shape `[100, 3]` and `target` shape `[100, 3]`.
|
|
424
|
+
*/
|
|
425
|
+
declare function loadFitnessScores(): Dataset;
|
|
426
|
+
/**
|
|
427
|
+
* Load the synthetic Weather Outcomes multi-output regression dataset.
|
|
428
|
+
*
|
|
429
|
+
* 150 samples, 3 features, 2 targets (rain probability, wind speed).
|
|
430
|
+
* Deterministic — always returns the same data.
|
|
431
|
+
*
|
|
432
|
+
* @returns A {@link Dataset} with `data` shape `[150, 3]` and `target` shape `[150, 2]`.
|
|
433
|
+
*/
|
|
434
|
+
declare function loadWeatherOutcomes(): Dataset;
|
|
435
|
+
/**
|
|
436
|
+
* Load the synthetic Perfectly Separable classification dataset.
|
|
437
|
+
*
|
|
438
|
+
* 100 samples, 4 features, 2 linearly separable classes.
|
|
439
|
+
* Deterministic — always returns the same data.
|
|
440
|
+
*
|
|
441
|
+
* @returns A {@link Dataset} with `data` shape `[100, 4]` and `target` shape `[100]` (int32).
|
|
442
|
+
*/
|
|
443
|
+
declare function loadPerfectlySeparable(): Dataset;
|
|
444
|
+
|
|
445
|
+
type index_DataLoader<TTarget extends Tensor | undefined = undefined> = DataLoader<TTarget>;
|
|
446
|
+
declare const index_DataLoader: typeof DataLoader;
|
|
447
|
+
type index_DataLoaderOptions = DataLoaderOptions;
|
|
448
|
+
type index_Dataset = Dataset;
|
|
449
|
+
declare const index_loadBreastCancer: typeof loadBreastCancer;
|
|
450
|
+
declare const index_loadConcentricRings: typeof loadConcentricRings;
|
|
451
|
+
declare const index_loadCropYield: typeof loadCropYield;
|
|
452
|
+
declare const index_loadCustomerSegments: typeof loadCustomerSegments;
|
|
453
|
+
declare const index_loadDiabetes: typeof loadDiabetes;
|
|
454
|
+
declare const index_loadDigits: typeof loadDigits;
|
|
455
|
+
declare const index_loadEnergyEfficiency: typeof loadEnergyEfficiency;
|
|
456
|
+
declare const index_loadFitnessScores: typeof loadFitnessScores;
|
|
457
|
+
declare const index_loadFlowersExtended: typeof loadFlowersExtended;
|
|
458
|
+
declare const index_loadFruitQuality: typeof loadFruitQuality;
|
|
459
|
+
declare const index_loadGaussianIslands: typeof loadGaussianIslands;
|
|
460
|
+
declare const index_loadHousingMini: typeof loadHousingMini;
|
|
461
|
+
declare const index_loadIris: typeof loadIris;
|
|
462
|
+
declare const index_loadLeafShapes: typeof loadLeafShapes;
|
|
463
|
+
declare const index_loadLinnerud: typeof loadLinnerud;
|
|
464
|
+
declare const index_loadMoonsMulti: typeof loadMoonsMulti;
|
|
465
|
+
declare const index_loadPerfectlySeparable: typeof loadPerfectlySeparable;
|
|
466
|
+
declare const index_loadPlantGrowth: typeof loadPlantGrowth;
|
|
467
|
+
declare const index_loadSeedMorphology: typeof loadSeedMorphology;
|
|
468
|
+
declare const index_loadSensorStates: typeof loadSensorStates;
|
|
469
|
+
declare const index_loadSpiralArms: typeof loadSpiralArms;
|
|
470
|
+
declare const index_loadStudentPerformance: typeof loadStudentPerformance;
|
|
471
|
+
declare const index_loadTrafficConditions: typeof loadTrafficConditions;
|
|
472
|
+
declare const index_loadWeatherOutcomes: typeof loadWeatherOutcomes;
|
|
473
|
+
declare const index_makeBlobs: typeof makeBlobs;
|
|
474
|
+
declare const index_makeCircles: typeof makeCircles;
|
|
475
|
+
declare const index_makeClassification: typeof makeClassification;
|
|
476
|
+
declare const index_makeGaussianQuantiles: typeof makeGaussianQuantiles;
|
|
477
|
+
declare const index_makeMoons: typeof makeMoons;
|
|
478
|
+
declare const index_makeRegression: typeof makeRegression;
|
|
479
|
+
declare namespace index {
|
|
480
|
+
export { index_DataLoader as DataLoader, type index_DataLoaderOptions as DataLoaderOptions, type index_Dataset as Dataset, index_loadBreastCancer as loadBreastCancer, index_loadConcentricRings as loadConcentricRings, index_loadCropYield as loadCropYield, index_loadCustomerSegments as loadCustomerSegments, index_loadDiabetes as loadDiabetes, index_loadDigits as loadDigits, index_loadEnergyEfficiency as loadEnergyEfficiency, index_loadFitnessScores as loadFitnessScores, index_loadFlowersExtended as loadFlowersExtended, index_loadFruitQuality as loadFruitQuality, index_loadGaussianIslands as loadGaussianIslands, index_loadHousingMini as loadHousingMini, index_loadIris as loadIris, index_loadLeafShapes as loadLeafShapes, index_loadLinnerud as loadLinnerud, index_loadMoonsMulti as loadMoonsMulti, index_loadPerfectlySeparable as loadPerfectlySeparable, index_loadPlantGrowth as loadPlantGrowth, index_loadSeedMorphology as loadSeedMorphology, index_loadSensorStates as loadSensorStates, index_loadSpiralArms as loadSpiralArms, index_loadStudentPerformance as loadStudentPerformance, index_loadTrafficConditions as loadTrafficConditions, index_loadWeatherOutcomes as loadWeatherOutcomes, index_makeBlobs as makeBlobs, index_makeCircles as makeCircles, index_makeClassification as makeClassification, index_makeGaussianQuantiles as makeGaussianQuantiles, index_makeMoons as makeMoons, index_makeRegression as makeRegression };
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export { loadPlantGrowth as A, loadSeedMorphology as B, loadSensorStates as C, type DataLoaderOptions as D, loadSpiralArms as E, loadStudentPerformance as F, loadTrafficConditions as G, loadWeatherOutcomes as H, DataLoader as a, makeCircles as b, makeClassification as c, makeGaussianQuantiles as d, makeMoons as e, makeRegression as f, type Dataset as g, loadConcentricRings as h, index as i, loadCropYield as j, loadCustomerSegments as k, loadBreastCancer as l, makeBlobs as m, loadDiabetes as n, loadDigits as o, loadEnergyEfficiency as p, loadFitnessScores as q, loadFlowersExtended as r, loadFruitQuality as s, loadGaussianIslands as t, loadHousingMini as u, loadIris as v, loadLeafShapes as w, loadLinnerud as x, loadMoonsMulti as y, loadPerfectlySeparable as z };
|