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,776 @@
|
|
|
1
|
+
import { A as AnyTensor } from './index-eJgeni9c.cjs';
|
|
2
|
+
import { T as Tensor } from './Tensor-BQLk1ltW.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
declare class RasterCanvas {
|
|
8
|
+
readonly width: number;
|
|
9
|
+
readonly height: number;
|
|
10
|
+
readonly data: Uint8ClampedArray;
|
|
11
|
+
constructor(width: number, height: number);
|
|
12
|
+
clearRGBA(r: number, g: number, b: number, a: number): void;
|
|
13
|
+
setPixelRGBA(x: number, y: number, r: number, g: number, b: number, a: number): void;
|
|
14
|
+
fillRectRGBA(x0: number, y0: number, w: number, h: number, r: number, g: number, b: number, a: number): void;
|
|
15
|
+
drawLineRGBA(x0: number, y0: number, x1: number, y1: number, r: number, g: number, b: number, a: number): void;
|
|
16
|
+
fillTriangleRGBA(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, r: number, g: number, b: number, a: number): void;
|
|
17
|
+
drawCircleRGBA(cx: number, cy: number, radius: number, r: number, g: number, b: number, a: number): void;
|
|
18
|
+
measureText(text: string, fontSize?: number): {
|
|
19
|
+
readonly width: number;
|
|
20
|
+
readonly height: number;
|
|
21
|
+
};
|
|
22
|
+
drawTextRGBA(text: string, x: number, y: number, r: number, g: number, b: number, a: number, options?: {
|
|
23
|
+
readonly fontSize?: number;
|
|
24
|
+
readonly align?: "start" | "middle" | "end";
|
|
25
|
+
readonly baseline?: "top" | "middle" | "bottom";
|
|
26
|
+
readonly rotation?: 0 | 90 | -90;
|
|
27
|
+
}): void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Color specification as a CSS color string (e.g., "#ff0000", "rgb(255,0,0)").
|
|
32
|
+
*/
|
|
33
|
+
type Color = string;
|
|
34
|
+
/**
|
|
35
|
+
* Options for customizing plot appearance and behavior.
|
|
36
|
+
* Different plot types use different subsets of these options.
|
|
37
|
+
*
|
|
38
|
+
* **Supported Color Formats:**
|
|
39
|
+
* - Hex: "#RRGGBB" or "#RRGGBBAA" (e.g., "#ff0000", "#ff0000ff")
|
|
40
|
+
* - RGB: "rgb(255, 0, 0)" or "rgba(255, 0, 0, 0.5)"
|
|
41
|
+
* - HSL: "hsl(0, 100%, 50%)" or "hsla(0, 100%, 50%, 0.5)"
|
|
42
|
+
* - Named: "red", "blue", "forestgreen", etc. (140 CSS color names)
|
|
43
|
+
* - Invalid colors default to black
|
|
44
|
+
*/
|
|
45
|
+
type PlotOptions = {
|
|
46
|
+
/** Optional label used by legends */
|
|
47
|
+
readonly label?: string;
|
|
48
|
+
/** Line or marker color */
|
|
49
|
+
readonly color?: Color;
|
|
50
|
+
/** Line width in pixels */
|
|
51
|
+
readonly linewidth?: number;
|
|
52
|
+
/** Marker size in pixels */
|
|
53
|
+
readonly size?: number;
|
|
54
|
+
/** Edge color for bars and shapes */
|
|
55
|
+
readonly edgecolor?: Color;
|
|
56
|
+
/** Number of histogram bins (overrides the bins argument if provided) */
|
|
57
|
+
readonly bins?: number;
|
|
58
|
+
/** Minimum value for color mapping */
|
|
59
|
+
readonly vmin?: number;
|
|
60
|
+
/** Maximum value for color mapping */
|
|
61
|
+
readonly vmax?: number;
|
|
62
|
+
/** Explicit data extent for heatmaps, images, and contour plots */
|
|
63
|
+
readonly extent?: {
|
|
64
|
+
readonly xmin: number;
|
|
65
|
+
readonly xmax: number;
|
|
66
|
+
readonly ymin: number;
|
|
67
|
+
readonly ymax: number;
|
|
68
|
+
};
|
|
69
|
+
/** Array of colors for multi-series plots */
|
|
70
|
+
readonly colors?: readonly Color[];
|
|
71
|
+
/** Contour levels (number or explicit values) */
|
|
72
|
+
readonly levels?: number | readonly number[];
|
|
73
|
+
/** Background color for axes */
|
|
74
|
+
readonly facecolor?: Color;
|
|
75
|
+
/** Colormap for heatmaps and images (viridis, plasma, inferno, magma, grayscale) */
|
|
76
|
+
readonly colormap?: "viridis" | "plasma" | "inferno" | "magma" | "grayscale";
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Legend display options.
|
|
80
|
+
*/
|
|
81
|
+
type LegendOptions = {
|
|
82
|
+
/** Whether the legend should be visible */
|
|
83
|
+
readonly visible?: boolean;
|
|
84
|
+
/** Legend placement */
|
|
85
|
+
readonly location?: "upper-right" | "upper-left" | "lower-right" | "lower-left";
|
|
86
|
+
/** Legend font size in pixels */
|
|
87
|
+
readonly fontSize?: number;
|
|
88
|
+
/** Legend padding in pixels */
|
|
89
|
+
readonly padding?: number;
|
|
90
|
+
/** Legend background color */
|
|
91
|
+
readonly background?: Color;
|
|
92
|
+
/** Legend border color */
|
|
93
|
+
readonly borderColor?: Color;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Legend entry definition.
|
|
97
|
+
*/
|
|
98
|
+
type LegendEntry = {
|
|
99
|
+
readonly label: string;
|
|
100
|
+
readonly color: Color;
|
|
101
|
+
/** Optional symbol shape for legend marker. */
|
|
102
|
+
readonly shape?: "line" | "marker" | "box";
|
|
103
|
+
/** Line width for line legend entries. */
|
|
104
|
+
readonly lineWidth?: number;
|
|
105
|
+
/** Marker size for marker legend entries. */
|
|
106
|
+
readonly markerSize?: number;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Result of SVG rendering containing the complete SVG document as a string.
|
|
110
|
+
*/
|
|
111
|
+
type RenderedSVG = {
|
|
112
|
+
/** Discriminator for the rendered output type */
|
|
113
|
+
readonly kind: "svg";
|
|
114
|
+
/** Complete SVG document as XML string */
|
|
115
|
+
readonly svg: string;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Result of PNG rendering containing the image dimensions and raw byte data.
|
|
119
|
+
* PNG encoding is only available in Node.js environments.
|
|
120
|
+
*/
|
|
121
|
+
type RenderedPNG = {
|
|
122
|
+
/** Discriminator for the rendered output type */
|
|
123
|
+
readonly kind: "png";
|
|
124
|
+
/** Image width in pixels */
|
|
125
|
+
readonly width: number;
|
|
126
|
+
/** Image height in pixels */
|
|
127
|
+
readonly height: number;
|
|
128
|
+
/** PNG file data as byte array */
|
|
129
|
+
readonly bytes: Uint8Array;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
type DataRange = {
|
|
135
|
+
readonly xmin: number;
|
|
136
|
+
readonly xmax: number;
|
|
137
|
+
readonly ymin: number;
|
|
138
|
+
readonly ymax: number;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
type Viewport = {
|
|
144
|
+
readonly x: number;
|
|
145
|
+
readonly y: number;
|
|
146
|
+
readonly width: number;
|
|
147
|
+
readonly height: number;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
type DataTransform = {
|
|
153
|
+
readonly xToPx: (x: number) => number;
|
|
154
|
+
readonly yToPx: (y: number) => number;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
type SvgDrawContext = {
|
|
160
|
+
readonly transform: DataTransform;
|
|
161
|
+
push(element: string): void;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
type RasterDrawContext = {
|
|
167
|
+
readonly transform: DataTransform;
|
|
168
|
+
readonly canvas: RasterCanvas;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
173
|
+
type Drawable = {
|
|
174
|
+
readonly kind: string;
|
|
175
|
+
getDataRange(): DataRange | null;
|
|
176
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
177
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
178
|
+
getLegendEntries?(): readonly LegendEntry[] | null;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
declare class Bar2D implements Drawable {
|
|
185
|
+
readonly kind = "bar";
|
|
186
|
+
readonly x: Float64Array;
|
|
187
|
+
readonly height: Float64Array;
|
|
188
|
+
readonly color: Color;
|
|
189
|
+
readonly edgecolor: Color;
|
|
190
|
+
readonly barWidth: number;
|
|
191
|
+
readonly label: string | null;
|
|
192
|
+
constructor(x: Float64Array, height: Float64Array, options: PlotOptions);
|
|
193
|
+
getDataRange(): DataRange | null;
|
|
194
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
195
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
196
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @internal
|
|
201
|
+
*/
|
|
202
|
+
declare class Boxplot implements Drawable {
|
|
203
|
+
readonly kind = "boxplot";
|
|
204
|
+
readonly position: number;
|
|
205
|
+
readonly q1: number;
|
|
206
|
+
readonly median: number;
|
|
207
|
+
readonly q3: number;
|
|
208
|
+
readonly whiskerLow: number;
|
|
209
|
+
readonly whiskerHigh: number;
|
|
210
|
+
readonly outliers: readonly number[];
|
|
211
|
+
readonly color: Color;
|
|
212
|
+
readonly edgecolor: Color;
|
|
213
|
+
readonly boxWidth: number;
|
|
214
|
+
readonly label: string | null;
|
|
215
|
+
readonly hasData: boolean;
|
|
216
|
+
constructor(position: number, data: Float64Array, options: PlotOptions);
|
|
217
|
+
getDataRange(): DataRange | null;
|
|
218
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
219
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
220
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
type ContourGrid = {
|
|
224
|
+
readonly rows: number;
|
|
225
|
+
readonly cols: number;
|
|
226
|
+
readonly data: Float64Array;
|
|
227
|
+
readonly xCoords: Float64Array;
|
|
228
|
+
readonly yCoords: Float64Array;
|
|
229
|
+
readonly dataMin: number;
|
|
230
|
+
readonly dataMax: number;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
type Segment = {
|
|
234
|
+
readonly x1: number;
|
|
235
|
+
readonly y1: number;
|
|
236
|
+
readonly x2: number;
|
|
237
|
+
readonly y2: number;
|
|
238
|
+
readonly levelIndex: number;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* @internal
|
|
242
|
+
*/
|
|
243
|
+
declare class Contour2D implements Drawable {
|
|
244
|
+
readonly kind = "contour";
|
|
245
|
+
readonly segments: readonly Segment[];
|
|
246
|
+
readonly levelColors: readonly Color[];
|
|
247
|
+
readonly levelRGBA: readonly {
|
|
248
|
+
r: number;
|
|
249
|
+
g: number;
|
|
250
|
+
b: number;
|
|
251
|
+
a: number;
|
|
252
|
+
}[];
|
|
253
|
+
readonly linewidth: number;
|
|
254
|
+
readonly xmin: number;
|
|
255
|
+
readonly xmax: number;
|
|
256
|
+
readonly ymin: number;
|
|
257
|
+
readonly ymax: number;
|
|
258
|
+
readonly label: string | null;
|
|
259
|
+
constructor(grid: ContourGrid, options?: PlotOptions);
|
|
260
|
+
getDataRange(): DataRange | null;
|
|
261
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
262
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
263
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
type BandTriangle = {
|
|
267
|
+
readonly x1: number;
|
|
268
|
+
readonly y1: number;
|
|
269
|
+
readonly x2: number;
|
|
270
|
+
readonly y2: number;
|
|
271
|
+
readonly x3: number;
|
|
272
|
+
readonly y3: number;
|
|
273
|
+
readonly band: number;
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* @internal
|
|
277
|
+
*/
|
|
278
|
+
declare class ContourF2D implements Drawable {
|
|
279
|
+
readonly kind = "contourf";
|
|
280
|
+
readonly rows: number;
|
|
281
|
+
readonly cols: number;
|
|
282
|
+
readonly xCoords: Float64Array;
|
|
283
|
+
readonly yCoords: Float64Array;
|
|
284
|
+
readonly levels: readonly number[];
|
|
285
|
+
readonly bandColors: readonly Color[];
|
|
286
|
+
readonly bandRGBA: readonly {
|
|
287
|
+
r: number;
|
|
288
|
+
g: number;
|
|
289
|
+
b: number;
|
|
290
|
+
a: number;
|
|
291
|
+
}[];
|
|
292
|
+
readonly triangles: readonly BandTriangle[];
|
|
293
|
+
readonly xmin: number;
|
|
294
|
+
readonly xmax: number;
|
|
295
|
+
readonly ymin: number;
|
|
296
|
+
readonly ymax: number;
|
|
297
|
+
readonly label: string | null;
|
|
298
|
+
constructor(grid: ContourGrid, options?: PlotOptions);
|
|
299
|
+
getDataRange(): DataRange | null;
|
|
300
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
301
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
302
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @internal
|
|
307
|
+
*/
|
|
308
|
+
declare class Heatmap2D implements Drawable {
|
|
309
|
+
readonly kind = "heatmap";
|
|
310
|
+
readonly data: Float64Array;
|
|
311
|
+
readonly rows: number;
|
|
312
|
+
readonly cols: number;
|
|
313
|
+
readonly vmin: number;
|
|
314
|
+
readonly vmax: number;
|
|
315
|
+
readonly colormap: "viridis" | "plasma" | "inferno" | "magma" | "grayscale";
|
|
316
|
+
readonly xMin: number;
|
|
317
|
+
readonly xMax: number;
|
|
318
|
+
readonly yMin: number;
|
|
319
|
+
readonly yMax: number;
|
|
320
|
+
readonly label: string | null;
|
|
321
|
+
constructor(data: Float64Array, rows: number, cols: number, options: PlotOptions);
|
|
322
|
+
getDataRange(): DataRange | null;
|
|
323
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
324
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
325
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* @internal
|
|
330
|
+
*/
|
|
331
|
+
declare class Histogram implements Drawable {
|
|
332
|
+
readonly kind = "histogram";
|
|
333
|
+
readonly bins: Float64Array;
|
|
334
|
+
readonly counts: Float64Array;
|
|
335
|
+
readonly binWidth: number;
|
|
336
|
+
readonly color: Color;
|
|
337
|
+
readonly edgecolor: Color;
|
|
338
|
+
readonly label: string | null;
|
|
339
|
+
constructor(data: Float64Array, numBins: number, options: PlotOptions);
|
|
340
|
+
getDataRange(): DataRange | null;
|
|
341
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
342
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
343
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* @internal
|
|
348
|
+
*/
|
|
349
|
+
declare class HorizontalBar2D implements Drawable {
|
|
350
|
+
readonly kind = "barh";
|
|
351
|
+
readonly y: Float64Array;
|
|
352
|
+
readonly width: Float64Array;
|
|
353
|
+
readonly color: Color;
|
|
354
|
+
readonly edgecolor: Color;
|
|
355
|
+
readonly barHeight: number;
|
|
356
|
+
readonly label: string | null;
|
|
357
|
+
constructor(y: Float64Array, width: Float64Array, options: PlotOptions);
|
|
358
|
+
getDataRange(): DataRange | null;
|
|
359
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
360
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
361
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @internal
|
|
366
|
+
*/
|
|
367
|
+
declare class Line2D implements Drawable {
|
|
368
|
+
readonly kind = "line";
|
|
369
|
+
readonly x: Float64Array;
|
|
370
|
+
readonly y: Float64Array;
|
|
371
|
+
readonly color: Color;
|
|
372
|
+
readonly linewidth: number;
|
|
373
|
+
readonly label: string | null;
|
|
374
|
+
constructor(x: Float64Array, y: Float64Array, options: PlotOptions);
|
|
375
|
+
getDataRange(): DataRange | null;
|
|
376
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
377
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
378
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @internal
|
|
383
|
+
*/
|
|
384
|
+
declare class Pie implements Drawable {
|
|
385
|
+
readonly kind = "pie";
|
|
386
|
+
readonly centerX: number;
|
|
387
|
+
readonly centerY: number;
|
|
388
|
+
readonly radius: number;
|
|
389
|
+
readonly values: readonly number[];
|
|
390
|
+
readonly angles: readonly number[];
|
|
391
|
+
readonly colors: readonly Color[];
|
|
392
|
+
readonly labels: readonly string[];
|
|
393
|
+
readonly rangeOverride: DataRange | undefined;
|
|
394
|
+
readonly label: string | null;
|
|
395
|
+
constructor(centerX: number, centerY: number, radius: number, values: Float64Array, labels?: readonly string[], options?: PlotOptions, rangeOverride?: DataRange);
|
|
396
|
+
getDataRange(): DataRange | null;
|
|
397
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
398
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
399
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* @internal
|
|
404
|
+
*/
|
|
405
|
+
declare class Scatter2D implements Drawable {
|
|
406
|
+
readonly kind = "scatter";
|
|
407
|
+
readonly x: Float64Array;
|
|
408
|
+
readonly y: Float64Array;
|
|
409
|
+
readonly color: Color;
|
|
410
|
+
readonly size: number;
|
|
411
|
+
readonly label: string | null;
|
|
412
|
+
constructor(x: Float64Array, y: Float64Array, options: PlotOptions);
|
|
413
|
+
getDataRange(): DataRange | null;
|
|
414
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
415
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
416
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* @internal
|
|
421
|
+
*/
|
|
422
|
+
declare class Violinplot implements Drawable {
|
|
423
|
+
readonly kind = "violinplot";
|
|
424
|
+
readonly position: number;
|
|
425
|
+
readonly q1: number;
|
|
426
|
+
readonly median: number;
|
|
427
|
+
readonly q3: number;
|
|
428
|
+
readonly kdePoints: readonly number[];
|
|
429
|
+
readonly kdeValues: readonly number[];
|
|
430
|
+
readonly color: Color;
|
|
431
|
+
readonly edgecolor: Color;
|
|
432
|
+
readonly violinWidth: number;
|
|
433
|
+
readonly label: string | null;
|
|
434
|
+
readonly hasData: boolean;
|
|
435
|
+
constructor(position: number, data: Float64Array, options: PlotOptions);
|
|
436
|
+
getDataRange(): DataRange | null;
|
|
437
|
+
drawSVG(ctx: SvgDrawContext): void;
|
|
438
|
+
drawRaster(ctx: RasterDrawContext): void;
|
|
439
|
+
getLegendEntries(): readonly LegendEntry[] | null;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* A Figure represents the entire plotting canvas.
|
|
444
|
+
*/
|
|
445
|
+
declare class Figure {
|
|
446
|
+
readonly width: number;
|
|
447
|
+
readonly height: number;
|
|
448
|
+
readonly background: Color;
|
|
449
|
+
readonly axesList: Axes[];
|
|
450
|
+
constructor(options?: {
|
|
451
|
+
readonly width?: number;
|
|
452
|
+
readonly height?: number;
|
|
453
|
+
readonly background?: Color;
|
|
454
|
+
});
|
|
455
|
+
/**
|
|
456
|
+
* Add a new axes to the figure.
|
|
457
|
+
* @param options - Axes layout options
|
|
458
|
+
*/
|
|
459
|
+
addAxes(options?: {
|
|
460
|
+
readonly padding?: number;
|
|
461
|
+
readonly facecolor?: Color;
|
|
462
|
+
readonly viewport?: Viewport;
|
|
463
|
+
}): Axes;
|
|
464
|
+
/**
|
|
465
|
+
* Render this figure to SVG.
|
|
466
|
+
*/
|
|
467
|
+
renderSVG(): RenderedSVG;
|
|
468
|
+
/**
|
|
469
|
+
* Render this figure to PNG (Node.js only).
|
|
470
|
+
*
|
|
471
|
+
* Note: PNG text rendering uses a built-in bitmap font for basic ASCII.
|
|
472
|
+
* Unsupported characters are rendered as "?".
|
|
473
|
+
*/
|
|
474
|
+
renderPNG(): Promise<RenderedPNG>;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* An Axes represents a single plot area within a Figure.
|
|
479
|
+
*/
|
|
480
|
+
declare class Axes {
|
|
481
|
+
readonly fig: Figure;
|
|
482
|
+
private readonly padding;
|
|
483
|
+
private readonly paddingProvided;
|
|
484
|
+
private readonly facecolor;
|
|
485
|
+
private readonly drawables;
|
|
486
|
+
private title;
|
|
487
|
+
private xlabel;
|
|
488
|
+
private ylabel;
|
|
489
|
+
private legendOptions;
|
|
490
|
+
private xTicksOverride;
|
|
491
|
+
private yTicksOverride;
|
|
492
|
+
private readonly baseViewport;
|
|
493
|
+
constructor(fig: Figure, options: {
|
|
494
|
+
readonly padding?: number;
|
|
495
|
+
readonly facecolor?: Color;
|
|
496
|
+
readonly viewport?: Viewport;
|
|
497
|
+
});
|
|
498
|
+
/** Set the axes title text. */
|
|
499
|
+
setTitle(title: string): void;
|
|
500
|
+
/** Set the x-axis label text. */
|
|
501
|
+
setXLabel(label: string): void;
|
|
502
|
+
/** Set the y-axis label text. */
|
|
503
|
+
setYLabel(label: string): void;
|
|
504
|
+
/**
|
|
505
|
+
* Set custom x-axis tick positions and labels.
|
|
506
|
+
* @param values - Tick positions in data coordinates
|
|
507
|
+
* @param labels - Optional tick labels
|
|
508
|
+
*/
|
|
509
|
+
setXTicks(values: readonly number[], labels?: readonly string[]): void;
|
|
510
|
+
/**
|
|
511
|
+
* Set custom y-axis tick positions and labels.
|
|
512
|
+
* @param values - Tick positions in data coordinates
|
|
513
|
+
* @param labels - Optional tick labels
|
|
514
|
+
*/
|
|
515
|
+
setYTicks(values: readonly number[], labels?: readonly string[]): void;
|
|
516
|
+
/**
|
|
517
|
+
* Show or configure the legend for this axes.
|
|
518
|
+
* @param options - Legend display options
|
|
519
|
+
*/
|
|
520
|
+
legend(options?: LegendOptions): void;
|
|
521
|
+
/**
|
|
522
|
+
* Plot a connected line series.
|
|
523
|
+
* @param x - 1D tensor of x coordinates
|
|
524
|
+
* @param y - 1D tensor of y coordinates
|
|
525
|
+
* @param options - Styling options
|
|
526
|
+
*/
|
|
527
|
+
plot(x: AnyTensor, y: AnyTensor, options?: PlotOptions): Line2D;
|
|
528
|
+
/**
|
|
529
|
+
* Plot unconnected points.
|
|
530
|
+
* @param x - 1D tensor of x coordinates
|
|
531
|
+
* @param y - 1D tensor of y coordinates
|
|
532
|
+
* @param options - Styling options
|
|
533
|
+
*/
|
|
534
|
+
scatter(x: AnyTensor, y: AnyTensor, options?: PlotOptions): Scatter2D;
|
|
535
|
+
/**
|
|
536
|
+
* Plot vertical bars.
|
|
537
|
+
* @param x - 1D tensor of bar centers
|
|
538
|
+
* @param height - 1D tensor of bar heights
|
|
539
|
+
* @param options - Styling options
|
|
540
|
+
*/
|
|
541
|
+
bar(x: AnyTensor, height: AnyTensor, options?: PlotOptions): Bar2D;
|
|
542
|
+
/**
|
|
543
|
+
* Plot a histogram.
|
|
544
|
+
* @param x - 1D tensor of sample values
|
|
545
|
+
* @param bins - Number of bins
|
|
546
|
+
* @param options - Styling options
|
|
547
|
+
*/
|
|
548
|
+
hist(x: AnyTensor, bins?: number, options?: PlotOptions): Histogram;
|
|
549
|
+
/**
|
|
550
|
+
* Plot horizontal bars.
|
|
551
|
+
* @param y - 1D tensor of bar centers
|
|
552
|
+
* @param width - 1D tensor of bar widths
|
|
553
|
+
* @param options - Styling options
|
|
554
|
+
*/
|
|
555
|
+
barh(y: AnyTensor, width: AnyTensor, options?: PlotOptions): HorizontalBar2D;
|
|
556
|
+
/**
|
|
557
|
+
* Plot a heatmap for 2D data.
|
|
558
|
+
* @param data - 2D tensor of values
|
|
559
|
+
* @param options - Styling and scale options
|
|
560
|
+
*/
|
|
561
|
+
heatmap(data: AnyTensor, options?: PlotOptions): Heatmap2D;
|
|
562
|
+
/**
|
|
563
|
+
* Display a matrix as an image (alias of heatmap).
|
|
564
|
+
* @param data - 2D tensor of values
|
|
565
|
+
* @param options - Styling and scale options
|
|
566
|
+
*/
|
|
567
|
+
imshow(data: AnyTensor, options?: PlotOptions): Heatmap2D;
|
|
568
|
+
/**
|
|
569
|
+
* Plot contour lines for a 2D grid.
|
|
570
|
+
* @param X - 1D/2D tensor of x coordinates (or empty)
|
|
571
|
+
* @param Y - 1D/2D tensor of y coordinates (or empty)
|
|
572
|
+
* @param Z - 2D tensor of values
|
|
573
|
+
* @param options - Styling and level options
|
|
574
|
+
*/
|
|
575
|
+
contour(X: AnyTensor, Y: AnyTensor, Z: AnyTensor, options?: PlotOptions): Contour2D;
|
|
576
|
+
/**
|
|
577
|
+
* Plot filled contours for a 2D grid.
|
|
578
|
+
* @param X - 1D/2D tensor of x coordinates (or empty)
|
|
579
|
+
* @param Y - 1D/2D tensor of y coordinates (or empty)
|
|
580
|
+
* @param Z - 2D tensor of values
|
|
581
|
+
* @param options - Styling and level options
|
|
582
|
+
*/
|
|
583
|
+
contourf(X: AnyTensor, Y: AnyTensor, Z: AnyTensor, options?: PlotOptions): ContourF2D;
|
|
584
|
+
/**
|
|
585
|
+
* Plot a box-and-whisker summary for a 1D dataset.
|
|
586
|
+
* @param data - 1D tensor of values
|
|
587
|
+
* @param options - Styling options
|
|
588
|
+
*/
|
|
589
|
+
boxplot(data: AnyTensor, options?: PlotOptions): Boxplot;
|
|
590
|
+
/**
|
|
591
|
+
* Plot a violin distribution summary for a 1D dataset.
|
|
592
|
+
* @param data - 1D tensor of values
|
|
593
|
+
* @param options - Styling options
|
|
594
|
+
*/
|
|
595
|
+
violinplot(data: AnyTensor, options?: PlotOptions): Violinplot;
|
|
596
|
+
/**
|
|
597
|
+
* Plot a pie chart.
|
|
598
|
+
* @param values - 1D tensor of non-negative values
|
|
599
|
+
* @param labels - Optional labels (must match values length)
|
|
600
|
+
* @param options - Styling options
|
|
601
|
+
*/
|
|
602
|
+
pie(values: AnyTensor, labels?: readonly string[], options?: PlotOptions): Pie;
|
|
603
|
+
private viewport;
|
|
604
|
+
private collectLegendEntries;
|
|
605
|
+
private resolveLegendOptions;
|
|
606
|
+
private buildTickOverride;
|
|
607
|
+
private renderTicksSVG;
|
|
608
|
+
private renderLegendSVG;
|
|
609
|
+
private renderTicksRaster;
|
|
610
|
+
private renderLegendRaster;
|
|
611
|
+
/**
|
|
612
|
+
* Render axes to SVG elements.
|
|
613
|
+
* @internal
|
|
614
|
+
*/
|
|
615
|
+
renderSVGInto(elements: string[]): void;
|
|
616
|
+
/**
|
|
617
|
+
* Render axes to raster canvas.
|
|
618
|
+
* @internal
|
|
619
|
+
*/
|
|
620
|
+
renderRasterInto(canvas: RasterCanvas): void;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Get the current axes, creating one if needed.
|
|
625
|
+
*/
|
|
626
|
+
declare function gca(): Axes;
|
|
627
|
+
/**
|
|
628
|
+
* Create a new figure and set it as current.
|
|
629
|
+
*/
|
|
630
|
+
declare function figure(options?: {
|
|
631
|
+
readonly width?: number;
|
|
632
|
+
readonly height?: number;
|
|
633
|
+
readonly background?: Color;
|
|
634
|
+
}): Figure;
|
|
635
|
+
/**
|
|
636
|
+
* Create a subplot and set it as current axes.
|
|
637
|
+
*/
|
|
638
|
+
declare function subplot(rows: number, cols: number, index: number, options?: {
|
|
639
|
+
readonly padding?: number;
|
|
640
|
+
readonly facecolor?: Color;
|
|
641
|
+
}): Axes;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Render a figure to SVG or PNG.
|
|
645
|
+
* @param options - Optional figure and format overrides
|
|
646
|
+
*/
|
|
647
|
+
declare function show(options?: {
|
|
648
|
+
readonly figure?: Figure;
|
|
649
|
+
readonly format?: "svg" | "png";
|
|
650
|
+
}): RenderedSVG | Promise<RenderedPNG>;
|
|
651
|
+
/**
|
|
652
|
+
* Save a figure to disk as SVG or PNG.
|
|
653
|
+
* @param path - Output file path (extension must match format)
|
|
654
|
+
* @param options - Optional figure and format overrides
|
|
655
|
+
*/
|
|
656
|
+
declare function saveFig(path: string, options?: {
|
|
657
|
+
readonly figure?: Figure;
|
|
658
|
+
readonly format?: "svg" | "png";
|
|
659
|
+
}): Promise<void>;
|
|
660
|
+
/**
|
|
661
|
+
* Plot a connected line series on the current axes.
|
|
662
|
+
*/
|
|
663
|
+
declare function plot(x: Tensor, y: Tensor, options?: PlotOptions): void;
|
|
664
|
+
/**
|
|
665
|
+
* Plot unconnected points on the current axes.
|
|
666
|
+
*/
|
|
667
|
+
declare function scatter(x: Tensor, y: Tensor, options?: PlotOptions): void;
|
|
668
|
+
/**
|
|
669
|
+
* Plot vertical bars on the current axes.
|
|
670
|
+
*/
|
|
671
|
+
declare function bar(x: Tensor, height: Tensor, options?: PlotOptions): void;
|
|
672
|
+
/**
|
|
673
|
+
* Plot horizontal bars on the current axes.
|
|
674
|
+
*/
|
|
675
|
+
declare function barh(y: Tensor, width: Tensor, options?: PlotOptions): void;
|
|
676
|
+
/**
|
|
677
|
+
* Plot a histogram on the current axes.
|
|
678
|
+
*/
|
|
679
|
+
declare function hist(x: Tensor, bins?: number, options?: PlotOptions): void;
|
|
680
|
+
/**
|
|
681
|
+
* Plot a box-and-whisker summary on the current axes.
|
|
682
|
+
*/
|
|
683
|
+
declare function boxplot(data: Tensor, options?: PlotOptions): void;
|
|
684
|
+
/**
|
|
685
|
+
* Plot a violin summary on the current axes.
|
|
686
|
+
*/
|
|
687
|
+
declare function violinplot(data: Tensor, options?: PlotOptions): void;
|
|
688
|
+
/**
|
|
689
|
+
* Plot a pie chart on the current axes.
|
|
690
|
+
*/
|
|
691
|
+
declare function pie(values: Tensor, labels?: readonly string[], options?: PlotOptions): void;
|
|
692
|
+
/**
|
|
693
|
+
* Show or configure a legend on the current axes.
|
|
694
|
+
*/
|
|
695
|
+
declare function legend(options?: LegendOptions): void;
|
|
696
|
+
/**
|
|
697
|
+
* Plot a heatmap for a 2D tensor.
|
|
698
|
+
*/
|
|
699
|
+
declare function heatmap(data: Tensor, options?: PlotOptions): void;
|
|
700
|
+
/**
|
|
701
|
+
* Display a matrix as an image (alias of heatmap).
|
|
702
|
+
*/
|
|
703
|
+
declare function imshow(data: Tensor, options?: PlotOptions): void;
|
|
704
|
+
/**
|
|
705
|
+
* Plot contour lines for a 2D grid.
|
|
706
|
+
*/
|
|
707
|
+
declare function contour(X: Tensor, Y: Tensor, Z: Tensor, options?: PlotOptions): void;
|
|
708
|
+
/**
|
|
709
|
+
* Plot filled contours for a 2D grid.
|
|
710
|
+
*/
|
|
711
|
+
declare function contourf(X: Tensor, Y: Tensor, Z: Tensor, options?: PlotOptions): void;
|
|
712
|
+
/**
|
|
713
|
+
* Plot a confusion matrix as a heatmap.
|
|
714
|
+
*/
|
|
715
|
+
declare function plotConfusionMatrix(cm: Tensor, labels?: readonly string[], options?: PlotOptions): void;
|
|
716
|
+
/**
|
|
717
|
+
* Plot a ROC curve with optional AUC annotation.
|
|
718
|
+
*/
|
|
719
|
+
declare function plotRocCurve(fpr: Tensor, tpr: Tensor, auc?: number, options?: PlotOptions): void;
|
|
720
|
+
/**
|
|
721
|
+
* Plot a precision-recall curve with optional AP annotation.
|
|
722
|
+
*/
|
|
723
|
+
declare function plotPrecisionRecallCurve(precision: Tensor, recall: Tensor, averagePrecision?: number, options?: PlotOptions): void;
|
|
724
|
+
/**
|
|
725
|
+
* Plot training and validation learning curves.
|
|
726
|
+
*/
|
|
727
|
+
declare function plotLearningCurve(trainSizes: Tensor, trainScores: Tensor, valScores: Tensor, options?: PlotOptions): void;
|
|
728
|
+
/**
|
|
729
|
+
* Plot training and validation curves.
|
|
730
|
+
*/
|
|
731
|
+
declare function plotValidationCurve(paramRange: Tensor, trainScores: Tensor, valScores: Tensor, options?: PlotOptions): void;
|
|
732
|
+
/**
|
|
733
|
+
* Plot a classifier decision boundary on a 2D feature space.
|
|
734
|
+
*/
|
|
735
|
+
declare function plotDecisionBoundary(X: Tensor, y: Tensor, model: {
|
|
736
|
+
readonly predict: (x: Tensor) => Tensor;
|
|
737
|
+
}, options?: PlotOptions): void;
|
|
738
|
+
|
|
739
|
+
type index_Axes = Axes;
|
|
740
|
+
declare const index_Axes: typeof Axes;
|
|
741
|
+
type index_Color = Color;
|
|
742
|
+
type index_Figure = Figure;
|
|
743
|
+
declare const index_Figure: typeof Figure;
|
|
744
|
+
type index_LegendOptions = LegendOptions;
|
|
745
|
+
type index_PlotOptions = PlotOptions;
|
|
746
|
+
type index_RenderedPNG = RenderedPNG;
|
|
747
|
+
type index_RenderedSVG = RenderedSVG;
|
|
748
|
+
declare const index_bar: typeof bar;
|
|
749
|
+
declare const index_barh: typeof barh;
|
|
750
|
+
declare const index_boxplot: typeof boxplot;
|
|
751
|
+
declare const index_contour: typeof contour;
|
|
752
|
+
declare const index_contourf: typeof contourf;
|
|
753
|
+
declare const index_figure: typeof figure;
|
|
754
|
+
declare const index_gca: typeof gca;
|
|
755
|
+
declare const index_heatmap: typeof heatmap;
|
|
756
|
+
declare const index_hist: typeof hist;
|
|
757
|
+
declare const index_imshow: typeof imshow;
|
|
758
|
+
declare const index_legend: typeof legend;
|
|
759
|
+
declare const index_pie: typeof pie;
|
|
760
|
+
declare const index_plot: typeof plot;
|
|
761
|
+
declare const index_plotConfusionMatrix: typeof plotConfusionMatrix;
|
|
762
|
+
declare const index_plotDecisionBoundary: typeof plotDecisionBoundary;
|
|
763
|
+
declare const index_plotLearningCurve: typeof plotLearningCurve;
|
|
764
|
+
declare const index_plotPrecisionRecallCurve: typeof plotPrecisionRecallCurve;
|
|
765
|
+
declare const index_plotRocCurve: typeof plotRocCurve;
|
|
766
|
+
declare const index_plotValidationCurve: typeof plotValidationCurve;
|
|
767
|
+
declare const index_saveFig: typeof saveFig;
|
|
768
|
+
declare const index_scatter: typeof scatter;
|
|
769
|
+
declare const index_show: typeof show;
|
|
770
|
+
declare const index_subplot: typeof subplot;
|
|
771
|
+
declare const index_violinplot: typeof violinplot;
|
|
772
|
+
declare namespace index {
|
|
773
|
+
export { index_Axes as Axes, type index_Color as Color, index_Figure as Figure, type index_LegendOptions as LegendOptions, type index_PlotOptions as PlotOptions, type index_RenderedPNG as RenderedPNG, type index_RenderedSVG as RenderedSVG, index_bar as bar, index_barh as barh, index_boxplot as boxplot, index_contour as contour, index_contourf as contourf, index_figure as figure, index_gca as gca, index_heatmap as heatmap, index_hist as hist, index_imshow as imshow, index_legend as legend, index_pie as pie, index_plot as plot, index_plotConfusionMatrix as plotConfusionMatrix, index_plotDecisionBoundary as plotDecisionBoundary, index_plotLearningCurve as plotLearningCurve, index_plotPrecisionRecallCurve as plotPrecisionRecallCurve, index_plotRocCurve as plotRocCurve, index_plotValidationCurve as plotValidationCurve, index_saveFig as saveFig, index_scatter as scatter, index_show as show, index_subplot as subplot, index_violinplot as violinplot };
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export { Axes as A, type Color as C, Figure as F, type LegendOptions as L, type PlotOptions as P, type RenderedPNG as R, saveFig as a, scatter as b, bar as c, barh as d, boxplot as e, pie as f, heatmap as g, hist as h, index as i, imshow as j, contour as k, legend as l, contourf as m, plotConfusionMatrix as n, plotRocCurve as o, plot as p, plotPrecisionRecallCurve as q, plotLearningCurve as r, show as s, plotValidationCurve as t, plotDecisionBoundary as u, violinplot as v, figure as w, gca as x, subplot as y, type RenderedSVG as z };
|