@elaraai/east-py-datascience 0.0.2-beta.1

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.
Files changed (56) hide show
  1. package/LICENSE.md +18 -0
  2. package/README.md +104 -0
  3. package/dist/gp/gp.d.ts +398 -0
  4. package/dist/gp/gp.d.ts.map +1 -0
  5. package/dist/gp/gp.js +170 -0
  6. package/dist/gp/gp.js.map +1 -0
  7. package/dist/index.d.ts +27 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +39 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/lightgbm/lightgbm.d.ts +494 -0
  12. package/dist/lightgbm/lightgbm.d.ts.map +1 -0
  13. package/dist/lightgbm/lightgbm.js +155 -0
  14. package/dist/lightgbm/lightgbm.js.map +1 -0
  15. package/dist/mads/mads.d.ts +413 -0
  16. package/dist/mads/mads.d.ts.map +1 -0
  17. package/dist/mads/mads.js +221 -0
  18. package/dist/mads/mads.js.map +1 -0
  19. package/dist/ngboost/ngboost.d.ts +433 -0
  20. package/dist/ngboost/ngboost.d.ts.map +1 -0
  21. package/dist/ngboost/ngboost.js +178 -0
  22. package/dist/ngboost/ngboost.js.map +1 -0
  23. package/dist/optuna/optuna.d.ts +797 -0
  24. package/dist/optuna/optuna.d.ts.map +1 -0
  25. package/dist/optuna/optuna.js +268 -0
  26. package/dist/optuna/optuna.js.map +1 -0
  27. package/dist/scipy/scipy.d.ts +954 -0
  28. package/dist/scipy/scipy.d.ts.map +1 -0
  29. package/dist/scipy/scipy.js +287 -0
  30. package/dist/scipy/scipy.js.map +1 -0
  31. package/dist/shap/shap.d.ts +657 -0
  32. package/dist/shap/shap.d.ts.map +1 -0
  33. package/dist/shap/shap.js +241 -0
  34. package/dist/shap/shap.js.map +1 -0
  35. package/dist/simanneal/simanneal.d.ts +531 -0
  36. package/dist/simanneal/simanneal.d.ts.map +1 -0
  37. package/dist/simanneal/simanneal.js +231 -0
  38. package/dist/simanneal/simanneal.js.map +1 -0
  39. package/dist/sklearn/sklearn.d.ts +1272 -0
  40. package/dist/sklearn/sklearn.d.ts.map +1 -0
  41. package/dist/sklearn/sklearn.js +307 -0
  42. package/dist/sklearn/sklearn.js.map +1 -0
  43. package/dist/torch/torch.d.ts +658 -0
  44. package/dist/torch/torch.d.ts.map +1 -0
  45. package/dist/torch/torch.js +233 -0
  46. package/dist/torch/torch.js.map +1 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -0
  48. package/dist/types.d.ts +80 -0
  49. package/dist/types.d.ts.map +1 -0
  50. package/dist/types.js +81 -0
  51. package/dist/types.js.map +1 -0
  52. package/dist/xgboost/xgboost.d.ts +504 -0
  53. package/dist/xgboost/xgboost.d.ts.map +1 -0
  54. package/dist/xgboost/xgboost.js +177 -0
  55. package/dist/xgboost/xgboost.js.map +1 -0
  56. package/package.json +82 -0
@@ -0,0 +1,1272 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * Scikit-learn platform functions for East.
7
+ *
8
+ * Provides core machine learning utilities: preprocessing, model selection, and metrics.
9
+ * Uses ONNX for model serialization to enable portable inference.
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ import { StructType, VariantType, OptionType, IntegerType, BooleanType, FloatType, BlobType, ArrayType, StringType } from "@elaraai/east";
14
+ export { VectorType, MatrixType, LabelVectorType } from "../types.js";
15
+ export { XGBoostConfigType } from "../xgboost/xgboost.js";
16
+ export { LightGBMConfigType } from "../lightgbm/lightgbm.js";
17
+ export { NGBoostConfigType } from "../ngboost/ngboost.js";
18
+ export { GPConfigType } from "../gp/gp.js";
19
+ /**
20
+ * Configuration for train/test split.
21
+ */
22
+ export declare const SplitConfigType: StructType<{
23
+ /** Proportion of data to include in test split (default 0.2) */
24
+ test_size: OptionType<FloatType>;
25
+ /** Random seed for reproducibility */
26
+ random_state: OptionType<IntegerType>;
27
+ /** Whether to shuffle data before splitting (default true) */
28
+ shuffle: OptionType<BooleanType>;
29
+ }>;
30
+ /**
31
+ * Result of train/test split.
32
+ */
33
+ export declare const SplitResultType: StructType<{
34
+ /** Training features */
35
+ X_train: ArrayType<ArrayType<FloatType>>;
36
+ /** Test features */
37
+ X_test: ArrayType<ArrayType<FloatType>>;
38
+ /** Training labels */
39
+ y_train: ArrayType<FloatType>;
40
+ /** Test labels */
41
+ y_test: ArrayType<FloatType>;
42
+ }>;
43
+ /**
44
+ * Regression metrics result.
45
+ */
46
+ export declare const RegressionMetricsType: StructType<{
47
+ /** Mean Squared Error */
48
+ mse: FloatType;
49
+ /** Root Mean Squared Error */
50
+ rmse: FloatType;
51
+ /** Mean Absolute Error */
52
+ mae: FloatType;
53
+ /** R-squared (coefficient of determination) */
54
+ r2: FloatType;
55
+ /** Mean Absolute Percentage Error */
56
+ mape: FloatType;
57
+ }>;
58
+ /**
59
+ * Classification metrics result.
60
+ */
61
+ export declare const ClassificationMetricsType: StructType<{
62
+ /** Accuracy score */
63
+ accuracy: FloatType;
64
+ /** Precision (weighted average) */
65
+ precision: FloatType;
66
+ /** Recall (weighted average) */
67
+ recall: FloatType;
68
+ /** F1 score (weighted average) */
69
+ f1: FloatType;
70
+ }>;
71
+ /**
72
+ * Model blob type for serialized sklearn models.
73
+ *
74
+ * Each model type has its own variant case containing ONNX bytes and metadata.
75
+ */
76
+ export declare const SklearnModelBlobType: VariantType<{
77
+ /** StandardScaler model */
78
+ standard_scaler: StructType<{
79
+ /** ONNX model bytes */
80
+ onnx: BlobType;
81
+ /** Number of input features */
82
+ n_features: IntegerType;
83
+ }>;
84
+ /** MinMaxScaler model */
85
+ min_max_scaler: StructType<{
86
+ /** ONNX model bytes */
87
+ onnx: BlobType;
88
+ /** Number of input features */
89
+ n_features: IntegerType;
90
+ }>;
91
+ /** RegressorChain model */
92
+ regressor_chain: StructType<{
93
+ /** Cloudpickle serialized chain */
94
+ data: BlobType;
95
+ /** Number of input features */
96
+ n_features: IntegerType;
97
+ /** Number of target outputs */
98
+ n_targets: IntegerType;
99
+ /** Base estimator type name */
100
+ base_estimator_type: StringType;
101
+ }>;
102
+ }>;
103
+ /**
104
+ * Base estimator configuration for RegressorChain.
105
+ * Variant carries both the estimator type AND its configuration.
106
+ */
107
+ export declare const RegressorChainBaseConfigType: VariantType<{
108
+ /** XGBoost regressor */
109
+ xgboost: StructType<{
110
+ n_estimators: OptionType<IntegerType>;
111
+ max_depth: OptionType<IntegerType>;
112
+ learning_rate: OptionType<FloatType>;
113
+ min_child_weight: OptionType<IntegerType>;
114
+ subsample: OptionType<FloatType>;
115
+ colsample_bytree: OptionType<FloatType>;
116
+ reg_alpha: OptionType<FloatType>;
117
+ reg_lambda: OptionType<FloatType>;
118
+ random_state: OptionType<IntegerType>;
119
+ n_jobs: OptionType<IntegerType>;
120
+ }>;
121
+ /** LightGBM regressor */
122
+ lightgbm: StructType<{
123
+ n_estimators: OptionType<IntegerType>;
124
+ max_depth: OptionType<IntegerType>;
125
+ learning_rate: OptionType<FloatType>;
126
+ num_leaves: OptionType<IntegerType>;
127
+ min_child_samples: OptionType<IntegerType>;
128
+ subsample: OptionType<FloatType>;
129
+ colsample_bytree: OptionType<FloatType>;
130
+ reg_alpha: OptionType<FloatType>;
131
+ reg_lambda: OptionType<FloatType>;
132
+ random_state: OptionType<IntegerType>;
133
+ n_jobs: OptionType<IntegerType>;
134
+ }>;
135
+ /** NGBoost regressor */
136
+ ngboost: StructType<{
137
+ n_estimators: OptionType<IntegerType>;
138
+ learning_rate: OptionType<FloatType>;
139
+ minibatch_frac: OptionType<FloatType>;
140
+ col_sample: OptionType<FloatType>;
141
+ random_state: OptionType<IntegerType>;
142
+ distribution: OptionType<VariantType<{
143
+ normal: StructType<{}>;
144
+ lognormal: StructType<{}>;
145
+ }>>;
146
+ }>;
147
+ /** Gaussian Process regressor */
148
+ gp: StructType<{
149
+ kernel: OptionType<VariantType<{
150
+ rbf: StructType<{}>;
151
+ matern_1_2: StructType<{}>;
152
+ matern_3_2: StructType<{}>;
153
+ matern_5_2: StructType<{}>;
154
+ rational_quadratic: StructType<{}>;
155
+ dot_product: StructType<{}>;
156
+ }>>;
157
+ alpha: OptionType<FloatType>;
158
+ n_restarts_optimizer: OptionType<IntegerType>;
159
+ normalize_y: OptionType<BooleanType>;
160
+ random_state: OptionType<IntegerType>;
161
+ }>;
162
+ }>;
163
+ /**
164
+ * Configuration for RegressorChain.
165
+ */
166
+ export declare const RegressorChainConfigType: StructType<{
167
+ /** Base estimator with its configuration */
168
+ base_estimator: VariantType<{
169
+ /** XGBoost regressor */
170
+ xgboost: StructType<{
171
+ n_estimators: OptionType<IntegerType>;
172
+ max_depth: OptionType<IntegerType>;
173
+ learning_rate: OptionType<FloatType>;
174
+ min_child_weight: OptionType<IntegerType>;
175
+ subsample: OptionType<FloatType>;
176
+ colsample_bytree: OptionType<FloatType>;
177
+ reg_alpha: OptionType<FloatType>;
178
+ reg_lambda: OptionType<FloatType>;
179
+ random_state: OptionType<IntegerType>;
180
+ n_jobs: OptionType<IntegerType>;
181
+ }>;
182
+ /** LightGBM regressor */
183
+ lightgbm: StructType<{
184
+ n_estimators: OptionType<IntegerType>;
185
+ max_depth: OptionType<IntegerType>;
186
+ learning_rate: OptionType<FloatType>;
187
+ num_leaves: OptionType<IntegerType>;
188
+ min_child_samples: OptionType<IntegerType>;
189
+ subsample: OptionType<FloatType>;
190
+ colsample_bytree: OptionType<FloatType>;
191
+ reg_alpha: OptionType<FloatType>;
192
+ reg_lambda: OptionType<FloatType>;
193
+ random_state: OptionType<IntegerType>;
194
+ n_jobs: OptionType<IntegerType>;
195
+ }>;
196
+ /** NGBoost regressor */
197
+ ngboost: StructType<{
198
+ n_estimators: OptionType<IntegerType>;
199
+ learning_rate: OptionType<FloatType>;
200
+ minibatch_frac: OptionType<FloatType>;
201
+ col_sample: OptionType<FloatType>;
202
+ random_state: OptionType<IntegerType>;
203
+ distribution: OptionType<VariantType<{
204
+ normal: StructType<{}>;
205
+ lognormal: StructType<{}>;
206
+ }>>;
207
+ }>;
208
+ /** Gaussian Process regressor */
209
+ gp: StructType<{
210
+ kernel: OptionType<VariantType<{
211
+ rbf: StructType<{}>;
212
+ matern_1_2: StructType<{}>;
213
+ matern_3_2: StructType<{}>;
214
+ matern_5_2: StructType<{}>;
215
+ rational_quadratic: StructType<{}>;
216
+ dot_product: StructType<{}>;
217
+ }>>;
218
+ alpha: OptionType<FloatType>;
219
+ n_restarts_optimizer: OptionType<IntegerType>;
220
+ normalize_y: OptionType<BooleanType>;
221
+ random_state: OptionType<IntegerType>;
222
+ }>;
223
+ }>;
224
+ /** Chain order (indices of targets). None = natural order [0,1,2,...] */
225
+ order: OptionType<ArrayType<IntegerType>>;
226
+ /** Random seed for reproducibility */
227
+ random_state: OptionType<IntegerType>;
228
+ }>;
229
+ /**
230
+ * Split arrays into train and test subsets.
231
+ *
232
+ * @param X - Feature matrix
233
+ * @param y - Target vector
234
+ * @param config - Split configuration
235
+ * @returns Split result with X_train, X_test, y_train, y_test
236
+ */
237
+ export declare const sklearn_train_test_split: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
238
+ /** Proportion of data to include in test split (default 0.2) */
239
+ test_size: OptionType<FloatType>;
240
+ /** Random seed for reproducibility */
241
+ random_state: OptionType<IntegerType>;
242
+ /** Whether to shuffle data before splitting (default true) */
243
+ shuffle: OptionType<BooleanType>;
244
+ }>], StructType<{
245
+ /** Training features */
246
+ X_train: ArrayType<ArrayType<FloatType>>;
247
+ /** Test features */
248
+ X_test: ArrayType<ArrayType<FloatType>>;
249
+ /** Training labels */
250
+ y_train: ArrayType<FloatType>;
251
+ /** Test labels */
252
+ y_test: ArrayType<FloatType>;
253
+ }>>;
254
+ /**
255
+ * Fit a StandardScaler to training data.
256
+ *
257
+ * Standardizes features by removing the mean and scaling to unit variance.
258
+ *
259
+ * @param X - Training feature matrix
260
+ * @returns Model blob containing fitted scaler
261
+ */
262
+ export declare const sklearn_standard_scaler_fit: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>], VariantType<{
263
+ /** StandardScaler model */
264
+ standard_scaler: StructType<{
265
+ /** ONNX model bytes */
266
+ onnx: BlobType;
267
+ /** Number of input features */
268
+ n_features: IntegerType;
269
+ }>;
270
+ /** MinMaxScaler model */
271
+ min_max_scaler: StructType<{
272
+ /** ONNX model bytes */
273
+ onnx: BlobType;
274
+ /** Number of input features */
275
+ n_features: IntegerType;
276
+ }>;
277
+ /** RegressorChain model */
278
+ regressor_chain: StructType<{
279
+ /** Cloudpickle serialized chain */
280
+ data: BlobType;
281
+ /** Number of input features */
282
+ n_features: IntegerType;
283
+ /** Number of target outputs */
284
+ n_targets: IntegerType;
285
+ /** Base estimator type name */
286
+ base_estimator_type: StringType;
287
+ }>;
288
+ }>>;
289
+ /**
290
+ * Transform data using a fitted StandardScaler.
291
+ *
292
+ * @param model - Fitted scaler model blob
293
+ * @param X - Feature matrix to transform
294
+ * @returns Transformed feature matrix
295
+ */
296
+ export declare const sklearn_standard_scaler_transform: import("@elaraai/east").PlatformDefinition<[VariantType<{
297
+ /** StandardScaler model */
298
+ standard_scaler: StructType<{
299
+ /** ONNX model bytes */
300
+ onnx: BlobType;
301
+ /** Number of input features */
302
+ n_features: IntegerType;
303
+ }>;
304
+ /** MinMaxScaler model */
305
+ min_max_scaler: StructType<{
306
+ /** ONNX model bytes */
307
+ onnx: BlobType;
308
+ /** Number of input features */
309
+ n_features: IntegerType;
310
+ }>;
311
+ /** RegressorChain model */
312
+ regressor_chain: StructType<{
313
+ /** Cloudpickle serialized chain */
314
+ data: BlobType;
315
+ /** Number of input features */
316
+ n_features: IntegerType;
317
+ /** Number of target outputs */
318
+ n_targets: IntegerType;
319
+ /** Base estimator type name */
320
+ base_estimator_type: StringType;
321
+ }>;
322
+ }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
323
+ /**
324
+ * Fit a MinMaxScaler to training data.
325
+ *
326
+ * Scales features to a given range (default [0, 1]).
327
+ *
328
+ * @param X - Training feature matrix
329
+ * @returns Model blob containing fitted scaler
330
+ */
331
+ export declare const sklearn_min_max_scaler_fit: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>], VariantType<{
332
+ /** StandardScaler model */
333
+ standard_scaler: StructType<{
334
+ /** ONNX model bytes */
335
+ onnx: BlobType;
336
+ /** Number of input features */
337
+ n_features: IntegerType;
338
+ }>;
339
+ /** MinMaxScaler model */
340
+ min_max_scaler: StructType<{
341
+ /** ONNX model bytes */
342
+ onnx: BlobType;
343
+ /** Number of input features */
344
+ n_features: IntegerType;
345
+ }>;
346
+ /** RegressorChain model */
347
+ regressor_chain: StructType<{
348
+ /** Cloudpickle serialized chain */
349
+ data: BlobType;
350
+ /** Number of input features */
351
+ n_features: IntegerType;
352
+ /** Number of target outputs */
353
+ n_targets: IntegerType;
354
+ /** Base estimator type name */
355
+ base_estimator_type: StringType;
356
+ }>;
357
+ }>>;
358
+ /**
359
+ * Transform data using a fitted MinMaxScaler.
360
+ *
361
+ * @param model - Fitted scaler model blob
362
+ * @param X - Feature matrix to transform
363
+ * @returns Transformed feature matrix
364
+ */
365
+ export declare const sklearn_min_max_scaler_transform: import("@elaraai/east").PlatformDefinition<[VariantType<{
366
+ /** StandardScaler model */
367
+ standard_scaler: StructType<{
368
+ /** ONNX model bytes */
369
+ onnx: BlobType;
370
+ /** Number of input features */
371
+ n_features: IntegerType;
372
+ }>;
373
+ /** MinMaxScaler model */
374
+ min_max_scaler: StructType<{
375
+ /** ONNX model bytes */
376
+ onnx: BlobType;
377
+ /** Number of input features */
378
+ n_features: IntegerType;
379
+ }>;
380
+ /** RegressorChain model */
381
+ regressor_chain: StructType<{
382
+ /** Cloudpickle serialized chain */
383
+ data: BlobType;
384
+ /** Number of input features */
385
+ n_features: IntegerType;
386
+ /** Number of target outputs */
387
+ n_targets: IntegerType;
388
+ /** Base estimator type name */
389
+ base_estimator_type: StringType;
390
+ }>;
391
+ }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
392
+ /**
393
+ * Compute regression metrics.
394
+ *
395
+ * @param y_true - True target values
396
+ * @param y_pred - Predicted target values
397
+ * @returns Regression metrics (MSE, RMSE, MAE, R2, MAPE)
398
+ */
399
+ export declare const sklearn_metrics_regression: import("@elaraai/east").PlatformDefinition<[ArrayType<FloatType>, ArrayType<FloatType>], StructType<{
400
+ /** Mean Squared Error */
401
+ mse: FloatType;
402
+ /** Root Mean Squared Error */
403
+ rmse: FloatType;
404
+ /** Mean Absolute Error */
405
+ mae: FloatType;
406
+ /** R-squared (coefficient of determination) */
407
+ r2: FloatType;
408
+ /** Mean Absolute Percentage Error */
409
+ mape: FloatType;
410
+ }>>;
411
+ /**
412
+ * Compute classification metrics.
413
+ *
414
+ * @param y_true - True class labels
415
+ * @param y_pred - Predicted class labels
416
+ * @returns Classification metrics (accuracy, precision, recall, F1)
417
+ */
418
+ export declare const sklearn_metrics_classification: import("@elaraai/east").PlatformDefinition<[ArrayType<IntegerType>, ArrayType<IntegerType>], StructType<{
419
+ /** Accuracy score */
420
+ accuracy: FloatType;
421
+ /** Precision (weighted average) */
422
+ precision: FloatType;
423
+ /** Recall (weighted average) */
424
+ recall: FloatType;
425
+ /** F1 score (weighted average) */
426
+ f1: FloatType;
427
+ }>>;
428
+ /**
429
+ * Multi-target output type for RegressorChain.
430
+ */
431
+ export declare const MultiTargetType: ArrayType<ArrayType<FloatType>>;
432
+ /**
433
+ * Train a RegressorChain for multi-target regression.
434
+ *
435
+ * Each model in the chain uses previous targets as additional features,
436
+ * enabling modeling of dependencies between targets.
437
+ *
438
+ * @param X - Feature matrix
439
+ * @param Y - Target matrix (rows=samples, cols=targets)
440
+ * @param config - Chain configuration
441
+ * @returns Model blob containing fitted chain
442
+ */
443
+ export declare const sklearn_regressor_chain_train: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<ArrayType<FloatType>>, StructType<{
444
+ /** Base estimator with its configuration */
445
+ base_estimator: VariantType<{
446
+ /** XGBoost regressor */
447
+ xgboost: StructType<{
448
+ n_estimators: OptionType<IntegerType>;
449
+ max_depth: OptionType<IntegerType>;
450
+ learning_rate: OptionType<FloatType>;
451
+ min_child_weight: OptionType<IntegerType>;
452
+ subsample: OptionType<FloatType>;
453
+ colsample_bytree: OptionType<FloatType>;
454
+ reg_alpha: OptionType<FloatType>;
455
+ reg_lambda: OptionType<FloatType>;
456
+ random_state: OptionType<IntegerType>;
457
+ n_jobs: OptionType<IntegerType>;
458
+ }>;
459
+ /** LightGBM regressor */
460
+ lightgbm: StructType<{
461
+ n_estimators: OptionType<IntegerType>;
462
+ max_depth: OptionType<IntegerType>;
463
+ learning_rate: OptionType<FloatType>;
464
+ num_leaves: OptionType<IntegerType>;
465
+ min_child_samples: OptionType<IntegerType>;
466
+ subsample: OptionType<FloatType>;
467
+ colsample_bytree: OptionType<FloatType>;
468
+ reg_alpha: OptionType<FloatType>;
469
+ reg_lambda: OptionType<FloatType>;
470
+ random_state: OptionType<IntegerType>;
471
+ n_jobs: OptionType<IntegerType>;
472
+ }>;
473
+ /** NGBoost regressor */
474
+ ngboost: StructType<{
475
+ n_estimators: OptionType<IntegerType>;
476
+ learning_rate: OptionType<FloatType>;
477
+ minibatch_frac: OptionType<FloatType>;
478
+ col_sample: OptionType<FloatType>;
479
+ random_state: OptionType<IntegerType>;
480
+ distribution: OptionType<VariantType<{
481
+ normal: StructType<{}>;
482
+ lognormal: StructType<{}>;
483
+ }>>;
484
+ }>;
485
+ /** Gaussian Process regressor */
486
+ gp: StructType<{
487
+ kernel: OptionType<VariantType<{
488
+ rbf: StructType<{}>;
489
+ matern_1_2: StructType<{}>;
490
+ matern_3_2: StructType<{}>;
491
+ matern_5_2: StructType<{}>;
492
+ rational_quadratic: StructType<{}>;
493
+ dot_product: StructType<{}>;
494
+ }>>;
495
+ alpha: OptionType<FloatType>;
496
+ n_restarts_optimizer: OptionType<IntegerType>;
497
+ normalize_y: OptionType<BooleanType>;
498
+ random_state: OptionType<IntegerType>;
499
+ }>;
500
+ }>;
501
+ /** Chain order (indices of targets). None = natural order [0,1,2,...] */
502
+ order: OptionType<ArrayType<IntegerType>>;
503
+ /** Random seed for reproducibility */
504
+ random_state: OptionType<IntegerType>;
505
+ }>], VariantType<{
506
+ /** StandardScaler model */
507
+ standard_scaler: StructType<{
508
+ /** ONNX model bytes */
509
+ onnx: BlobType;
510
+ /** Number of input features */
511
+ n_features: IntegerType;
512
+ }>;
513
+ /** MinMaxScaler model */
514
+ min_max_scaler: StructType<{
515
+ /** ONNX model bytes */
516
+ onnx: BlobType;
517
+ /** Number of input features */
518
+ n_features: IntegerType;
519
+ }>;
520
+ /** RegressorChain model */
521
+ regressor_chain: StructType<{
522
+ /** Cloudpickle serialized chain */
523
+ data: BlobType;
524
+ /** Number of input features */
525
+ n_features: IntegerType;
526
+ /** Number of target outputs */
527
+ n_targets: IntegerType;
528
+ /** Base estimator type name */
529
+ base_estimator_type: StringType;
530
+ }>;
531
+ }>>;
532
+ /**
533
+ * Predict using a fitted RegressorChain.
534
+ *
535
+ * @param model - Fitted chain model blob
536
+ * @param X - Feature matrix to predict
537
+ * @returns Predicted target matrix
538
+ */
539
+ export declare const sklearn_regressor_chain_predict: import("@elaraai/east").PlatformDefinition<[VariantType<{
540
+ /** StandardScaler model */
541
+ standard_scaler: StructType<{
542
+ /** ONNX model bytes */
543
+ onnx: BlobType;
544
+ /** Number of input features */
545
+ n_features: IntegerType;
546
+ }>;
547
+ /** MinMaxScaler model */
548
+ min_max_scaler: StructType<{
549
+ /** ONNX model bytes */
550
+ onnx: BlobType;
551
+ /** Number of input features */
552
+ n_features: IntegerType;
553
+ }>;
554
+ /** RegressorChain model */
555
+ regressor_chain: StructType<{
556
+ /** Cloudpickle serialized chain */
557
+ data: BlobType;
558
+ /** Number of input features */
559
+ n_features: IntegerType;
560
+ /** Number of target outputs */
561
+ n_targets: IntegerType;
562
+ /** Base estimator type name */
563
+ base_estimator_type: StringType;
564
+ }>;
565
+ }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
566
+ /**
567
+ * Type definitions for sklearn functions.
568
+ */
569
+ export declare const SklearnTypes: {
570
+ /** Vector type (array of floats) */
571
+ readonly VectorType: ArrayType<FloatType>;
572
+ /** Matrix type (2D array of floats) */
573
+ readonly MatrixType: ArrayType<ArrayType<FloatType>>;
574
+ /** Label vector type (array of integers) */
575
+ readonly LabelVectorType: ArrayType<IntegerType>;
576
+ /** Split configuration type */
577
+ readonly SplitConfigType: StructType<{
578
+ /** Proportion of data to include in test split (default 0.2) */
579
+ test_size: OptionType<FloatType>;
580
+ /** Random seed for reproducibility */
581
+ random_state: OptionType<IntegerType>;
582
+ /** Whether to shuffle data before splitting (default true) */
583
+ shuffle: OptionType<BooleanType>;
584
+ }>;
585
+ /** Split result type */
586
+ readonly SplitResultType: StructType<{
587
+ /** Training features */
588
+ X_train: ArrayType<ArrayType<FloatType>>;
589
+ /** Test features */
590
+ X_test: ArrayType<ArrayType<FloatType>>;
591
+ /** Training labels */
592
+ y_train: ArrayType<FloatType>;
593
+ /** Test labels */
594
+ y_test: ArrayType<FloatType>;
595
+ }>;
596
+ /** Regression metrics type */
597
+ readonly RegressionMetricsType: StructType<{
598
+ /** Mean Squared Error */
599
+ mse: FloatType;
600
+ /** Root Mean Squared Error */
601
+ rmse: FloatType;
602
+ /** Mean Absolute Error */
603
+ mae: FloatType;
604
+ /** R-squared (coefficient of determination) */
605
+ r2: FloatType;
606
+ /** Mean Absolute Percentage Error */
607
+ mape: FloatType;
608
+ }>;
609
+ /** Classification metrics type */
610
+ readonly ClassificationMetricsType: StructType<{
611
+ /** Accuracy score */
612
+ accuracy: FloatType;
613
+ /** Precision (weighted average) */
614
+ precision: FloatType;
615
+ /** Recall (weighted average) */
616
+ recall: FloatType;
617
+ /** F1 score (weighted average) */
618
+ f1: FloatType;
619
+ }>;
620
+ /** Model blob type for sklearn models */
621
+ readonly ModelBlobType: VariantType<{
622
+ /** StandardScaler model */
623
+ standard_scaler: StructType<{
624
+ /** ONNX model bytes */
625
+ onnx: BlobType;
626
+ /** Number of input features */
627
+ n_features: IntegerType;
628
+ }>;
629
+ /** MinMaxScaler model */
630
+ min_max_scaler: StructType<{
631
+ /** ONNX model bytes */
632
+ onnx: BlobType;
633
+ /** Number of input features */
634
+ n_features: IntegerType;
635
+ }>;
636
+ /** RegressorChain model */
637
+ regressor_chain: StructType<{
638
+ /** Cloudpickle serialized chain */
639
+ data: BlobType;
640
+ /** Number of input features */
641
+ n_features: IntegerType;
642
+ /** Number of target outputs */
643
+ n_targets: IntegerType;
644
+ /** Base estimator type name */
645
+ base_estimator_type: StringType;
646
+ }>;
647
+ }>;
648
+ /** Multi-target output type */
649
+ readonly MultiTargetType: ArrayType<ArrayType<FloatType>>;
650
+ /** RegressorChain base estimator config type */
651
+ readonly RegressorChainBaseConfigType: VariantType<{
652
+ /** XGBoost regressor */
653
+ xgboost: StructType<{
654
+ n_estimators: OptionType<IntegerType>;
655
+ max_depth: OptionType<IntegerType>;
656
+ learning_rate: OptionType<FloatType>;
657
+ min_child_weight: OptionType<IntegerType>;
658
+ subsample: OptionType<FloatType>;
659
+ colsample_bytree: OptionType<FloatType>;
660
+ reg_alpha: OptionType<FloatType>;
661
+ reg_lambda: OptionType<FloatType>;
662
+ random_state: OptionType<IntegerType>;
663
+ n_jobs: OptionType<IntegerType>;
664
+ }>;
665
+ /** LightGBM regressor */
666
+ lightgbm: StructType<{
667
+ n_estimators: OptionType<IntegerType>;
668
+ max_depth: OptionType<IntegerType>;
669
+ learning_rate: OptionType<FloatType>;
670
+ num_leaves: OptionType<IntegerType>;
671
+ min_child_samples: OptionType<IntegerType>;
672
+ subsample: OptionType<FloatType>;
673
+ colsample_bytree: OptionType<FloatType>;
674
+ reg_alpha: OptionType<FloatType>;
675
+ reg_lambda: OptionType<FloatType>;
676
+ random_state: OptionType<IntegerType>;
677
+ n_jobs: OptionType<IntegerType>;
678
+ }>;
679
+ /** NGBoost regressor */
680
+ ngboost: StructType<{
681
+ n_estimators: OptionType<IntegerType>;
682
+ learning_rate: OptionType<FloatType>;
683
+ minibatch_frac: OptionType<FloatType>;
684
+ col_sample: OptionType<FloatType>;
685
+ random_state: OptionType<IntegerType>;
686
+ distribution: OptionType<VariantType<{
687
+ normal: StructType<{}>;
688
+ lognormal: StructType<{}>;
689
+ }>>;
690
+ }>;
691
+ /** Gaussian Process regressor */
692
+ gp: StructType<{
693
+ kernel: OptionType<VariantType<{
694
+ rbf: StructType<{}>;
695
+ matern_1_2: StructType<{}>;
696
+ matern_3_2: StructType<{}>;
697
+ matern_5_2: StructType<{}>;
698
+ rational_quadratic: StructType<{}>;
699
+ dot_product: StructType<{}>;
700
+ }>>;
701
+ alpha: OptionType<FloatType>;
702
+ n_restarts_optimizer: OptionType<IntegerType>;
703
+ normalize_y: OptionType<BooleanType>;
704
+ random_state: OptionType<IntegerType>;
705
+ }>;
706
+ }>;
707
+ /** RegressorChain config type */
708
+ readonly RegressorChainConfigType: StructType<{
709
+ /** Base estimator with its configuration */
710
+ base_estimator: VariantType<{
711
+ /** XGBoost regressor */
712
+ xgboost: StructType<{
713
+ n_estimators: OptionType<IntegerType>;
714
+ max_depth: OptionType<IntegerType>;
715
+ learning_rate: OptionType<FloatType>;
716
+ min_child_weight: OptionType<IntegerType>;
717
+ subsample: OptionType<FloatType>;
718
+ colsample_bytree: OptionType<FloatType>;
719
+ reg_alpha: OptionType<FloatType>;
720
+ reg_lambda: OptionType<FloatType>;
721
+ random_state: OptionType<IntegerType>;
722
+ n_jobs: OptionType<IntegerType>;
723
+ }>;
724
+ /** LightGBM regressor */
725
+ lightgbm: StructType<{
726
+ n_estimators: OptionType<IntegerType>;
727
+ max_depth: OptionType<IntegerType>;
728
+ learning_rate: OptionType<FloatType>;
729
+ num_leaves: OptionType<IntegerType>;
730
+ min_child_samples: OptionType<IntegerType>;
731
+ subsample: OptionType<FloatType>;
732
+ colsample_bytree: OptionType<FloatType>;
733
+ reg_alpha: OptionType<FloatType>;
734
+ reg_lambda: OptionType<FloatType>;
735
+ random_state: OptionType<IntegerType>;
736
+ n_jobs: OptionType<IntegerType>;
737
+ }>;
738
+ /** NGBoost regressor */
739
+ ngboost: StructType<{
740
+ n_estimators: OptionType<IntegerType>;
741
+ learning_rate: OptionType<FloatType>;
742
+ minibatch_frac: OptionType<FloatType>;
743
+ col_sample: OptionType<FloatType>;
744
+ random_state: OptionType<IntegerType>;
745
+ distribution: OptionType<VariantType<{
746
+ normal: StructType<{}>;
747
+ lognormal: StructType<{}>;
748
+ }>>;
749
+ }>;
750
+ /** Gaussian Process regressor */
751
+ gp: StructType<{
752
+ kernel: OptionType<VariantType<{
753
+ rbf: StructType<{}>;
754
+ matern_1_2: StructType<{}>;
755
+ matern_3_2: StructType<{}>;
756
+ matern_5_2: StructType<{}>;
757
+ rational_quadratic: StructType<{}>;
758
+ dot_product: StructType<{}>;
759
+ }>>;
760
+ alpha: OptionType<FloatType>;
761
+ n_restarts_optimizer: OptionType<IntegerType>;
762
+ normalize_y: OptionType<BooleanType>;
763
+ random_state: OptionType<IntegerType>;
764
+ }>;
765
+ }>;
766
+ /** Chain order (indices of targets). None = natural order [0,1,2,...] */
767
+ order: OptionType<ArrayType<IntegerType>>;
768
+ /** Random seed for reproducibility */
769
+ random_state: OptionType<IntegerType>;
770
+ }>;
771
+ };
772
+ /**
773
+ * Scikit-learn machine learning utilities.
774
+ *
775
+ * Provides preprocessing, model selection, and metrics for ML workflows.
776
+ *
777
+ * @example
778
+ * ```ts
779
+ * import { East, variant } from "@elaraai/east";
780
+ * import { Sklearn } from "@elaraai/east-py-datascience";
781
+ *
782
+ * const pipeline = East.function([], Sklearn.Types.SplitResultType, $ => {
783
+ * const X = $.let([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0], [7.0, 8.0]]);
784
+ * const y = $.let([1.0, 2.0, 3.0, 4.0]);
785
+ * const config = $.let({
786
+ * test_size: variant('some', 0.25),
787
+ * random_state: variant('some', 42n),
788
+ * shuffle: variant('some', true),
789
+ * });
790
+ * return $.return(Sklearn.trainTestSplit(X, y, config));
791
+ * });
792
+ * ```
793
+ */
794
+ export declare const Sklearn: {
795
+ /** Split arrays into train and test subsets */
796
+ readonly trainTestSplit: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
797
+ /** Proportion of data to include in test split (default 0.2) */
798
+ test_size: OptionType<FloatType>;
799
+ /** Random seed for reproducibility */
800
+ random_state: OptionType<IntegerType>;
801
+ /** Whether to shuffle data before splitting (default true) */
802
+ shuffle: OptionType<BooleanType>;
803
+ }>], StructType<{
804
+ /** Training features */
805
+ X_train: ArrayType<ArrayType<FloatType>>;
806
+ /** Test features */
807
+ X_test: ArrayType<ArrayType<FloatType>>;
808
+ /** Training labels */
809
+ y_train: ArrayType<FloatType>;
810
+ /** Test labels */
811
+ y_test: ArrayType<FloatType>;
812
+ }>>;
813
+ /** Fit a StandardScaler to data */
814
+ readonly standardScalerFit: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>], VariantType<{
815
+ /** StandardScaler model */
816
+ standard_scaler: StructType<{
817
+ /** ONNX model bytes */
818
+ onnx: BlobType;
819
+ /** Number of input features */
820
+ n_features: IntegerType;
821
+ }>;
822
+ /** MinMaxScaler model */
823
+ min_max_scaler: StructType<{
824
+ /** ONNX model bytes */
825
+ onnx: BlobType;
826
+ /** Number of input features */
827
+ n_features: IntegerType;
828
+ }>;
829
+ /** RegressorChain model */
830
+ regressor_chain: StructType<{
831
+ /** Cloudpickle serialized chain */
832
+ data: BlobType;
833
+ /** Number of input features */
834
+ n_features: IntegerType;
835
+ /** Number of target outputs */
836
+ n_targets: IntegerType;
837
+ /** Base estimator type name */
838
+ base_estimator_type: StringType;
839
+ }>;
840
+ }>>;
841
+ /** Transform data using fitted StandardScaler */
842
+ readonly standardScalerTransform: import("@elaraai/east").PlatformDefinition<[VariantType<{
843
+ /** StandardScaler model */
844
+ standard_scaler: StructType<{
845
+ /** ONNX model bytes */
846
+ onnx: BlobType;
847
+ /** Number of input features */
848
+ n_features: IntegerType;
849
+ }>;
850
+ /** MinMaxScaler model */
851
+ min_max_scaler: StructType<{
852
+ /** ONNX model bytes */
853
+ onnx: BlobType;
854
+ /** Number of input features */
855
+ n_features: IntegerType;
856
+ }>;
857
+ /** RegressorChain model */
858
+ regressor_chain: StructType<{
859
+ /** Cloudpickle serialized chain */
860
+ data: BlobType;
861
+ /** Number of input features */
862
+ n_features: IntegerType;
863
+ /** Number of target outputs */
864
+ n_targets: IntegerType;
865
+ /** Base estimator type name */
866
+ base_estimator_type: StringType;
867
+ }>;
868
+ }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
869
+ /** Fit a MinMaxScaler to data */
870
+ readonly minMaxScalerFit: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>], VariantType<{
871
+ /** StandardScaler model */
872
+ standard_scaler: StructType<{
873
+ /** ONNX model bytes */
874
+ onnx: BlobType;
875
+ /** Number of input features */
876
+ n_features: IntegerType;
877
+ }>;
878
+ /** MinMaxScaler model */
879
+ min_max_scaler: StructType<{
880
+ /** ONNX model bytes */
881
+ onnx: BlobType;
882
+ /** Number of input features */
883
+ n_features: IntegerType;
884
+ }>;
885
+ /** RegressorChain model */
886
+ regressor_chain: StructType<{
887
+ /** Cloudpickle serialized chain */
888
+ data: BlobType;
889
+ /** Number of input features */
890
+ n_features: IntegerType;
891
+ /** Number of target outputs */
892
+ n_targets: IntegerType;
893
+ /** Base estimator type name */
894
+ base_estimator_type: StringType;
895
+ }>;
896
+ }>>;
897
+ /** Transform data using fitted MinMaxScaler */
898
+ readonly minMaxScalerTransform: import("@elaraai/east").PlatformDefinition<[VariantType<{
899
+ /** StandardScaler model */
900
+ standard_scaler: StructType<{
901
+ /** ONNX model bytes */
902
+ onnx: BlobType;
903
+ /** Number of input features */
904
+ n_features: IntegerType;
905
+ }>;
906
+ /** MinMaxScaler model */
907
+ min_max_scaler: StructType<{
908
+ /** ONNX model bytes */
909
+ onnx: BlobType;
910
+ /** Number of input features */
911
+ n_features: IntegerType;
912
+ }>;
913
+ /** RegressorChain model */
914
+ regressor_chain: StructType<{
915
+ /** Cloudpickle serialized chain */
916
+ data: BlobType;
917
+ /** Number of input features */
918
+ n_features: IntegerType;
919
+ /** Number of target outputs */
920
+ n_targets: IntegerType;
921
+ /** Base estimator type name */
922
+ base_estimator_type: StringType;
923
+ }>;
924
+ }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
925
+ /** Compute regression metrics */
926
+ readonly metricsRegression: import("@elaraai/east").PlatformDefinition<[ArrayType<FloatType>, ArrayType<FloatType>], StructType<{
927
+ /** Mean Squared Error */
928
+ mse: FloatType;
929
+ /** Root Mean Squared Error */
930
+ rmse: FloatType;
931
+ /** Mean Absolute Error */
932
+ mae: FloatType;
933
+ /** R-squared (coefficient of determination) */
934
+ r2: FloatType;
935
+ /** Mean Absolute Percentage Error */
936
+ mape: FloatType;
937
+ }>>;
938
+ /** Compute classification metrics */
939
+ readonly metricsClassification: import("@elaraai/east").PlatformDefinition<[ArrayType<IntegerType>, ArrayType<IntegerType>], StructType<{
940
+ /** Accuracy score */
941
+ accuracy: FloatType;
942
+ /** Precision (weighted average) */
943
+ precision: FloatType;
944
+ /** Recall (weighted average) */
945
+ recall: FloatType;
946
+ /** F1 score (weighted average) */
947
+ f1: FloatType;
948
+ }>>;
949
+ /** Train a RegressorChain for multi-target regression */
950
+ readonly regressorChainTrain: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<ArrayType<FloatType>>, StructType<{
951
+ /** Base estimator with its configuration */
952
+ base_estimator: VariantType<{
953
+ /** XGBoost regressor */
954
+ xgboost: StructType<{
955
+ n_estimators: OptionType<IntegerType>;
956
+ max_depth: OptionType<IntegerType>;
957
+ learning_rate: OptionType<FloatType>;
958
+ min_child_weight: OptionType<IntegerType>;
959
+ subsample: OptionType<FloatType>;
960
+ colsample_bytree: OptionType<FloatType>;
961
+ reg_alpha: OptionType<FloatType>;
962
+ reg_lambda: OptionType<FloatType>;
963
+ random_state: OptionType<IntegerType>;
964
+ n_jobs: OptionType<IntegerType>;
965
+ }>;
966
+ /** LightGBM regressor */
967
+ lightgbm: StructType<{
968
+ n_estimators: OptionType<IntegerType>;
969
+ max_depth: OptionType<IntegerType>;
970
+ learning_rate: OptionType<FloatType>;
971
+ num_leaves: OptionType<IntegerType>;
972
+ min_child_samples: OptionType<IntegerType>;
973
+ subsample: OptionType<FloatType>;
974
+ colsample_bytree: OptionType<FloatType>;
975
+ reg_alpha: OptionType<FloatType>;
976
+ reg_lambda: OptionType<FloatType>;
977
+ random_state: OptionType<IntegerType>;
978
+ n_jobs: OptionType<IntegerType>;
979
+ }>;
980
+ /** NGBoost regressor */
981
+ ngboost: StructType<{
982
+ n_estimators: OptionType<IntegerType>;
983
+ learning_rate: OptionType<FloatType>;
984
+ minibatch_frac: OptionType<FloatType>;
985
+ col_sample: OptionType<FloatType>;
986
+ random_state: OptionType<IntegerType>;
987
+ distribution: OptionType<VariantType<{
988
+ normal: StructType<{}>;
989
+ lognormal: StructType<{}>;
990
+ }>>;
991
+ }>;
992
+ /** Gaussian Process regressor */
993
+ gp: StructType<{
994
+ kernel: OptionType<VariantType<{
995
+ rbf: StructType<{}>;
996
+ matern_1_2: StructType<{}>;
997
+ matern_3_2: StructType<{}>;
998
+ matern_5_2: StructType<{}>;
999
+ rational_quadratic: StructType<{}>;
1000
+ dot_product: StructType<{}>;
1001
+ }>>;
1002
+ alpha: OptionType<FloatType>;
1003
+ n_restarts_optimizer: OptionType<IntegerType>;
1004
+ normalize_y: OptionType<BooleanType>;
1005
+ random_state: OptionType<IntegerType>;
1006
+ }>;
1007
+ }>;
1008
+ /** Chain order (indices of targets). None = natural order [0,1,2,...] */
1009
+ order: OptionType<ArrayType<IntegerType>>;
1010
+ /** Random seed for reproducibility */
1011
+ random_state: OptionType<IntegerType>;
1012
+ }>], VariantType<{
1013
+ /** StandardScaler model */
1014
+ standard_scaler: StructType<{
1015
+ /** ONNX model bytes */
1016
+ onnx: BlobType;
1017
+ /** Number of input features */
1018
+ n_features: IntegerType;
1019
+ }>;
1020
+ /** MinMaxScaler model */
1021
+ min_max_scaler: StructType<{
1022
+ /** ONNX model bytes */
1023
+ onnx: BlobType;
1024
+ /** Number of input features */
1025
+ n_features: IntegerType;
1026
+ }>;
1027
+ /** RegressorChain model */
1028
+ regressor_chain: StructType<{
1029
+ /** Cloudpickle serialized chain */
1030
+ data: BlobType;
1031
+ /** Number of input features */
1032
+ n_features: IntegerType;
1033
+ /** Number of target outputs */
1034
+ n_targets: IntegerType;
1035
+ /** Base estimator type name */
1036
+ base_estimator_type: StringType;
1037
+ }>;
1038
+ }>>;
1039
+ /** Predict using a fitted RegressorChain */
1040
+ readonly regressorChainPredict: import("@elaraai/east").PlatformDefinition<[VariantType<{
1041
+ /** StandardScaler model */
1042
+ standard_scaler: StructType<{
1043
+ /** ONNX model bytes */
1044
+ onnx: BlobType;
1045
+ /** Number of input features */
1046
+ n_features: IntegerType;
1047
+ }>;
1048
+ /** MinMaxScaler model */
1049
+ min_max_scaler: StructType<{
1050
+ /** ONNX model bytes */
1051
+ onnx: BlobType;
1052
+ /** Number of input features */
1053
+ n_features: IntegerType;
1054
+ }>;
1055
+ /** RegressorChain model */
1056
+ regressor_chain: StructType<{
1057
+ /** Cloudpickle serialized chain */
1058
+ data: BlobType;
1059
+ /** Number of input features */
1060
+ n_features: IntegerType;
1061
+ /** Number of target outputs */
1062
+ n_targets: IntegerType;
1063
+ /** Base estimator type name */
1064
+ base_estimator_type: StringType;
1065
+ }>;
1066
+ }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
1067
+ /** Type definitions */
1068
+ readonly Types: {
1069
+ /** Vector type (array of floats) */
1070
+ readonly VectorType: ArrayType<FloatType>;
1071
+ /** Matrix type (2D array of floats) */
1072
+ readonly MatrixType: ArrayType<ArrayType<FloatType>>;
1073
+ /** Label vector type (array of integers) */
1074
+ readonly LabelVectorType: ArrayType<IntegerType>;
1075
+ /** Split configuration type */
1076
+ readonly SplitConfigType: StructType<{
1077
+ /** Proportion of data to include in test split (default 0.2) */
1078
+ test_size: OptionType<FloatType>;
1079
+ /** Random seed for reproducibility */
1080
+ random_state: OptionType<IntegerType>;
1081
+ /** Whether to shuffle data before splitting (default true) */
1082
+ shuffle: OptionType<BooleanType>;
1083
+ }>;
1084
+ /** Split result type */
1085
+ readonly SplitResultType: StructType<{
1086
+ /** Training features */
1087
+ X_train: ArrayType<ArrayType<FloatType>>;
1088
+ /** Test features */
1089
+ X_test: ArrayType<ArrayType<FloatType>>;
1090
+ /** Training labels */
1091
+ y_train: ArrayType<FloatType>;
1092
+ /** Test labels */
1093
+ y_test: ArrayType<FloatType>;
1094
+ }>;
1095
+ /** Regression metrics type */
1096
+ readonly RegressionMetricsType: StructType<{
1097
+ /** Mean Squared Error */
1098
+ mse: FloatType;
1099
+ /** Root Mean Squared Error */
1100
+ rmse: FloatType;
1101
+ /** Mean Absolute Error */
1102
+ mae: FloatType;
1103
+ /** R-squared (coefficient of determination) */
1104
+ r2: FloatType;
1105
+ /** Mean Absolute Percentage Error */
1106
+ mape: FloatType;
1107
+ }>;
1108
+ /** Classification metrics type */
1109
+ readonly ClassificationMetricsType: StructType<{
1110
+ /** Accuracy score */
1111
+ accuracy: FloatType;
1112
+ /** Precision (weighted average) */
1113
+ precision: FloatType;
1114
+ /** Recall (weighted average) */
1115
+ recall: FloatType;
1116
+ /** F1 score (weighted average) */
1117
+ f1: FloatType;
1118
+ }>;
1119
+ /** Model blob type for sklearn models */
1120
+ readonly ModelBlobType: VariantType<{
1121
+ /** StandardScaler model */
1122
+ standard_scaler: StructType<{
1123
+ /** ONNX model bytes */
1124
+ onnx: BlobType;
1125
+ /** Number of input features */
1126
+ n_features: IntegerType;
1127
+ }>;
1128
+ /** MinMaxScaler model */
1129
+ min_max_scaler: StructType<{
1130
+ /** ONNX model bytes */
1131
+ onnx: BlobType;
1132
+ /** Number of input features */
1133
+ n_features: IntegerType;
1134
+ }>;
1135
+ /** RegressorChain model */
1136
+ regressor_chain: StructType<{
1137
+ /** Cloudpickle serialized chain */
1138
+ data: BlobType;
1139
+ /** Number of input features */
1140
+ n_features: IntegerType;
1141
+ /** Number of target outputs */
1142
+ n_targets: IntegerType;
1143
+ /** Base estimator type name */
1144
+ base_estimator_type: StringType;
1145
+ }>;
1146
+ }>;
1147
+ /** Multi-target output type */
1148
+ readonly MultiTargetType: ArrayType<ArrayType<FloatType>>;
1149
+ /** RegressorChain base estimator config type */
1150
+ readonly RegressorChainBaseConfigType: VariantType<{
1151
+ /** XGBoost regressor */
1152
+ xgboost: StructType<{
1153
+ n_estimators: OptionType<IntegerType>;
1154
+ max_depth: OptionType<IntegerType>;
1155
+ learning_rate: OptionType<FloatType>;
1156
+ min_child_weight: OptionType<IntegerType>;
1157
+ subsample: OptionType<FloatType>;
1158
+ colsample_bytree: OptionType<FloatType>;
1159
+ reg_alpha: OptionType<FloatType>;
1160
+ reg_lambda: OptionType<FloatType>;
1161
+ random_state: OptionType<IntegerType>;
1162
+ n_jobs: OptionType<IntegerType>;
1163
+ }>;
1164
+ /** LightGBM regressor */
1165
+ lightgbm: StructType<{
1166
+ n_estimators: OptionType<IntegerType>;
1167
+ max_depth: OptionType<IntegerType>;
1168
+ learning_rate: OptionType<FloatType>;
1169
+ num_leaves: OptionType<IntegerType>;
1170
+ min_child_samples: OptionType<IntegerType>;
1171
+ subsample: OptionType<FloatType>;
1172
+ colsample_bytree: OptionType<FloatType>;
1173
+ reg_alpha: OptionType<FloatType>;
1174
+ reg_lambda: OptionType<FloatType>;
1175
+ random_state: OptionType<IntegerType>;
1176
+ n_jobs: OptionType<IntegerType>;
1177
+ }>;
1178
+ /** NGBoost regressor */
1179
+ ngboost: StructType<{
1180
+ n_estimators: OptionType<IntegerType>;
1181
+ learning_rate: OptionType<FloatType>;
1182
+ minibatch_frac: OptionType<FloatType>;
1183
+ col_sample: OptionType<FloatType>;
1184
+ random_state: OptionType<IntegerType>;
1185
+ distribution: OptionType<VariantType<{
1186
+ normal: StructType<{}>;
1187
+ lognormal: StructType<{}>;
1188
+ }>>;
1189
+ }>;
1190
+ /** Gaussian Process regressor */
1191
+ gp: StructType<{
1192
+ kernel: OptionType<VariantType<{
1193
+ rbf: StructType<{}>;
1194
+ matern_1_2: StructType<{}>;
1195
+ matern_3_2: StructType<{}>;
1196
+ matern_5_2: StructType<{}>;
1197
+ rational_quadratic: StructType<{}>;
1198
+ dot_product: StructType<{}>;
1199
+ }>>;
1200
+ alpha: OptionType<FloatType>;
1201
+ n_restarts_optimizer: OptionType<IntegerType>;
1202
+ normalize_y: OptionType<BooleanType>;
1203
+ random_state: OptionType<IntegerType>;
1204
+ }>;
1205
+ }>;
1206
+ /** RegressorChain config type */
1207
+ readonly RegressorChainConfigType: StructType<{
1208
+ /** Base estimator with its configuration */
1209
+ base_estimator: VariantType<{
1210
+ /** XGBoost regressor */
1211
+ xgboost: StructType<{
1212
+ n_estimators: OptionType<IntegerType>;
1213
+ max_depth: OptionType<IntegerType>;
1214
+ learning_rate: OptionType<FloatType>;
1215
+ min_child_weight: OptionType<IntegerType>;
1216
+ subsample: OptionType<FloatType>;
1217
+ colsample_bytree: OptionType<FloatType>;
1218
+ reg_alpha: OptionType<FloatType>;
1219
+ reg_lambda: OptionType<FloatType>;
1220
+ random_state: OptionType<IntegerType>;
1221
+ n_jobs: OptionType<IntegerType>;
1222
+ }>;
1223
+ /** LightGBM regressor */
1224
+ lightgbm: StructType<{
1225
+ n_estimators: OptionType<IntegerType>;
1226
+ max_depth: OptionType<IntegerType>;
1227
+ learning_rate: OptionType<FloatType>;
1228
+ num_leaves: OptionType<IntegerType>;
1229
+ min_child_samples: OptionType<IntegerType>;
1230
+ subsample: OptionType<FloatType>;
1231
+ colsample_bytree: OptionType<FloatType>;
1232
+ reg_alpha: OptionType<FloatType>;
1233
+ reg_lambda: OptionType<FloatType>;
1234
+ random_state: OptionType<IntegerType>;
1235
+ n_jobs: OptionType<IntegerType>;
1236
+ }>;
1237
+ /** NGBoost regressor */
1238
+ ngboost: StructType<{
1239
+ n_estimators: OptionType<IntegerType>;
1240
+ learning_rate: OptionType<FloatType>;
1241
+ minibatch_frac: OptionType<FloatType>;
1242
+ col_sample: OptionType<FloatType>;
1243
+ random_state: OptionType<IntegerType>;
1244
+ distribution: OptionType<VariantType<{
1245
+ normal: StructType<{}>;
1246
+ lognormal: StructType<{}>;
1247
+ }>>;
1248
+ }>;
1249
+ /** Gaussian Process regressor */
1250
+ gp: StructType<{
1251
+ kernel: OptionType<VariantType<{
1252
+ rbf: StructType<{}>;
1253
+ matern_1_2: StructType<{}>;
1254
+ matern_3_2: StructType<{}>;
1255
+ matern_5_2: StructType<{}>;
1256
+ rational_quadratic: StructType<{}>;
1257
+ dot_product: StructType<{}>;
1258
+ }>>;
1259
+ alpha: OptionType<FloatType>;
1260
+ n_restarts_optimizer: OptionType<IntegerType>;
1261
+ normalize_y: OptionType<BooleanType>;
1262
+ random_state: OptionType<IntegerType>;
1263
+ }>;
1264
+ }>;
1265
+ /** Chain order (indices of targets). None = natural order [0,1,2,...] */
1266
+ order: OptionType<ArrayType<IntegerType>>;
1267
+ /** Random seed for reproducibility */
1268
+ random_state: OptionType<IntegerType>;
1269
+ }>;
1270
+ };
1271
+ };
1272
+ //# sourceMappingURL=sklearn.d.ts.map