@elaraai/east-py-datascience 0.0.2-beta.6 → 0.0.2-beta.61

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 (53) hide show
  1. package/dist/alns/alns.d.ts +528 -0
  2. package/dist/alns/alns.d.ts.map +1 -0
  3. package/dist/alns/alns.js +238 -0
  4. package/dist/alns/alns.js.map +1 -0
  5. package/dist/gp/gp.d.ts +120 -120
  6. package/dist/gp/gp.d.ts.map +1 -1
  7. package/dist/gp/gp.js +7 -7
  8. package/dist/gp/gp.js.map +1 -1
  9. package/dist/index.d.ts +5 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +8 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/lightgbm/lightgbm.d.ts +168 -168
  14. package/dist/lightning/lightning.d.ts +1501 -0
  15. package/dist/lightning/lightning.d.ts.map +1 -0
  16. package/dist/lightning/lightning.js +376 -0
  17. package/dist/lightning/lightning.js.map +1 -0
  18. package/dist/mads/mads.d.ts +103 -103
  19. package/dist/mads/mads.d.ts.map +1 -1
  20. package/dist/mads/mads.js +5 -5
  21. package/dist/mads/mads.js.map +1 -1
  22. package/dist/mapie/mapie.d.ts +2058 -0
  23. package/dist/mapie/mapie.d.ts.map +1 -0
  24. package/dist/mapie/mapie.js +411 -0
  25. package/dist/mapie/mapie.js.map +1 -0
  26. package/dist/ngboost/ngboost.d.ts +126 -126
  27. package/dist/ngboost/ngboost.d.ts.map +1 -1
  28. package/dist/ngboost/ngboost.js +3 -3
  29. package/dist/ngboost/ngboost.js.map +1 -1
  30. package/dist/optuna/optuna.d.ts +314 -314
  31. package/dist/scipy/scipy.d.ts +535 -429
  32. package/dist/scipy/scipy.d.ts.map +1 -1
  33. package/dist/scipy/scipy.js +56 -3
  34. package/dist/scipy/scipy.js.map +1 -1
  35. package/dist/shap/shap.d.ts +1152 -358
  36. package/dist/shap/shap.d.ts.map +1 -1
  37. package/dist/shap/shap.js +189 -16
  38. package/dist/shap/shap.js.map +1 -1
  39. package/dist/simanneal/simanneal.d.ts +148 -148
  40. package/dist/sklearn/sklearn.d.ts +3104 -1316
  41. package/dist/sklearn/sklearn.d.ts.map +1 -1
  42. package/dist/sklearn/sklearn.js +325 -64
  43. package/dist/sklearn/sklearn.js.map +1 -1
  44. package/dist/torch/torch.d.ts +503 -350
  45. package/dist/torch/torch.d.ts.map +1 -1
  46. package/dist/torch/torch.js +39 -17
  47. package/dist/torch/torch.js.map +1 -1
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/dist/xgboost/xgboost.d.ts +803 -178
  50. package/dist/xgboost/xgboost.d.ts.map +1 -1
  51. package/dist/xgboost/xgboost.js +102 -1
  52. package/dist/xgboost/xgboost.js.map +1 -1
  53. package/package.json +4 -4
@@ -0,0 +1,2058 @@
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
+ * MAPIE conformal prediction intervals for East.
7
+ *
8
+ * Provides prediction intervals with coverage guarantees using
9
+ * conformal prediction methods (MAPIE 1.2.0 API).
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ import { StructType, VariantType, OptionType, ArrayType, IntegerType, FloatType, BlobType, NullType } 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
+ /**
18
+ * Conformal prediction method for regression.
19
+ */
20
+ export declare const ConformalMethodType: VariantType<{
21
+ /** Split conformal - requires separate calibration set */
22
+ readonly split: NullType;
23
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
24
+ readonly cross: NullType;
25
+ }>;
26
+ /**
27
+ * Base model type for MAPIE regression.
28
+ * Uses full XGBoost/LightGBM config types for complete parameter support.
29
+ */
30
+ export declare const BaseModelType: VariantType<{
31
+ /** XGBoost regressor as base model */
32
+ readonly xgboost: StructType<{
33
+ readonly n_estimators: OptionType<IntegerType>;
34
+ readonly max_depth: OptionType<IntegerType>;
35
+ readonly learning_rate: OptionType<FloatType>;
36
+ readonly min_child_weight: OptionType<IntegerType>;
37
+ readonly subsample: OptionType<FloatType>;
38
+ readonly colsample_bytree: OptionType<FloatType>;
39
+ readonly reg_alpha: OptionType<FloatType>;
40
+ readonly reg_lambda: OptionType<FloatType>;
41
+ readonly gamma: OptionType<FloatType>;
42
+ readonly random_state: OptionType<IntegerType>;
43
+ readonly n_jobs: OptionType<IntegerType>;
44
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
45
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
46
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
47
+ readonly max_cat_threshold: OptionType<IntegerType>;
48
+ }>;
49
+ /** LightGBM regressor as base model */
50
+ readonly lightgbm: StructType<{
51
+ readonly n_estimators: OptionType<IntegerType>;
52
+ readonly max_depth: OptionType<IntegerType>;
53
+ readonly learning_rate: OptionType<FloatType>;
54
+ readonly num_leaves: OptionType<IntegerType>;
55
+ readonly min_child_samples: OptionType<IntegerType>;
56
+ readonly subsample: OptionType<FloatType>;
57
+ readonly colsample_bytree: OptionType<FloatType>;
58
+ readonly reg_alpha: OptionType<FloatType>;
59
+ readonly reg_lambda: OptionType<FloatType>;
60
+ readonly random_state: OptionType<IntegerType>;
61
+ readonly n_jobs: OptionType<IntegerType>;
62
+ }>;
63
+ }>;
64
+ /**
65
+ * Configuration for MAPIE conformal prediction.
66
+ */
67
+ export declare const MAPIEConfigType: StructType<{
68
+ /** Base model configuration */
69
+ readonly base_model: VariantType<{
70
+ /** XGBoost regressor as base model */
71
+ readonly xgboost: StructType<{
72
+ readonly n_estimators: OptionType<IntegerType>;
73
+ readonly max_depth: OptionType<IntegerType>;
74
+ readonly learning_rate: OptionType<FloatType>;
75
+ readonly min_child_weight: OptionType<IntegerType>;
76
+ readonly subsample: OptionType<FloatType>;
77
+ readonly colsample_bytree: OptionType<FloatType>;
78
+ readonly reg_alpha: OptionType<FloatType>;
79
+ readonly reg_lambda: OptionType<FloatType>;
80
+ readonly gamma: OptionType<FloatType>;
81
+ readonly random_state: OptionType<IntegerType>;
82
+ readonly n_jobs: OptionType<IntegerType>;
83
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
84
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
85
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
86
+ readonly max_cat_threshold: OptionType<IntegerType>;
87
+ }>;
88
+ /** LightGBM regressor as base model */
89
+ readonly lightgbm: StructType<{
90
+ readonly n_estimators: OptionType<IntegerType>;
91
+ readonly max_depth: OptionType<IntegerType>;
92
+ readonly learning_rate: OptionType<FloatType>;
93
+ readonly num_leaves: OptionType<IntegerType>;
94
+ readonly min_child_samples: OptionType<IntegerType>;
95
+ readonly subsample: OptionType<FloatType>;
96
+ readonly colsample_bytree: OptionType<FloatType>;
97
+ readonly reg_alpha: OptionType<FloatType>;
98
+ readonly reg_lambda: OptionType<FloatType>;
99
+ readonly random_state: OptionType<IntegerType>;
100
+ readonly n_jobs: OptionType<IntegerType>;
101
+ }>;
102
+ }>;
103
+ /** Conformal method (default: split) */
104
+ readonly method: OptionType<VariantType<{
105
+ /** Split conformal - requires separate calibration set */
106
+ readonly split: NullType;
107
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
108
+ readonly cross: NullType;
109
+ }>>;
110
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
111
+ readonly confidence_level: OptionType<FloatType>;
112
+ /** Number of CV folds for cross method (default 5) */
113
+ readonly cv_folds: OptionType<IntegerType>;
114
+ /** Random seed for reproducibility */
115
+ readonly random_state: OptionType<IntegerType>;
116
+ /** Conformity score consistency check tolerance (default 1e-04) */
117
+ readonly conformity_eps: OptionType<FloatType>;
118
+ }>;
119
+ /**
120
+ * Configuration for CQR (Conformalized Quantile Regression).
121
+ * Requires a base model that supports quantile regression (XGBoost).
122
+ */
123
+ export declare const MAPIECQRConfigType: StructType<{
124
+ /** XGBoost config for the base quantile model */
125
+ readonly xgboost_config: StructType<{
126
+ readonly n_estimators: OptionType<IntegerType>;
127
+ readonly max_depth: OptionType<IntegerType>;
128
+ readonly learning_rate: OptionType<FloatType>;
129
+ readonly min_child_weight: OptionType<IntegerType>;
130
+ readonly subsample: OptionType<FloatType>;
131
+ readonly colsample_bytree: OptionType<FloatType>;
132
+ readonly reg_alpha: OptionType<FloatType>;
133
+ readonly reg_lambda: OptionType<FloatType>;
134
+ readonly gamma: OptionType<FloatType>;
135
+ readonly random_state: OptionType<IntegerType>;
136
+ readonly n_jobs: OptionType<IntegerType>;
137
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
138
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
139
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
140
+ readonly max_cat_threshold: OptionType<IntegerType>;
141
+ }>;
142
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
143
+ readonly confidence_level: OptionType<FloatType>;
144
+ /** Random seed for reproducibility */
145
+ readonly random_state: OptionType<IntegerType>;
146
+ }>;
147
+ /**
148
+ * Classification conformal method (conformity score).
149
+ */
150
+ export declare const ClassificationMethodType: VariantType<{
151
+ /** Least Ambiguous set-valued Classifier - smallest sets */
152
+ readonly lac: NullType;
153
+ /** Adaptive Prediction Sets - adapts to probabilities */
154
+ readonly aps: NullType;
155
+ }>;
156
+ /**
157
+ * Base classifier type for MAPIE classification.
158
+ * Uses full XGBoost/LightGBM config types for complete parameter support.
159
+ */
160
+ export declare const BaseClassifierType: VariantType<{
161
+ /** XGBoost classifier as base model */
162
+ readonly xgboost: StructType<{
163
+ readonly n_estimators: OptionType<IntegerType>;
164
+ readonly max_depth: OptionType<IntegerType>;
165
+ readonly learning_rate: OptionType<FloatType>;
166
+ readonly min_child_weight: OptionType<IntegerType>;
167
+ readonly subsample: OptionType<FloatType>;
168
+ readonly colsample_bytree: OptionType<FloatType>;
169
+ readonly reg_alpha: OptionType<FloatType>;
170
+ readonly reg_lambda: OptionType<FloatType>;
171
+ readonly gamma: OptionType<FloatType>;
172
+ readonly random_state: OptionType<IntegerType>;
173
+ readonly n_jobs: OptionType<IntegerType>;
174
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
175
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
176
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
177
+ readonly max_cat_threshold: OptionType<IntegerType>;
178
+ }>;
179
+ /** LightGBM classifier as base model */
180
+ readonly lightgbm: StructType<{
181
+ readonly n_estimators: OptionType<IntegerType>;
182
+ readonly max_depth: OptionType<IntegerType>;
183
+ readonly learning_rate: OptionType<FloatType>;
184
+ readonly num_leaves: OptionType<IntegerType>;
185
+ readonly min_child_samples: OptionType<IntegerType>;
186
+ readonly subsample: OptionType<FloatType>;
187
+ readonly colsample_bytree: OptionType<FloatType>;
188
+ readonly reg_alpha: OptionType<FloatType>;
189
+ readonly reg_lambda: OptionType<FloatType>;
190
+ readonly random_state: OptionType<IntegerType>;
191
+ readonly n_jobs: OptionType<IntegerType>;
192
+ }>;
193
+ }>;
194
+ /**
195
+ * Configuration for MAPIE conformal classification.
196
+ */
197
+ export declare const MAPIEClassifierConfigType: StructType<{
198
+ /** Base classifier configuration */
199
+ readonly base_model: VariantType<{
200
+ /** XGBoost classifier as base model */
201
+ readonly xgboost: StructType<{
202
+ readonly n_estimators: OptionType<IntegerType>;
203
+ readonly max_depth: OptionType<IntegerType>;
204
+ readonly learning_rate: OptionType<FloatType>;
205
+ readonly min_child_weight: OptionType<IntegerType>;
206
+ readonly subsample: OptionType<FloatType>;
207
+ readonly colsample_bytree: OptionType<FloatType>;
208
+ readonly reg_alpha: OptionType<FloatType>;
209
+ readonly reg_lambda: OptionType<FloatType>;
210
+ readonly gamma: OptionType<FloatType>;
211
+ readonly random_state: OptionType<IntegerType>;
212
+ readonly n_jobs: OptionType<IntegerType>;
213
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
214
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
215
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
216
+ readonly max_cat_threshold: OptionType<IntegerType>;
217
+ }>;
218
+ /** LightGBM classifier as base model */
219
+ readonly lightgbm: StructType<{
220
+ readonly n_estimators: OptionType<IntegerType>;
221
+ readonly max_depth: OptionType<IntegerType>;
222
+ readonly learning_rate: OptionType<FloatType>;
223
+ readonly num_leaves: OptionType<IntegerType>;
224
+ readonly min_child_samples: OptionType<IntegerType>;
225
+ readonly subsample: OptionType<FloatType>;
226
+ readonly colsample_bytree: OptionType<FloatType>;
227
+ readonly reg_alpha: OptionType<FloatType>;
228
+ readonly reg_lambda: OptionType<FloatType>;
229
+ readonly random_state: OptionType<IntegerType>;
230
+ readonly n_jobs: OptionType<IntegerType>;
231
+ }>;
232
+ }>;
233
+ /** Classification conformity score method (default: lac) */
234
+ readonly method: OptionType<VariantType<{
235
+ /** Least Ambiguous set-valued Classifier - smallest sets */
236
+ readonly lac: NullType;
237
+ /** Adaptive Prediction Sets - adapts to probabilities */
238
+ readonly aps: NullType;
239
+ }>>;
240
+ /** Confidence level: coverage probability (default 0.9 = 90% coverage) */
241
+ readonly confidence_level: OptionType<FloatType>;
242
+ /** Random seed for reproducibility */
243
+ readonly random_state: OptionType<IntegerType>;
244
+ }>;
245
+ /**
246
+ * Tagged model data - variant tag indicates base model type, value is the serialized blob.
247
+ * This pattern encodes the model type in the variant tag rather than a separate field.
248
+ */
249
+ export declare const MAPIEBaseModelDataType: VariantType<{
250
+ /** XGBoost-based model (cloudpickle serialized) */
251
+ readonly xgboost: BlobType;
252
+ /** LightGBM-based model (cloudpickle serialized) */
253
+ readonly lightgbm: BlobType;
254
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
255
+ readonly histogram: BlobType;
256
+ }>;
257
+ /**
258
+ * Model blob for MAPIE conformal regressor.
259
+ */
260
+ export declare const MAPIERegressorBlobType: VariantType<{
261
+ /** MAPIE regressor with split conformal */
262
+ readonly mapie_split: StructType<{
263
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
264
+ readonly data: VariantType<{
265
+ /** XGBoost-based model (cloudpickle serialized) */
266
+ readonly xgboost: BlobType;
267
+ /** LightGBM-based model (cloudpickle serialized) */
268
+ readonly lightgbm: BlobType;
269
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
270
+ readonly histogram: BlobType;
271
+ }>;
272
+ /** Number of input features */
273
+ readonly n_features: IntegerType;
274
+ /** Confidence level used during calibration */
275
+ readonly confidence_level: FloatType;
276
+ }>;
277
+ /** MAPIE regressor with cross conformal */
278
+ readonly mapie_cross: StructType<{
279
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
280
+ readonly data: VariantType<{
281
+ /** XGBoost-based model (cloudpickle serialized) */
282
+ readonly xgboost: BlobType;
283
+ /** LightGBM-based model (cloudpickle serialized) */
284
+ readonly lightgbm: BlobType;
285
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
286
+ readonly histogram: BlobType;
287
+ }>;
288
+ /** Number of input features */
289
+ readonly n_features: IntegerType;
290
+ /** Confidence level used during calibration */
291
+ readonly confidence_level: FloatType;
292
+ }>;
293
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
294
+ readonly mapie_cqr: StructType<{
295
+ /** Serialized model - variant tag indicates base model type */
296
+ readonly data: VariantType<{
297
+ /** XGBoost-based model (cloudpickle serialized) */
298
+ readonly xgboost: BlobType;
299
+ /** LightGBM-based model (cloudpickle serialized) */
300
+ readonly lightgbm: BlobType;
301
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
302
+ readonly histogram: BlobType;
303
+ }>;
304
+ /** Number of input features */
305
+ readonly n_features: IntegerType;
306
+ /** Confidence level used during calibration */
307
+ readonly confidence_level: FloatType;
308
+ }>;
309
+ }>;
310
+ /**
311
+ * Model blob for MAPIE conformal classifier.
312
+ * Uses single-case variant for consistency with MAPIERegressorBlobType and AnyModelBlobType.
313
+ */
314
+ export declare const MAPIEClassifierBlobType: VariantType<{
315
+ /** MAPIE classifier with split conformal */
316
+ readonly mapie_classifier: StructType<{
317
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
318
+ readonly data: VariantType<{
319
+ /** XGBoost-based model (cloudpickle serialized) */
320
+ readonly xgboost: BlobType;
321
+ /** LightGBM-based model (cloudpickle serialized) */
322
+ readonly lightgbm: BlobType;
323
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
324
+ readonly histogram: BlobType;
325
+ }>;
326
+ /** Number of input features */
327
+ readonly n_features: IntegerType;
328
+ /** Number of classes */
329
+ readonly n_classes: IntegerType;
330
+ /** Class labels */
331
+ readonly classes: ArrayType<IntegerType>;
332
+ /** Confidence level used during calibration */
333
+ readonly confidence_level: FloatType;
334
+ }>;
335
+ }>;
336
+ /**
337
+ * Uncertainty predictor blob type.
338
+ * Wraps MAPIE model to predict uncertainty measure (interval width or set size).
339
+ * Compatible with SHAP's KernelExplainer for explaining uncertainty.
340
+ */
341
+ export declare const UncertaintyPredictorType: VariantType<{
342
+ /** Predicts interval width (upper - lower) from MAPIE regressor */
343
+ readonly mapie_interval_width: StructType<{
344
+ readonly data: BlobType;
345
+ readonly n_features: IntegerType;
346
+ }>;
347
+ /** Predicts prediction set size from MAPIE classifier */
348
+ readonly mapie_set_size: StructType<{
349
+ readonly data: BlobType;
350
+ readonly n_features: IntegerType;
351
+ }>;
352
+ }>;
353
+ /**
354
+ * Prediction interval result (regression).
355
+ */
356
+ export declare const IntervalResultType: StructType<{
357
+ /** Lower bound of prediction interval */
358
+ readonly lower: ArrayType<FloatType>;
359
+ /** Point prediction (median/mean) */
360
+ readonly pred: ArrayType<FloatType>;
361
+ /** Upper bound of prediction interval */
362
+ readonly upper: ArrayType<FloatType>;
363
+ }>;
364
+ /**
365
+ * Prediction set result (classification).
366
+ * For each sample, contains the set of classes included in the prediction set.
367
+ */
368
+ export declare const PredictionSetResultType: StructType<{
369
+ /** Predicted class (argmax of probabilities) */
370
+ readonly pred: ArrayType<IntegerType>;
371
+ /** Prediction set membership matrix (n_samples x n_classes, 1 if class in set) */
372
+ readonly sets: ArrayType<ArrayType<IntegerType>>;
373
+ /** Class probabilities (n_samples x n_classes) */
374
+ readonly probabilities: ArrayType<ArrayType<FloatType>>;
375
+ /** Size of each prediction set */
376
+ readonly set_sizes: ArrayType<IntegerType>;
377
+ }>;
378
+ /**
379
+ * Train a MAPIE conformal regressor.
380
+ *
381
+ * For split conformal, uses X_calib/y_calib for calibration.
382
+ * For cross conformal, combines train and calib data, uses CV for calibration.
383
+ *
384
+ * @param X_train - Training feature matrix
385
+ * @param y_train - Training target vector
386
+ * @param X_calib - Calibration feature matrix
387
+ * @param y_calib - Calibration target vector
388
+ * @param config - MAPIE configuration
389
+ * @returns Model blob containing calibrated MAPIE regressor
390
+ */
391
+ export declare const mapie_train_conformal_regressor: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
392
+ /** Base model configuration */
393
+ readonly base_model: VariantType<{
394
+ /** XGBoost regressor as base model */
395
+ readonly xgboost: StructType<{
396
+ readonly n_estimators: OptionType<IntegerType>;
397
+ readonly max_depth: OptionType<IntegerType>;
398
+ readonly learning_rate: OptionType<FloatType>;
399
+ readonly min_child_weight: OptionType<IntegerType>;
400
+ readonly subsample: OptionType<FloatType>;
401
+ readonly colsample_bytree: OptionType<FloatType>;
402
+ readonly reg_alpha: OptionType<FloatType>;
403
+ readonly reg_lambda: OptionType<FloatType>;
404
+ readonly gamma: OptionType<FloatType>;
405
+ readonly random_state: OptionType<IntegerType>;
406
+ readonly n_jobs: OptionType<IntegerType>;
407
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
408
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
409
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
410
+ readonly max_cat_threshold: OptionType<IntegerType>;
411
+ }>;
412
+ /** LightGBM regressor as base model */
413
+ readonly lightgbm: StructType<{
414
+ readonly n_estimators: OptionType<IntegerType>;
415
+ readonly max_depth: OptionType<IntegerType>;
416
+ readonly learning_rate: OptionType<FloatType>;
417
+ readonly num_leaves: OptionType<IntegerType>;
418
+ readonly min_child_samples: OptionType<IntegerType>;
419
+ readonly subsample: OptionType<FloatType>;
420
+ readonly colsample_bytree: OptionType<FloatType>;
421
+ readonly reg_alpha: OptionType<FloatType>;
422
+ readonly reg_lambda: OptionType<FloatType>;
423
+ readonly random_state: OptionType<IntegerType>;
424
+ readonly n_jobs: OptionType<IntegerType>;
425
+ }>;
426
+ }>;
427
+ /** Conformal method (default: split) */
428
+ readonly method: OptionType<VariantType<{
429
+ /** Split conformal - requires separate calibration set */
430
+ readonly split: NullType;
431
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
432
+ readonly cross: NullType;
433
+ }>>;
434
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
435
+ readonly confidence_level: OptionType<FloatType>;
436
+ /** Number of CV folds for cross method (default 5) */
437
+ readonly cv_folds: OptionType<IntegerType>;
438
+ /** Random seed for reproducibility */
439
+ readonly random_state: OptionType<IntegerType>;
440
+ /** Conformity score consistency check tolerance (default 1e-04) */
441
+ readonly conformity_eps: OptionType<FloatType>;
442
+ }>], VariantType<{
443
+ /** MAPIE regressor with split conformal */
444
+ readonly mapie_split: StructType<{
445
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
446
+ readonly data: VariantType<{
447
+ /** XGBoost-based model (cloudpickle serialized) */
448
+ readonly xgboost: BlobType;
449
+ /** LightGBM-based model (cloudpickle serialized) */
450
+ readonly lightgbm: BlobType;
451
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
452
+ readonly histogram: BlobType;
453
+ }>;
454
+ /** Number of input features */
455
+ readonly n_features: IntegerType;
456
+ /** Confidence level used during calibration */
457
+ readonly confidence_level: FloatType;
458
+ }>;
459
+ /** MAPIE regressor with cross conformal */
460
+ readonly mapie_cross: StructType<{
461
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
462
+ readonly data: VariantType<{
463
+ /** XGBoost-based model (cloudpickle serialized) */
464
+ readonly xgboost: BlobType;
465
+ /** LightGBM-based model (cloudpickle serialized) */
466
+ readonly lightgbm: BlobType;
467
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
468
+ readonly histogram: BlobType;
469
+ }>;
470
+ /** Number of input features */
471
+ readonly n_features: IntegerType;
472
+ /** Confidence level used during calibration */
473
+ readonly confidence_level: FloatType;
474
+ }>;
475
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
476
+ readonly mapie_cqr: StructType<{
477
+ /** Serialized model - variant tag indicates base model type */
478
+ readonly data: VariantType<{
479
+ /** XGBoost-based model (cloudpickle serialized) */
480
+ readonly xgboost: BlobType;
481
+ /** LightGBM-based model (cloudpickle serialized) */
482
+ readonly lightgbm: BlobType;
483
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
484
+ readonly histogram: BlobType;
485
+ }>;
486
+ /** Number of input features */
487
+ readonly n_features: IntegerType;
488
+ /** Confidence level used during calibration */
489
+ readonly confidence_level: FloatType;
490
+ }>;
491
+ }>>;
492
+ /**
493
+ * Train a MAPIE CQR (Conformalized Quantile Regression) model.
494
+ *
495
+ * CQR combines quantile regression with conformal prediction for
496
+ * adaptive intervals that are wider where uncertainty is higher.
497
+ *
498
+ * @param X_train - Training feature matrix
499
+ * @param y_train - Training target vector
500
+ * @param X_calib - Calibration feature matrix
501
+ * @param y_calib - Calibration target vector
502
+ * @param config - CQR configuration
503
+ * @returns Model blob containing calibrated CQR model
504
+ */
505
+ export declare const mapie_train_cqr: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
506
+ /** XGBoost config for the base quantile model */
507
+ readonly xgboost_config: StructType<{
508
+ readonly n_estimators: OptionType<IntegerType>;
509
+ readonly max_depth: OptionType<IntegerType>;
510
+ readonly learning_rate: OptionType<FloatType>;
511
+ readonly min_child_weight: OptionType<IntegerType>;
512
+ readonly subsample: OptionType<FloatType>;
513
+ readonly colsample_bytree: OptionType<FloatType>;
514
+ readonly reg_alpha: OptionType<FloatType>;
515
+ readonly reg_lambda: OptionType<FloatType>;
516
+ readonly gamma: OptionType<FloatType>;
517
+ readonly random_state: OptionType<IntegerType>;
518
+ readonly n_jobs: OptionType<IntegerType>;
519
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
520
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
521
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
522
+ readonly max_cat_threshold: OptionType<IntegerType>;
523
+ }>;
524
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
525
+ readonly confidence_level: OptionType<FloatType>;
526
+ /** Random seed for reproducibility */
527
+ readonly random_state: OptionType<IntegerType>;
528
+ }>], VariantType<{
529
+ /** MAPIE regressor with split conformal */
530
+ readonly mapie_split: StructType<{
531
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
532
+ readonly data: VariantType<{
533
+ /** XGBoost-based model (cloudpickle serialized) */
534
+ readonly xgboost: BlobType;
535
+ /** LightGBM-based model (cloudpickle serialized) */
536
+ readonly lightgbm: BlobType;
537
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
538
+ readonly histogram: BlobType;
539
+ }>;
540
+ /** Number of input features */
541
+ readonly n_features: IntegerType;
542
+ /** Confidence level used during calibration */
543
+ readonly confidence_level: FloatType;
544
+ }>;
545
+ /** MAPIE regressor with cross conformal */
546
+ readonly mapie_cross: StructType<{
547
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
548
+ readonly data: VariantType<{
549
+ /** XGBoost-based model (cloudpickle serialized) */
550
+ readonly xgboost: BlobType;
551
+ /** LightGBM-based model (cloudpickle serialized) */
552
+ readonly lightgbm: BlobType;
553
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
554
+ readonly histogram: BlobType;
555
+ }>;
556
+ /** Number of input features */
557
+ readonly n_features: IntegerType;
558
+ /** Confidence level used during calibration */
559
+ readonly confidence_level: FloatType;
560
+ }>;
561
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
562
+ readonly mapie_cqr: StructType<{
563
+ /** Serialized model - variant tag indicates base model type */
564
+ readonly data: VariantType<{
565
+ /** XGBoost-based model (cloudpickle serialized) */
566
+ readonly xgboost: BlobType;
567
+ /** LightGBM-based model (cloudpickle serialized) */
568
+ readonly lightgbm: BlobType;
569
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
570
+ readonly histogram: BlobType;
571
+ }>;
572
+ /** Number of input features */
573
+ readonly n_features: IntegerType;
574
+ /** Confidence level used during calibration */
575
+ readonly confidence_level: FloatType;
576
+ }>;
577
+ }>>;
578
+ /**
579
+ * Predict with intervals using a MAPIE regressor.
580
+ *
581
+ * Returns intervals at the confidence level specified during training.
582
+ *
583
+ * @param model - Trained MAPIE regressor blob
584
+ * @param X - Feature matrix to predict
585
+ * @returns Prediction intervals (lower, pred, upper)
586
+ */
587
+ export declare const mapie_predict_interval: import("@elaraai/east").PlatformDefinition<[VariantType<{
588
+ /** MAPIE regressor with split conformal */
589
+ readonly mapie_split: StructType<{
590
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
591
+ readonly data: VariantType<{
592
+ /** XGBoost-based model (cloudpickle serialized) */
593
+ readonly xgboost: BlobType;
594
+ /** LightGBM-based model (cloudpickle serialized) */
595
+ readonly lightgbm: BlobType;
596
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
597
+ readonly histogram: BlobType;
598
+ }>;
599
+ /** Number of input features */
600
+ readonly n_features: IntegerType;
601
+ /** Confidence level used during calibration */
602
+ readonly confidence_level: FloatType;
603
+ }>;
604
+ /** MAPIE regressor with cross conformal */
605
+ readonly mapie_cross: StructType<{
606
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
607
+ readonly data: VariantType<{
608
+ /** XGBoost-based model (cloudpickle serialized) */
609
+ readonly xgboost: BlobType;
610
+ /** LightGBM-based model (cloudpickle serialized) */
611
+ readonly lightgbm: BlobType;
612
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
613
+ readonly histogram: BlobType;
614
+ }>;
615
+ /** Number of input features */
616
+ readonly n_features: IntegerType;
617
+ /** Confidence level used during calibration */
618
+ readonly confidence_level: FloatType;
619
+ }>;
620
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
621
+ readonly mapie_cqr: StructType<{
622
+ /** Serialized model - variant tag indicates base model type */
623
+ readonly data: VariantType<{
624
+ /** XGBoost-based model (cloudpickle serialized) */
625
+ readonly xgboost: BlobType;
626
+ /** LightGBM-based model (cloudpickle serialized) */
627
+ readonly lightgbm: BlobType;
628
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
629
+ readonly histogram: BlobType;
630
+ }>;
631
+ /** Number of input features */
632
+ readonly n_features: IntegerType;
633
+ /** Confidence level used during calibration */
634
+ readonly confidence_level: FloatType;
635
+ }>;
636
+ }>, ArrayType<ArrayType<FloatType>>], StructType<{
637
+ /** Lower bound of prediction interval */
638
+ readonly lower: ArrayType<FloatType>;
639
+ /** Point prediction (median/mean) */
640
+ readonly pred: ArrayType<FloatType>;
641
+ /** Upper bound of prediction interval */
642
+ readonly upper: ArrayType<FloatType>;
643
+ }>>;
644
+ /**
645
+ * Train a MAPIE conformal classifier.
646
+ *
647
+ * Uses split conformal prediction with calibration set for classification.
648
+ *
649
+ * @param X_train - Training feature matrix
650
+ * @param y_train - Training labels (integers)
651
+ * @param X_calib - Calibration feature matrix
652
+ * @param y_calib - Calibration labels
653
+ * @param config - Classifier configuration
654
+ * @returns Model blob containing calibrated MAPIE classifier
655
+ */
656
+ export declare const mapie_train_conformal_classifier: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<IntegerType>, ArrayType<ArrayType<FloatType>>, ArrayType<IntegerType>, StructType<{
657
+ /** Base classifier configuration */
658
+ readonly base_model: VariantType<{
659
+ /** XGBoost classifier as base model */
660
+ readonly xgboost: StructType<{
661
+ readonly n_estimators: OptionType<IntegerType>;
662
+ readonly max_depth: OptionType<IntegerType>;
663
+ readonly learning_rate: OptionType<FloatType>;
664
+ readonly min_child_weight: OptionType<IntegerType>;
665
+ readonly subsample: OptionType<FloatType>;
666
+ readonly colsample_bytree: OptionType<FloatType>;
667
+ readonly reg_alpha: OptionType<FloatType>;
668
+ readonly reg_lambda: OptionType<FloatType>;
669
+ readonly gamma: OptionType<FloatType>;
670
+ readonly random_state: OptionType<IntegerType>;
671
+ readonly n_jobs: OptionType<IntegerType>;
672
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
673
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
674
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
675
+ readonly max_cat_threshold: OptionType<IntegerType>;
676
+ }>;
677
+ /** LightGBM classifier as base model */
678
+ readonly lightgbm: StructType<{
679
+ readonly n_estimators: OptionType<IntegerType>;
680
+ readonly max_depth: OptionType<IntegerType>;
681
+ readonly learning_rate: OptionType<FloatType>;
682
+ readonly num_leaves: OptionType<IntegerType>;
683
+ readonly min_child_samples: OptionType<IntegerType>;
684
+ readonly subsample: OptionType<FloatType>;
685
+ readonly colsample_bytree: OptionType<FloatType>;
686
+ readonly reg_alpha: OptionType<FloatType>;
687
+ readonly reg_lambda: OptionType<FloatType>;
688
+ readonly random_state: OptionType<IntegerType>;
689
+ readonly n_jobs: OptionType<IntegerType>;
690
+ }>;
691
+ }>;
692
+ /** Classification conformity score method (default: lac) */
693
+ readonly method: OptionType<VariantType<{
694
+ /** Least Ambiguous set-valued Classifier - smallest sets */
695
+ readonly lac: NullType;
696
+ /** Adaptive Prediction Sets - adapts to probabilities */
697
+ readonly aps: NullType;
698
+ }>>;
699
+ /** Confidence level: coverage probability (default 0.9 = 90% coverage) */
700
+ readonly confidence_level: OptionType<FloatType>;
701
+ /** Random seed for reproducibility */
702
+ readonly random_state: OptionType<IntegerType>;
703
+ }>], VariantType<{
704
+ /** MAPIE classifier with split conformal */
705
+ readonly mapie_classifier: StructType<{
706
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
707
+ readonly data: VariantType<{
708
+ /** XGBoost-based model (cloudpickle serialized) */
709
+ readonly xgboost: BlobType;
710
+ /** LightGBM-based model (cloudpickle serialized) */
711
+ readonly lightgbm: BlobType;
712
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
713
+ readonly histogram: BlobType;
714
+ }>;
715
+ /** Number of input features */
716
+ readonly n_features: IntegerType;
717
+ /** Number of classes */
718
+ readonly n_classes: IntegerType;
719
+ /** Class labels */
720
+ readonly classes: ArrayType<IntegerType>;
721
+ /** Confidence level used during calibration */
722
+ readonly confidence_level: FloatType;
723
+ }>;
724
+ }>>;
725
+ /**
726
+ * Predict with prediction sets using a MAPIE classifier.
727
+ *
728
+ * Returns prediction sets at the confidence level specified during training.
729
+ *
730
+ * @param model - Trained MAPIE classifier blob
731
+ * @param X - Feature matrix to predict
732
+ * @returns Prediction sets (pred, sets, probabilities, set_sizes)
733
+ */
734
+ export declare const mapie_predict_set: import("@elaraai/east").PlatformDefinition<[VariantType<{
735
+ /** MAPIE classifier with split conformal */
736
+ readonly mapie_classifier: StructType<{
737
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
738
+ readonly data: VariantType<{
739
+ /** XGBoost-based model (cloudpickle serialized) */
740
+ readonly xgboost: BlobType;
741
+ /** LightGBM-based model (cloudpickle serialized) */
742
+ readonly lightgbm: BlobType;
743
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
744
+ readonly histogram: BlobType;
745
+ }>;
746
+ /** Number of input features */
747
+ readonly n_features: IntegerType;
748
+ /** Number of classes */
749
+ readonly n_classes: IntegerType;
750
+ /** Class labels */
751
+ readonly classes: ArrayType<IntegerType>;
752
+ /** Confidence level used during calibration */
753
+ readonly confidence_level: FloatType;
754
+ }>;
755
+ }>, ArrayType<ArrayType<FloatType>>], StructType<{
756
+ /** Predicted class (argmax of probabilities) */
757
+ readonly pred: ArrayType<IntegerType>;
758
+ /** Prediction set membership matrix (n_samples x n_classes, 1 if class in set) */
759
+ readonly sets: ArrayType<ArrayType<IntegerType>>;
760
+ /** Class probabilities (n_samples x n_classes) */
761
+ readonly probabilities: ArrayType<ArrayType<FloatType>>;
762
+ /** Size of each prediction set */
763
+ readonly set_sizes: ArrayType<IntegerType>;
764
+ }>>;
765
+ /**
766
+ * Create an uncertainty predictor from a MAPIE regressor.
767
+ *
768
+ * Returns a model that predicts interval width (upper - lower) instead of
769
+ * point predictions. Use with SHAP KernelExplainer to explain what drives
770
+ * prediction uncertainty.
771
+ *
772
+ * @param model - MAPIE regressor blob
773
+ * @returns Uncertainty predictor blob for use with SHAP KernelExplainer
774
+ */
775
+ export declare const mapie_uncertainty_predictor_regressor: import("@elaraai/east").PlatformDefinition<[VariantType<{
776
+ /** MAPIE regressor with split conformal */
777
+ readonly mapie_split: StructType<{
778
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
779
+ readonly data: VariantType<{
780
+ /** XGBoost-based model (cloudpickle serialized) */
781
+ readonly xgboost: BlobType;
782
+ /** LightGBM-based model (cloudpickle serialized) */
783
+ readonly lightgbm: BlobType;
784
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
785
+ readonly histogram: BlobType;
786
+ }>;
787
+ /** Number of input features */
788
+ readonly n_features: IntegerType;
789
+ /** Confidence level used during calibration */
790
+ readonly confidence_level: FloatType;
791
+ }>;
792
+ /** MAPIE regressor with cross conformal */
793
+ readonly mapie_cross: StructType<{
794
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
795
+ readonly data: VariantType<{
796
+ /** XGBoost-based model (cloudpickle serialized) */
797
+ readonly xgboost: BlobType;
798
+ /** LightGBM-based model (cloudpickle serialized) */
799
+ readonly lightgbm: BlobType;
800
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
801
+ readonly histogram: BlobType;
802
+ }>;
803
+ /** Number of input features */
804
+ readonly n_features: IntegerType;
805
+ /** Confidence level used during calibration */
806
+ readonly confidence_level: FloatType;
807
+ }>;
808
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
809
+ readonly mapie_cqr: StructType<{
810
+ /** Serialized model - variant tag indicates base model type */
811
+ readonly data: VariantType<{
812
+ /** XGBoost-based model (cloudpickle serialized) */
813
+ readonly xgboost: BlobType;
814
+ /** LightGBM-based model (cloudpickle serialized) */
815
+ readonly lightgbm: BlobType;
816
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
817
+ readonly histogram: BlobType;
818
+ }>;
819
+ /** Number of input features */
820
+ readonly n_features: IntegerType;
821
+ /** Confidence level used during calibration */
822
+ readonly confidence_level: FloatType;
823
+ }>;
824
+ }>], VariantType<{
825
+ /** Predicts interval width (upper - lower) from MAPIE regressor */
826
+ readonly mapie_interval_width: StructType<{
827
+ readonly data: BlobType;
828
+ readonly n_features: IntegerType;
829
+ }>;
830
+ /** Predicts prediction set size from MAPIE classifier */
831
+ readonly mapie_set_size: StructType<{
832
+ readonly data: BlobType;
833
+ readonly n_features: IntegerType;
834
+ }>;
835
+ }>>;
836
+ /**
837
+ * Create an uncertainty predictor from a MAPIE classifier.
838
+ *
839
+ * Returns a model that predicts prediction set size instead of class labels.
840
+ * Use with SHAP KernelExplainer to explain what drives prediction uncertainty.
841
+ *
842
+ * @param model - MAPIE classifier blob
843
+ * @returns Uncertainty predictor blob for use with SHAP KernelExplainer
844
+ */
845
+ export declare const mapie_uncertainty_predictor_classifier: import("@elaraai/east").PlatformDefinition<[VariantType<{
846
+ /** MAPIE classifier with split conformal */
847
+ readonly mapie_classifier: StructType<{
848
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
849
+ readonly data: VariantType<{
850
+ /** XGBoost-based model (cloudpickle serialized) */
851
+ readonly xgboost: BlobType;
852
+ /** LightGBM-based model (cloudpickle serialized) */
853
+ readonly lightgbm: BlobType;
854
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
855
+ readonly histogram: BlobType;
856
+ }>;
857
+ /** Number of input features */
858
+ readonly n_features: IntegerType;
859
+ /** Number of classes */
860
+ readonly n_classes: IntegerType;
861
+ /** Class labels */
862
+ readonly classes: ArrayType<IntegerType>;
863
+ /** Confidence level used during calibration */
864
+ readonly confidence_level: FloatType;
865
+ }>;
866
+ }>], VariantType<{
867
+ /** Predicts interval width (upper - lower) from MAPIE regressor */
868
+ readonly mapie_interval_width: StructType<{
869
+ readonly data: BlobType;
870
+ readonly n_features: IntegerType;
871
+ }>;
872
+ /** Predicts prediction set size from MAPIE classifier */
873
+ readonly mapie_set_size: StructType<{
874
+ readonly data: BlobType;
875
+ readonly n_features: IntegerType;
876
+ }>;
877
+ }>>;
878
+ /**
879
+ * Type definitions for MAPIE functions.
880
+ */
881
+ export declare const MAPIETypes: {
882
+ readonly ConformalMethodType: VariantType<{
883
+ /** Split conformal - requires separate calibration set */
884
+ readonly split: NullType;
885
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
886
+ readonly cross: NullType;
887
+ }>;
888
+ readonly XGBoostConfigType: StructType<{
889
+ readonly n_estimators: OptionType<IntegerType>;
890
+ readonly max_depth: OptionType<IntegerType>;
891
+ readonly learning_rate: OptionType<FloatType>;
892
+ readonly min_child_weight: OptionType<IntegerType>;
893
+ readonly subsample: OptionType<FloatType>;
894
+ readonly colsample_bytree: OptionType<FloatType>;
895
+ readonly reg_alpha: OptionType<FloatType>;
896
+ readonly reg_lambda: OptionType<FloatType>;
897
+ readonly gamma: OptionType<FloatType>;
898
+ readonly random_state: OptionType<IntegerType>;
899
+ readonly n_jobs: OptionType<IntegerType>;
900
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
901
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
902
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
903
+ readonly max_cat_threshold: OptionType<IntegerType>;
904
+ }>;
905
+ readonly LightGBMConfigType: StructType<{
906
+ readonly n_estimators: OptionType<IntegerType>;
907
+ readonly max_depth: OptionType<IntegerType>;
908
+ readonly learning_rate: OptionType<FloatType>;
909
+ readonly num_leaves: OptionType<IntegerType>;
910
+ readonly min_child_samples: OptionType<IntegerType>;
911
+ readonly subsample: OptionType<FloatType>;
912
+ readonly colsample_bytree: OptionType<FloatType>;
913
+ readonly reg_alpha: OptionType<FloatType>;
914
+ readonly reg_lambda: OptionType<FloatType>;
915
+ readonly random_state: OptionType<IntegerType>;
916
+ readonly n_jobs: OptionType<IntegerType>;
917
+ }>;
918
+ readonly BaseModelType: VariantType<{
919
+ /** XGBoost regressor as base model */
920
+ readonly xgboost: StructType<{
921
+ readonly n_estimators: OptionType<IntegerType>;
922
+ readonly max_depth: OptionType<IntegerType>;
923
+ readonly learning_rate: OptionType<FloatType>;
924
+ readonly min_child_weight: OptionType<IntegerType>;
925
+ readonly subsample: OptionType<FloatType>;
926
+ readonly colsample_bytree: OptionType<FloatType>;
927
+ readonly reg_alpha: OptionType<FloatType>;
928
+ readonly reg_lambda: OptionType<FloatType>;
929
+ readonly gamma: OptionType<FloatType>;
930
+ readonly random_state: OptionType<IntegerType>;
931
+ readonly n_jobs: OptionType<IntegerType>;
932
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
933
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
934
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
935
+ readonly max_cat_threshold: OptionType<IntegerType>;
936
+ }>;
937
+ /** LightGBM regressor as base model */
938
+ readonly lightgbm: StructType<{
939
+ readonly n_estimators: OptionType<IntegerType>;
940
+ readonly max_depth: OptionType<IntegerType>;
941
+ readonly learning_rate: OptionType<FloatType>;
942
+ readonly num_leaves: OptionType<IntegerType>;
943
+ readonly min_child_samples: OptionType<IntegerType>;
944
+ readonly subsample: OptionType<FloatType>;
945
+ readonly colsample_bytree: OptionType<FloatType>;
946
+ readonly reg_alpha: OptionType<FloatType>;
947
+ readonly reg_lambda: OptionType<FloatType>;
948
+ readonly random_state: OptionType<IntegerType>;
949
+ readonly n_jobs: OptionType<IntegerType>;
950
+ }>;
951
+ }>;
952
+ readonly MAPIEConfigType: StructType<{
953
+ /** Base model configuration */
954
+ readonly base_model: VariantType<{
955
+ /** XGBoost regressor as base model */
956
+ readonly xgboost: StructType<{
957
+ readonly n_estimators: OptionType<IntegerType>;
958
+ readonly max_depth: OptionType<IntegerType>;
959
+ readonly learning_rate: OptionType<FloatType>;
960
+ readonly min_child_weight: OptionType<IntegerType>;
961
+ readonly subsample: OptionType<FloatType>;
962
+ readonly colsample_bytree: OptionType<FloatType>;
963
+ readonly reg_alpha: OptionType<FloatType>;
964
+ readonly reg_lambda: OptionType<FloatType>;
965
+ readonly gamma: OptionType<FloatType>;
966
+ readonly random_state: OptionType<IntegerType>;
967
+ readonly n_jobs: OptionType<IntegerType>;
968
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
969
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
970
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
971
+ readonly max_cat_threshold: OptionType<IntegerType>;
972
+ }>;
973
+ /** LightGBM regressor as base model */
974
+ readonly lightgbm: StructType<{
975
+ readonly n_estimators: OptionType<IntegerType>;
976
+ readonly max_depth: OptionType<IntegerType>;
977
+ readonly learning_rate: OptionType<FloatType>;
978
+ readonly num_leaves: OptionType<IntegerType>;
979
+ readonly min_child_samples: OptionType<IntegerType>;
980
+ readonly subsample: OptionType<FloatType>;
981
+ readonly colsample_bytree: OptionType<FloatType>;
982
+ readonly reg_alpha: OptionType<FloatType>;
983
+ readonly reg_lambda: OptionType<FloatType>;
984
+ readonly random_state: OptionType<IntegerType>;
985
+ readonly n_jobs: OptionType<IntegerType>;
986
+ }>;
987
+ }>;
988
+ /** Conformal method (default: split) */
989
+ readonly method: OptionType<VariantType<{
990
+ /** Split conformal - requires separate calibration set */
991
+ readonly split: NullType;
992
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
993
+ readonly cross: NullType;
994
+ }>>;
995
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
996
+ readonly confidence_level: OptionType<FloatType>;
997
+ /** Number of CV folds for cross method (default 5) */
998
+ readonly cv_folds: OptionType<IntegerType>;
999
+ /** Random seed for reproducibility */
1000
+ readonly random_state: OptionType<IntegerType>;
1001
+ /** Conformity score consistency check tolerance (default 1e-04) */
1002
+ readonly conformity_eps: OptionType<FloatType>;
1003
+ }>;
1004
+ readonly MAPIECQRConfigType: StructType<{
1005
+ /** XGBoost config for the base quantile model */
1006
+ readonly xgboost_config: StructType<{
1007
+ readonly n_estimators: OptionType<IntegerType>;
1008
+ readonly max_depth: OptionType<IntegerType>;
1009
+ readonly learning_rate: OptionType<FloatType>;
1010
+ readonly min_child_weight: OptionType<IntegerType>;
1011
+ readonly subsample: OptionType<FloatType>;
1012
+ readonly colsample_bytree: OptionType<FloatType>;
1013
+ readonly reg_alpha: OptionType<FloatType>;
1014
+ readonly reg_lambda: OptionType<FloatType>;
1015
+ readonly gamma: OptionType<FloatType>;
1016
+ readonly random_state: OptionType<IntegerType>;
1017
+ readonly n_jobs: OptionType<IntegerType>;
1018
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1019
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1020
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1021
+ readonly max_cat_threshold: OptionType<IntegerType>;
1022
+ }>;
1023
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
1024
+ readonly confidence_level: OptionType<FloatType>;
1025
+ /** Random seed for reproducibility */
1026
+ readonly random_state: OptionType<IntegerType>;
1027
+ }>;
1028
+ readonly ClassificationMethodType: VariantType<{
1029
+ /** Least Ambiguous set-valued Classifier - smallest sets */
1030
+ readonly lac: NullType;
1031
+ /** Adaptive Prediction Sets - adapts to probabilities */
1032
+ readonly aps: NullType;
1033
+ }>;
1034
+ readonly BaseClassifierType: VariantType<{
1035
+ /** XGBoost classifier as base model */
1036
+ readonly xgboost: StructType<{
1037
+ readonly n_estimators: OptionType<IntegerType>;
1038
+ readonly max_depth: OptionType<IntegerType>;
1039
+ readonly learning_rate: OptionType<FloatType>;
1040
+ readonly min_child_weight: OptionType<IntegerType>;
1041
+ readonly subsample: OptionType<FloatType>;
1042
+ readonly colsample_bytree: OptionType<FloatType>;
1043
+ readonly reg_alpha: OptionType<FloatType>;
1044
+ readonly reg_lambda: OptionType<FloatType>;
1045
+ readonly gamma: OptionType<FloatType>;
1046
+ readonly random_state: OptionType<IntegerType>;
1047
+ readonly n_jobs: OptionType<IntegerType>;
1048
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1049
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1050
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1051
+ readonly max_cat_threshold: OptionType<IntegerType>;
1052
+ }>;
1053
+ /** LightGBM classifier as base model */
1054
+ readonly lightgbm: StructType<{
1055
+ readonly n_estimators: OptionType<IntegerType>;
1056
+ readonly max_depth: OptionType<IntegerType>;
1057
+ readonly learning_rate: OptionType<FloatType>;
1058
+ readonly num_leaves: OptionType<IntegerType>;
1059
+ readonly min_child_samples: OptionType<IntegerType>;
1060
+ readonly subsample: OptionType<FloatType>;
1061
+ readonly colsample_bytree: OptionType<FloatType>;
1062
+ readonly reg_alpha: OptionType<FloatType>;
1063
+ readonly reg_lambda: OptionType<FloatType>;
1064
+ readonly random_state: OptionType<IntegerType>;
1065
+ readonly n_jobs: OptionType<IntegerType>;
1066
+ }>;
1067
+ }>;
1068
+ readonly MAPIEClassifierConfigType: StructType<{
1069
+ /** Base classifier configuration */
1070
+ readonly base_model: VariantType<{
1071
+ /** XGBoost classifier as base model */
1072
+ readonly xgboost: StructType<{
1073
+ readonly n_estimators: OptionType<IntegerType>;
1074
+ readonly max_depth: OptionType<IntegerType>;
1075
+ readonly learning_rate: OptionType<FloatType>;
1076
+ readonly min_child_weight: OptionType<IntegerType>;
1077
+ readonly subsample: OptionType<FloatType>;
1078
+ readonly colsample_bytree: OptionType<FloatType>;
1079
+ readonly reg_alpha: OptionType<FloatType>;
1080
+ readonly reg_lambda: OptionType<FloatType>;
1081
+ readonly gamma: OptionType<FloatType>;
1082
+ readonly random_state: OptionType<IntegerType>;
1083
+ readonly n_jobs: OptionType<IntegerType>;
1084
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1085
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1086
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1087
+ readonly max_cat_threshold: OptionType<IntegerType>;
1088
+ }>;
1089
+ /** LightGBM classifier as base model */
1090
+ readonly lightgbm: StructType<{
1091
+ readonly n_estimators: OptionType<IntegerType>;
1092
+ readonly max_depth: OptionType<IntegerType>;
1093
+ readonly learning_rate: OptionType<FloatType>;
1094
+ readonly num_leaves: OptionType<IntegerType>;
1095
+ readonly min_child_samples: OptionType<IntegerType>;
1096
+ readonly subsample: OptionType<FloatType>;
1097
+ readonly colsample_bytree: OptionType<FloatType>;
1098
+ readonly reg_alpha: OptionType<FloatType>;
1099
+ readonly reg_lambda: OptionType<FloatType>;
1100
+ readonly random_state: OptionType<IntegerType>;
1101
+ readonly n_jobs: OptionType<IntegerType>;
1102
+ }>;
1103
+ }>;
1104
+ /** Classification conformity score method (default: lac) */
1105
+ readonly method: OptionType<VariantType<{
1106
+ /** Least Ambiguous set-valued Classifier - smallest sets */
1107
+ readonly lac: NullType;
1108
+ /** Adaptive Prediction Sets - adapts to probabilities */
1109
+ readonly aps: NullType;
1110
+ }>>;
1111
+ /** Confidence level: coverage probability (default 0.9 = 90% coverage) */
1112
+ readonly confidence_level: OptionType<FloatType>;
1113
+ /** Random seed for reproducibility */
1114
+ readonly random_state: OptionType<IntegerType>;
1115
+ }>;
1116
+ readonly MAPIEBaseModelDataType: VariantType<{
1117
+ /** XGBoost-based model (cloudpickle serialized) */
1118
+ readonly xgboost: BlobType;
1119
+ /** LightGBM-based model (cloudpickle serialized) */
1120
+ readonly lightgbm: BlobType;
1121
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1122
+ readonly histogram: BlobType;
1123
+ }>;
1124
+ readonly MAPIERegressorBlobType: VariantType<{
1125
+ /** MAPIE regressor with split conformal */
1126
+ readonly mapie_split: StructType<{
1127
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1128
+ readonly data: VariantType<{
1129
+ /** XGBoost-based model (cloudpickle serialized) */
1130
+ readonly xgboost: BlobType;
1131
+ /** LightGBM-based model (cloudpickle serialized) */
1132
+ readonly lightgbm: BlobType;
1133
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1134
+ readonly histogram: BlobType;
1135
+ }>;
1136
+ /** Number of input features */
1137
+ readonly n_features: IntegerType;
1138
+ /** Confidence level used during calibration */
1139
+ readonly confidence_level: FloatType;
1140
+ }>;
1141
+ /** MAPIE regressor with cross conformal */
1142
+ readonly mapie_cross: StructType<{
1143
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1144
+ readonly data: VariantType<{
1145
+ /** XGBoost-based model (cloudpickle serialized) */
1146
+ readonly xgboost: BlobType;
1147
+ /** LightGBM-based model (cloudpickle serialized) */
1148
+ readonly lightgbm: BlobType;
1149
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1150
+ readonly histogram: BlobType;
1151
+ }>;
1152
+ /** Number of input features */
1153
+ readonly n_features: IntegerType;
1154
+ /** Confidence level used during calibration */
1155
+ readonly confidence_level: FloatType;
1156
+ }>;
1157
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
1158
+ readonly mapie_cqr: StructType<{
1159
+ /** Serialized model - variant tag indicates base model type */
1160
+ readonly data: VariantType<{
1161
+ /** XGBoost-based model (cloudpickle serialized) */
1162
+ readonly xgboost: BlobType;
1163
+ /** LightGBM-based model (cloudpickle serialized) */
1164
+ readonly lightgbm: BlobType;
1165
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1166
+ readonly histogram: BlobType;
1167
+ }>;
1168
+ /** Number of input features */
1169
+ readonly n_features: IntegerType;
1170
+ /** Confidence level used during calibration */
1171
+ readonly confidence_level: FloatType;
1172
+ }>;
1173
+ }>;
1174
+ readonly MAPIEClassifierBlobType: VariantType<{
1175
+ /** MAPIE classifier with split conformal */
1176
+ readonly mapie_classifier: StructType<{
1177
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1178
+ readonly data: VariantType<{
1179
+ /** XGBoost-based model (cloudpickle serialized) */
1180
+ readonly xgboost: BlobType;
1181
+ /** LightGBM-based model (cloudpickle serialized) */
1182
+ readonly lightgbm: BlobType;
1183
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1184
+ readonly histogram: BlobType;
1185
+ }>;
1186
+ /** Number of input features */
1187
+ readonly n_features: IntegerType;
1188
+ /** Number of classes */
1189
+ readonly n_classes: IntegerType;
1190
+ /** Class labels */
1191
+ readonly classes: ArrayType<IntegerType>;
1192
+ /** Confidence level used during calibration */
1193
+ readonly confidence_level: FloatType;
1194
+ }>;
1195
+ }>;
1196
+ readonly UncertaintyPredictorType: VariantType<{
1197
+ /** Predicts interval width (upper - lower) from MAPIE regressor */
1198
+ readonly mapie_interval_width: StructType<{
1199
+ readonly data: BlobType;
1200
+ readonly n_features: IntegerType;
1201
+ }>;
1202
+ /** Predicts prediction set size from MAPIE classifier */
1203
+ readonly mapie_set_size: StructType<{
1204
+ readonly data: BlobType;
1205
+ readonly n_features: IntegerType;
1206
+ }>;
1207
+ }>;
1208
+ readonly IntervalResultType: StructType<{
1209
+ /** Lower bound of prediction interval */
1210
+ readonly lower: ArrayType<FloatType>;
1211
+ /** Point prediction (median/mean) */
1212
+ readonly pred: ArrayType<FloatType>;
1213
+ /** Upper bound of prediction interval */
1214
+ readonly upper: ArrayType<FloatType>;
1215
+ }>;
1216
+ readonly PredictionSetResultType: StructType<{
1217
+ /** Predicted class (argmax of probabilities) */
1218
+ readonly pred: ArrayType<IntegerType>;
1219
+ /** Prediction set membership matrix (n_samples x n_classes, 1 if class in set) */
1220
+ readonly sets: ArrayType<ArrayType<IntegerType>>;
1221
+ /** Class probabilities (n_samples x n_classes) */
1222
+ readonly probabilities: ArrayType<ArrayType<FloatType>>;
1223
+ /** Size of each prediction set */
1224
+ readonly set_sizes: ArrayType<IntegerType>;
1225
+ }>;
1226
+ readonly VectorType: ArrayType<FloatType>;
1227
+ readonly MatrixType: ArrayType<ArrayType<FloatType>>;
1228
+ readonly LabelVectorType: ArrayType<IntegerType>;
1229
+ };
1230
+ /**
1231
+ * MAPIE conformal prediction.
1232
+ *
1233
+ * Provides prediction intervals with coverage guarantees using
1234
+ * conformal prediction methods (MAPIE 1.2.0 API).
1235
+ *
1236
+ * @example
1237
+ * ```ts
1238
+ * import { East, variant } from "@elaraai/east";
1239
+ * import { MAPIE } from "@elaraai/east-py-datascience";
1240
+ *
1241
+ * const train = East.function([], MAPIE.Types.MAPIERegressorBlobType, $ => {
1242
+ * const X_train = $.let([[1.0], [2.0], [3.0], [4.0], [5.0]]);
1243
+ * const y_train = $.let([1.5, 2.5, 3.5, 4.5, 5.5]);
1244
+ * const X_calib = $.let([[2.5], [4.5]]);
1245
+ * const y_calib = $.let([3.0, 5.0]);
1246
+ * const config = $.let({
1247
+ * base_model: variant('xgboost', {
1248
+ * n_estimators: variant('some', 50n),
1249
+ * max_depth: variant('some', 3n),
1250
+ * learning_rate: variant('some', 0.1),
1251
+ * min_child_weight: variant('none', null),
1252
+ * subsample: variant('none', null),
1253
+ * colsample_bytree: variant('none', null),
1254
+ * reg_alpha: variant('none', null),
1255
+ * reg_lambda: variant('none', null),
1256
+ * gamma: variant('none', null),
1257
+ * random_state: variant('some', 42n),
1258
+ * n_jobs: variant('none', null),
1259
+ * sample_weight: variant('none', null),
1260
+ * categorical_features: variant('none', null),
1261
+ * max_cat_to_onehot: variant('none', null),
1262
+ * max_cat_threshold: variant('none', null),
1263
+ * }),
1264
+ * method: variant('some', variant('split', null)),
1265
+ * confidence_level: variant('some', 0.9),
1266
+ * cv_folds: variant('none', null),
1267
+ * random_state: variant('some', 42n),
1268
+ * conformity_eps: variant('none', null),
1269
+ * });
1270
+ * return $.return(MAPIE.trainConformalRegressor(X_train, y_train, X_calib, y_calib, config));
1271
+ * });
1272
+ * ```
1273
+ */
1274
+ export declare const MAPIE: {
1275
+ /** Train MAPIE conformal regressor */
1276
+ readonly trainConformalRegressor: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
1277
+ /** Base model configuration */
1278
+ readonly base_model: VariantType<{
1279
+ /** XGBoost regressor as base model */
1280
+ readonly xgboost: StructType<{
1281
+ readonly n_estimators: OptionType<IntegerType>;
1282
+ readonly max_depth: OptionType<IntegerType>;
1283
+ readonly learning_rate: OptionType<FloatType>;
1284
+ readonly min_child_weight: OptionType<IntegerType>;
1285
+ readonly subsample: OptionType<FloatType>;
1286
+ readonly colsample_bytree: OptionType<FloatType>;
1287
+ readonly reg_alpha: OptionType<FloatType>;
1288
+ readonly reg_lambda: OptionType<FloatType>;
1289
+ readonly gamma: OptionType<FloatType>;
1290
+ readonly random_state: OptionType<IntegerType>;
1291
+ readonly n_jobs: OptionType<IntegerType>;
1292
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1293
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1294
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1295
+ readonly max_cat_threshold: OptionType<IntegerType>;
1296
+ }>;
1297
+ /** LightGBM regressor as base model */
1298
+ readonly lightgbm: StructType<{
1299
+ readonly n_estimators: OptionType<IntegerType>;
1300
+ readonly max_depth: OptionType<IntegerType>;
1301
+ readonly learning_rate: OptionType<FloatType>;
1302
+ readonly num_leaves: OptionType<IntegerType>;
1303
+ readonly min_child_samples: OptionType<IntegerType>;
1304
+ readonly subsample: OptionType<FloatType>;
1305
+ readonly colsample_bytree: OptionType<FloatType>;
1306
+ readonly reg_alpha: OptionType<FloatType>;
1307
+ readonly reg_lambda: OptionType<FloatType>;
1308
+ readonly random_state: OptionType<IntegerType>;
1309
+ readonly n_jobs: OptionType<IntegerType>;
1310
+ }>;
1311
+ }>;
1312
+ /** Conformal method (default: split) */
1313
+ readonly method: OptionType<VariantType<{
1314
+ /** Split conformal - requires separate calibration set */
1315
+ readonly split: NullType;
1316
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
1317
+ readonly cross: NullType;
1318
+ }>>;
1319
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
1320
+ readonly confidence_level: OptionType<FloatType>;
1321
+ /** Number of CV folds for cross method (default 5) */
1322
+ readonly cv_folds: OptionType<IntegerType>;
1323
+ /** Random seed for reproducibility */
1324
+ readonly random_state: OptionType<IntegerType>;
1325
+ /** Conformity score consistency check tolerance (default 1e-04) */
1326
+ readonly conformity_eps: OptionType<FloatType>;
1327
+ }>], VariantType<{
1328
+ /** MAPIE regressor with split conformal */
1329
+ readonly mapie_split: StructType<{
1330
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1331
+ readonly data: VariantType<{
1332
+ /** XGBoost-based model (cloudpickle serialized) */
1333
+ readonly xgboost: BlobType;
1334
+ /** LightGBM-based model (cloudpickle serialized) */
1335
+ readonly lightgbm: BlobType;
1336
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1337
+ readonly histogram: BlobType;
1338
+ }>;
1339
+ /** Number of input features */
1340
+ readonly n_features: IntegerType;
1341
+ /** Confidence level used during calibration */
1342
+ readonly confidence_level: FloatType;
1343
+ }>;
1344
+ /** MAPIE regressor with cross conformal */
1345
+ readonly mapie_cross: StructType<{
1346
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1347
+ readonly data: VariantType<{
1348
+ /** XGBoost-based model (cloudpickle serialized) */
1349
+ readonly xgboost: BlobType;
1350
+ /** LightGBM-based model (cloudpickle serialized) */
1351
+ readonly lightgbm: BlobType;
1352
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1353
+ readonly histogram: BlobType;
1354
+ }>;
1355
+ /** Number of input features */
1356
+ readonly n_features: IntegerType;
1357
+ /** Confidence level used during calibration */
1358
+ readonly confidence_level: FloatType;
1359
+ }>;
1360
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
1361
+ readonly mapie_cqr: StructType<{
1362
+ /** Serialized model - variant tag indicates base model type */
1363
+ readonly data: VariantType<{
1364
+ /** XGBoost-based model (cloudpickle serialized) */
1365
+ readonly xgboost: BlobType;
1366
+ /** LightGBM-based model (cloudpickle serialized) */
1367
+ readonly lightgbm: BlobType;
1368
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1369
+ readonly histogram: BlobType;
1370
+ }>;
1371
+ /** Number of input features */
1372
+ readonly n_features: IntegerType;
1373
+ /** Confidence level used during calibration */
1374
+ readonly confidence_level: FloatType;
1375
+ }>;
1376
+ }>>;
1377
+ /** Train MAPIE CQR (Conformalized Quantile Regression) */
1378
+ readonly trainCQR: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
1379
+ /** XGBoost config for the base quantile model */
1380
+ readonly xgboost_config: StructType<{
1381
+ readonly n_estimators: OptionType<IntegerType>;
1382
+ readonly max_depth: OptionType<IntegerType>;
1383
+ readonly learning_rate: OptionType<FloatType>;
1384
+ readonly min_child_weight: OptionType<IntegerType>;
1385
+ readonly subsample: OptionType<FloatType>;
1386
+ readonly colsample_bytree: OptionType<FloatType>;
1387
+ readonly reg_alpha: OptionType<FloatType>;
1388
+ readonly reg_lambda: OptionType<FloatType>;
1389
+ readonly gamma: OptionType<FloatType>;
1390
+ readonly random_state: OptionType<IntegerType>;
1391
+ readonly n_jobs: OptionType<IntegerType>;
1392
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1393
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1394
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1395
+ readonly max_cat_threshold: OptionType<IntegerType>;
1396
+ }>;
1397
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
1398
+ readonly confidence_level: OptionType<FloatType>;
1399
+ /** Random seed for reproducibility */
1400
+ readonly random_state: OptionType<IntegerType>;
1401
+ }>], VariantType<{
1402
+ /** MAPIE regressor with split conformal */
1403
+ readonly mapie_split: StructType<{
1404
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1405
+ readonly data: VariantType<{
1406
+ /** XGBoost-based model (cloudpickle serialized) */
1407
+ readonly xgboost: BlobType;
1408
+ /** LightGBM-based model (cloudpickle serialized) */
1409
+ readonly lightgbm: BlobType;
1410
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1411
+ readonly histogram: BlobType;
1412
+ }>;
1413
+ /** Number of input features */
1414
+ readonly n_features: IntegerType;
1415
+ /** Confidence level used during calibration */
1416
+ readonly confidence_level: FloatType;
1417
+ }>;
1418
+ /** MAPIE regressor with cross conformal */
1419
+ readonly mapie_cross: StructType<{
1420
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1421
+ readonly data: VariantType<{
1422
+ /** XGBoost-based model (cloudpickle serialized) */
1423
+ readonly xgboost: BlobType;
1424
+ /** LightGBM-based model (cloudpickle serialized) */
1425
+ readonly lightgbm: BlobType;
1426
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1427
+ readonly histogram: BlobType;
1428
+ }>;
1429
+ /** Number of input features */
1430
+ readonly n_features: IntegerType;
1431
+ /** Confidence level used during calibration */
1432
+ readonly confidence_level: FloatType;
1433
+ }>;
1434
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
1435
+ readonly mapie_cqr: StructType<{
1436
+ /** Serialized model - variant tag indicates base model type */
1437
+ readonly data: VariantType<{
1438
+ /** XGBoost-based model (cloudpickle serialized) */
1439
+ readonly xgboost: BlobType;
1440
+ /** LightGBM-based model (cloudpickle serialized) */
1441
+ readonly lightgbm: BlobType;
1442
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1443
+ readonly histogram: BlobType;
1444
+ }>;
1445
+ /** Number of input features */
1446
+ readonly n_features: IntegerType;
1447
+ /** Confidence level used during calibration */
1448
+ readonly confidence_level: FloatType;
1449
+ }>;
1450
+ }>>;
1451
+ /** Predict with intervals */
1452
+ readonly predictInterval: import("@elaraai/east").PlatformDefinition<[VariantType<{
1453
+ /** MAPIE regressor with split conformal */
1454
+ readonly mapie_split: StructType<{
1455
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1456
+ readonly data: VariantType<{
1457
+ /** XGBoost-based model (cloudpickle serialized) */
1458
+ readonly xgboost: BlobType;
1459
+ /** LightGBM-based model (cloudpickle serialized) */
1460
+ readonly lightgbm: BlobType;
1461
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1462
+ readonly histogram: BlobType;
1463
+ }>;
1464
+ /** Number of input features */
1465
+ readonly n_features: IntegerType;
1466
+ /** Confidence level used during calibration */
1467
+ readonly confidence_level: FloatType;
1468
+ }>;
1469
+ /** MAPIE regressor with cross conformal */
1470
+ readonly mapie_cross: StructType<{
1471
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1472
+ readonly data: VariantType<{
1473
+ /** XGBoost-based model (cloudpickle serialized) */
1474
+ readonly xgboost: BlobType;
1475
+ /** LightGBM-based model (cloudpickle serialized) */
1476
+ readonly lightgbm: BlobType;
1477
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1478
+ readonly histogram: BlobType;
1479
+ }>;
1480
+ /** Number of input features */
1481
+ readonly n_features: IntegerType;
1482
+ /** Confidence level used during calibration */
1483
+ readonly confidence_level: FloatType;
1484
+ }>;
1485
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
1486
+ readonly mapie_cqr: StructType<{
1487
+ /** Serialized model - variant tag indicates base model type */
1488
+ readonly data: VariantType<{
1489
+ /** XGBoost-based model (cloudpickle serialized) */
1490
+ readonly xgboost: BlobType;
1491
+ /** LightGBM-based model (cloudpickle serialized) */
1492
+ readonly lightgbm: BlobType;
1493
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1494
+ readonly histogram: BlobType;
1495
+ }>;
1496
+ /** Number of input features */
1497
+ readonly n_features: IntegerType;
1498
+ /** Confidence level used during calibration */
1499
+ readonly confidence_level: FloatType;
1500
+ }>;
1501
+ }>, ArrayType<ArrayType<FloatType>>], StructType<{
1502
+ /** Lower bound of prediction interval */
1503
+ readonly lower: ArrayType<FloatType>;
1504
+ /** Point prediction (median/mean) */
1505
+ readonly pred: ArrayType<FloatType>;
1506
+ /** Upper bound of prediction interval */
1507
+ readonly upper: ArrayType<FloatType>;
1508
+ }>>;
1509
+ /** Train MAPIE conformal classifier */
1510
+ readonly trainConformalClassifier: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<IntegerType>, ArrayType<ArrayType<FloatType>>, ArrayType<IntegerType>, StructType<{
1511
+ /** Base classifier configuration */
1512
+ readonly base_model: VariantType<{
1513
+ /** XGBoost classifier as base model */
1514
+ readonly xgboost: StructType<{
1515
+ readonly n_estimators: OptionType<IntegerType>;
1516
+ readonly max_depth: OptionType<IntegerType>;
1517
+ readonly learning_rate: OptionType<FloatType>;
1518
+ readonly min_child_weight: OptionType<IntegerType>;
1519
+ readonly subsample: OptionType<FloatType>;
1520
+ readonly colsample_bytree: OptionType<FloatType>;
1521
+ readonly reg_alpha: OptionType<FloatType>;
1522
+ readonly reg_lambda: OptionType<FloatType>;
1523
+ readonly gamma: OptionType<FloatType>;
1524
+ readonly random_state: OptionType<IntegerType>;
1525
+ readonly n_jobs: OptionType<IntegerType>;
1526
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1527
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1528
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1529
+ readonly max_cat_threshold: OptionType<IntegerType>;
1530
+ }>;
1531
+ /** LightGBM classifier as base model */
1532
+ readonly lightgbm: StructType<{
1533
+ readonly n_estimators: OptionType<IntegerType>;
1534
+ readonly max_depth: OptionType<IntegerType>;
1535
+ readonly learning_rate: OptionType<FloatType>;
1536
+ readonly num_leaves: OptionType<IntegerType>;
1537
+ readonly min_child_samples: OptionType<IntegerType>;
1538
+ readonly subsample: OptionType<FloatType>;
1539
+ readonly colsample_bytree: OptionType<FloatType>;
1540
+ readonly reg_alpha: OptionType<FloatType>;
1541
+ readonly reg_lambda: OptionType<FloatType>;
1542
+ readonly random_state: OptionType<IntegerType>;
1543
+ readonly n_jobs: OptionType<IntegerType>;
1544
+ }>;
1545
+ }>;
1546
+ /** Classification conformity score method (default: lac) */
1547
+ readonly method: OptionType<VariantType<{
1548
+ /** Least Ambiguous set-valued Classifier - smallest sets */
1549
+ readonly lac: NullType;
1550
+ /** Adaptive Prediction Sets - adapts to probabilities */
1551
+ readonly aps: NullType;
1552
+ }>>;
1553
+ /** Confidence level: coverage probability (default 0.9 = 90% coverage) */
1554
+ readonly confidence_level: OptionType<FloatType>;
1555
+ /** Random seed for reproducibility */
1556
+ readonly random_state: OptionType<IntegerType>;
1557
+ }>], VariantType<{
1558
+ /** MAPIE classifier with split conformal */
1559
+ readonly mapie_classifier: StructType<{
1560
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1561
+ readonly data: VariantType<{
1562
+ /** XGBoost-based model (cloudpickle serialized) */
1563
+ readonly xgboost: BlobType;
1564
+ /** LightGBM-based model (cloudpickle serialized) */
1565
+ readonly lightgbm: BlobType;
1566
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1567
+ readonly histogram: BlobType;
1568
+ }>;
1569
+ /** Number of input features */
1570
+ readonly n_features: IntegerType;
1571
+ /** Number of classes */
1572
+ readonly n_classes: IntegerType;
1573
+ /** Class labels */
1574
+ readonly classes: ArrayType<IntegerType>;
1575
+ /** Confidence level used during calibration */
1576
+ readonly confidence_level: FloatType;
1577
+ }>;
1578
+ }>>;
1579
+ /** Predict with prediction sets */
1580
+ readonly predictSet: import("@elaraai/east").PlatformDefinition<[VariantType<{
1581
+ /** MAPIE classifier with split conformal */
1582
+ readonly mapie_classifier: StructType<{
1583
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1584
+ readonly data: VariantType<{
1585
+ /** XGBoost-based model (cloudpickle serialized) */
1586
+ readonly xgboost: BlobType;
1587
+ /** LightGBM-based model (cloudpickle serialized) */
1588
+ readonly lightgbm: BlobType;
1589
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1590
+ readonly histogram: BlobType;
1591
+ }>;
1592
+ /** Number of input features */
1593
+ readonly n_features: IntegerType;
1594
+ /** Number of classes */
1595
+ readonly n_classes: IntegerType;
1596
+ /** Class labels */
1597
+ readonly classes: ArrayType<IntegerType>;
1598
+ /** Confidence level used during calibration */
1599
+ readonly confidence_level: FloatType;
1600
+ }>;
1601
+ }>, ArrayType<ArrayType<FloatType>>], StructType<{
1602
+ /** Predicted class (argmax of probabilities) */
1603
+ readonly pred: ArrayType<IntegerType>;
1604
+ /** Prediction set membership matrix (n_samples x n_classes, 1 if class in set) */
1605
+ readonly sets: ArrayType<ArrayType<IntegerType>>;
1606
+ /** Class probabilities (n_samples x n_classes) */
1607
+ readonly probabilities: ArrayType<ArrayType<FloatType>>;
1608
+ /** Size of each prediction set */
1609
+ readonly set_sizes: ArrayType<IntegerType>;
1610
+ }>>;
1611
+ /** Create uncertainty predictor from MAPIE regressor for SHAP */
1612
+ readonly uncertaintyPredictorRegressor: import("@elaraai/east").PlatformDefinition<[VariantType<{
1613
+ /** MAPIE regressor with split conformal */
1614
+ readonly mapie_split: StructType<{
1615
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1616
+ readonly data: VariantType<{
1617
+ /** XGBoost-based model (cloudpickle serialized) */
1618
+ readonly xgboost: BlobType;
1619
+ /** LightGBM-based model (cloudpickle serialized) */
1620
+ readonly lightgbm: BlobType;
1621
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1622
+ readonly histogram: BlobType;
1623
+ }>;
1624
+ /** Number of input features */
1625
+ readonly n_features: IntegerType;
1626
+ /** Confidence level used during calibration */
1627
+ readonly confidence_level: FloatType;
1628
+ }>;
1629
+ /** MAPIE regressor with cross conformal */
1630
+ readonly mapie_cross: StructType<{
1631
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1632
+ readonly data: VariantType<{
1633
+ /** XGBoost-based model (cloudpickle serialized) */
1634
+ readonly xgboost: BlobType;
1635
+ /** LightGBM-based model (cloudpickle serialized) */
1636
+ readonly lightgbm: BlobType;
1637
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1638
+ readonly histogram: BlobType;
1639
+ }>;
1640
+ /** Number of input features */
1641
+ readonly n_features: IntegerType;
1642
+ /** Confidence level used during calibration */
1643
+ readonly confidence_level: FloatType;
1644
+ }>;
1645
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
1646
+ readonly mapie_cqr: StructType<{
1647
+ /** Serialized model - variant tag indicates base model type */
1648
+ readonly data: VariantType<{
1649
+ /** XGBoost-based model (cloudpickle serialized) */
1650
+ readonly xgboost: BlobType;
1651
+ /** LightGBM-based model (cloudpickle serialized) */
1652
+ readonly lightgbm: BlobType;
1653
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1654
+ readonly histogram: BlobType;
1655
+ }>;
1656
+ /** Number of input features */
1657
+ readonly n_features: IntegerType;
1658
+ /** Confidence level used during calibration */
1659
+ readonly confidence_level: FloatType;
1660
+ }>;
1661
+ }>], VariantType<{
1662
+ /** Predicts interval width (upper - lower) from MAPIE regressor */
1663
+ readonly mapie_interval_width: StructType<{
1664
+ readonly data: BlobType;
1665
+ readonly n_features: IntegerType;
1666
+ }>;
1667
+ /** Predicts prediction set size from MAPIE classifier */
1668
+ readonly mapie_set_size: StructType<{
1669
+ readonly data: BlobType;
1670
+ readonly n_features: IntegerType;
1671
+ }>;
1672
+ }>>;
1673
+ /** Create uncertainty predictor from MAPIE classifier for SHAP */
1674
+ readonly uncertaintyPredictorClassifier: import("@elaraai/east").PlatformDefinition<[VariantType<{
1675
+ /** MAPIE classifier with split conformal */
1676
+ readonly mapie_classifier: StructType<{
1677
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1678
+ readonly data: VariantType<{
1679
+ /** XGBoost-based model (cloudpickle serialized) */
1680
+ readonly xgboost: BlobType;
1681
+ /** LightGBM-based model (cloudpickle serialized) */
1682
+ readonly lightgbm: BlobType;
1683
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1684
+ readonly histogram: BlobType;
1685
+ }>;
1686
+ /** Number of input features */
1687
+ readonly n_features: IntegerType;
1688
+ /** Number of classes */
1689
+ readonly n_classes: IntegerType;
1690
+ /** Class labels */
1691
+ readonly classes: ArrayType<IntegerType>;
1692
+ /** Confidence level used during calibration */
1693
+ readonly confidence_level: FloatType;
1694
+ }>;
1695
+ }>], VariantType<{
1696
+ /** Predicts interval width (upper - lower) from MAPIE regressor */
1697
+ readonly mapie_interval_width: StructType<{
1698
+ readonly data: BlobType;
1699
+ readonly n_features: IntegerType;
1700
+ }>;
1701
+ /** Predicts prediction set size from MAPIE classifier */
1702
+ readonly mapie_set_size: StructType<{
1703
+ readonly data: BlobType;
1704
+ readonly n_features: IntegerType;
1705
+ }>;
1706
+ }>>;
1707
+ /** Type definitions */
1708
+ readonly Types: {
1709
+ readonly ConformalMethodType: VariantType<{
1710
+ /** Split conformal - requires separate calibration set */
1711
+ readonly split: NullType;
1712
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
1713
+ readonly cross: NullType;
1714
+ }>;
1715
+ readonly XGBoostConfigType: StructType<{
1716
+ readonly n_estimators: OptionType<IntegerType>;
1717
+ readonly max_depth: OptionType<IntegerType>;
1718
+ readonly learning_rate: OptionType<FloatType>;
1719
+ readonly min_child_weight: OptionType<IntegerType>;
1720
+ readonly subsample: OptionType<FloatType>;
1721
+ readonly colsample_bytree: OptionType<FloatType>;
1722
+ readonly reg_alpha: OptionType<FloatType>;
1723
+ readonly reg_lambda: OptionType<FloatType>;
1724
+ readonly gamma: OptionType<FloatType>;
1725
+ readonly random_state: OptionType<IntegerType>;
1726
+ readonly n_jobs: OptionType<IntegerType>;
1727
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1728
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1729
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1730
+ readonly max_cat_threshold: OptionType<IntegerType>;
1731
+ }>;
1732
+ readonly LightGBMConfigType: StructType<{
1733
+ readonly n_estimators: OptionType<IntegerType>;
1734
+ readonly max_depth: OptionType<IntegerType>;
1735
+ readonly learning_rate: OptionType<FloatType>;
1736
+ readonly num_leaves: OptionType<IntegerType>;
1737
+ readonly min_child_samples: OptionType<IntegerType>;
1738
+ readonly subsample: OptionType<FloatType>;
1739
+ readonly colsample_bytree: OptionType<FloatType>;
1740
+ readonly reg_alpha: OptionType<FloatType>;
1741
+ readonly reg_lambda: OptionType<FloatType>;
1742
+ readonly random_state: OptionType<IntegerType>;
1743
+ readonly n_jobs: OptionType<IntegerType>;
1744
+ }>;
1745
+ readonly BaseModelType: VariantType<{
1746
+ /** XGBoost regressor as base model */
1747
+ readonly xgboost: StructType<{
1748
+ readonly n_estimators: OptionType<IntegerType>;
1749
+ readonly max_depth: OptionType<IntegerType>;
1750
+ readonly learning_rate: OptionType<FloatType>;
1751
+ readonly min_child_weight: OptionType<IntegerType>;
1752
+ readonly subsample: OptionType<FloatType>;
1753
+ readonly colsample_bytree: OptionType<FloatType>;
1754
+ readonly reg_alpha: OptionType<FloatType>;
1755
+ readonly reg_lambda: OptionType<FloatType>;
1756
+ readonly gamma: OptionType<FloatType>;
1757
+ readonly random_state: OptionType<IntegerType>;
1758
+ readonly n_jobs: OptionType<IntegerType>;
1759
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1760
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1761
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1762
+ readonly max_cat_threshold: OptionType<IntegerType>;
1763
+ }>;
1764
+ /** LightGBM regressor as base model */
1765
+ readonly lightgbm: StructType<{
1766
+ readonly n_estimators: OptionType<IntegerType>;
1767
+ readonly max_depth: OptionType<IntegerType>;
1768
+ readonly learning_rate: OptionType<FloatType>;
1769
+ readonly num_leaves: OptionType<IntegerType>;
1770
+ readonly min_child_samples: OptionType<IntegerType>;
1771
+ readonly subsample: OptionType<FloatType>;
1772
+ readonly colsample_bytree: OptionType<FloatType>;
1773
+ readonly reg_alpha: OptionType<FloatType>;
1774
+ readonly reg_lambda: OptionType<FloatType>;
1775
+ readonly random_state: OptionType<IntegerType>;
1776
+ readonly n_jobs: OptionType<IntegerType>;
1777
+ }>;
1778
+ }>;
1779
+ readonly MAPIEConfigType: StructType<{
1780
+ /** Base model configuration */
1781
+ readonly base_model: VariantType<{
1782
+ /** XGBoost regressor as base model */
1783
+ readonly xgboost: StructType<{
1784
+ readonly n_estimators: OptionType<IntegerType>;
1785
+ readonly max_depth: OptionType<IntegerType>;
1786
+ readonly learning_rate: OptionType<FloatType>;
1787
+ readonly min_child_weight: OptionType<IntegerType>;
1788
+ readonly subsample: OptionType<FloatType>;
1789
+ readonly colsample_bytree: OptionType<FloatType>;
1790
+ readonly reg_alpha: OptionType<FloatType>;
1791
+ readonly reg_lambda: OptionType<FloatType>;
1792
+ readonly gamma: OptionType<FloatType>;
1793
+ readonly random_state: OptionType<IntegerType>;
1794
+ readonly n_jobs: OptionType<IntegerType>;
1795
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1796
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1797
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1798
+ readonly max_cat_threshold: OptionType<IntegerType>;
1799
+ }>;
1800
+ /** LightGBM regressor as base model */
1801
+ readonly lightgbm: StructType<{
1802
+ readonly n_estimators: OptionType<IntegerType>;
1803
+ readonly max_depth: OptionType<IntegerType>;
1804
+ readonly learning_rate: OptionType<FloatType>;
1805
+ readonly num_leaves: OptionType<IntegerType>;
1806
+ readonly min_child_samples: OptionType<IntegerType>;
1807
+ readonly subsample: OptionType<FloatType>;
1808
+ readonly colsample_bytree: OptionType<FloatType>;
1809
+ readonly reg_alpha: OptionType<FloatType>;
1810
+ readonly reg_lambda: OptionType<FloatType>;
1811
+ readonly random_state: OptionType<IntegerType>;
1812
+ readonly n_jobs: OptionType<IntegerType>;
1813
+ }>;
1814
+ }>;
1815
+ /** Conformal method (default: split) */
1816
+ readonly method: OptionType<VariantType<{
1817
+ /** Split conformal - requires separate calibration set */
1818
+ readonly split: NullType;
1819
+ /** Cross conformal - uses CV for calibration (combines train + calib) */
1820
+ readonly cross: NullType;
1821
+ }>>;
1822
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
1823
+ readonly confidence_level: OptionType<FloatType>;
1824
+ /** Number of CV folds for cross method (default 5) */
1825
+ readonly cv_folds: OptionType<IntegerType>;
1826
+ /** Random seed for reproducibility */
1827
+ readonly random_state: OptionType<IntegerType>;
1828
+ /** Conformity score consistency check tolerance (default 1e-04) */
1829
+ readonly conformity_eps: OptionType<FloatType>;
1830
+ }>;
1831
+ readonly MAPIECQRConfigType: StructType<{
1832
+ /** XGBoost config for the base quantile model */
1833
+ readonly xgboost_config: StructType<{
1834
+ readonly n_estimators: OptionType<IntegerType>;
1835
+ readonly max_depth: OptionType<IntegerType>;
1836
+ readonly learning_rate: OptionType<FloatType>;
1837
+ readonly min_child_weight: OptionType<IntegerType>;
1838
+ readonly subsample: OptionType<FloatType>;
1839
+ readonly colsample_bytree: OptionType<FloatType>;
1840
+ readonly reg_alpha: OptionType<FloatType>;
1841
+ readonly reg_lambda: OptionType<FloatType>;
1842
+ readonly gamma: OptionType<FloatType>;
1843
+ readonly random_state: OptionType<IntegerType>;
1844
+ readonly n_jobs: OptionType<IntegerType>;
1845
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1846
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1847
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1848
+ readonly max_cat_threshold: OptionType<IntegerType>;
1849
+ }>;
1850
+ /** Confidence level: coverage probability (default 0.9 = 90% intervals) */
1851
+ readonly confidence_level: OptionType<FloatType>;
1852
+ /** Random seed for reproducibility */
1853
+ readonly random_state: OptionType<IntegerType>;
1854
+ }>;
1855
+ readonly ClassificationMethodType: VariantType<{
1856
+ /** Least Ambiguous set-valued Classifier - smallest sets */
1857
+ readonly lac: NullType;
1858
+ /** Adaptive Prediction Sets - adapts to probabilities */
1859
+ readonly aps: NullType;
1860
+ }>;
1861
+ readonly BaseClassifierType: VariantType<{
1862
+ /** XGBoost classifier as base model */
1863
+ readonly xgboost: StructType<{
1864
+ readonly n_estimators: OptionType<IntegerType>;
1865
+ readonly max_depth: OptionType<IntegerType>;
1866
+ readonly learning_rate: OptionType<FloatType>;
1867
+ readonly min_child_weight: OptionType<IntegerType>;
1868
+ readonly subsample: OptionType<FloatType>;
1869
+ readonly colsample_bytree: OptionType<FloatType>;
1870
+ readonly reg_alpha: OptionType<FloatType>;
1871
+ readonly reg_lambda: OptionType<FloatType>;
1872
+ readonly gamma: OptionType<FloatType>;
1873
+ readonly random_state: OptionType<IntegerType>;
1874
+ readonly n_jobs: OptionType<IntegerType>;
1875
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1876
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1877
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1878
+ readonly max_cat_threshold: OptionType<IntegerType>;
1879
+ }>;
1880
+ /** LightGBM classifier as base model */
1881
+ readonly lightgbm: StructType<{
1882
+ readonly n_estimators: OptionType<IntegerType>;
1883
+ readonly max_depth: OptionType<IntegerType>;
1884
+ readonly learning_rate: OptionType<FloatType>;
1885
+ readonly num_leaves: OptionType<IntegerType>;
1886
+ readonly min_child_samples: OptionType<IntegerType>;
1887
+ readonly subsample: OptionType<FloatType>;
1888
+ readonly colsample_bytree: OptionType<FloatType>;
1889
+ readonly reg_alpha: OptionType<FloatType>;
1890
+ readonly reg_lambda: OptionType<FloatType>;
1891
+ readonly random_state: OptionType<IntegerType>;
1892
+ readonly n_jobs: OptionType<IntegerType>;
1893
+ }>;
1894
+ }>;
1895
+ readonly MAPIEClassifierConfigType: StructType<{
1896
+ /** Base classifier configuration */
1897
+ readonly base_model: VariantType<{
1898
+ /** XGBoost classifier as base model */
1899
+ readonly xgboost: StructType<{
1900
+ readonly n_estimators: OptionType<IntegerType>;
1901
+ readonly max_depth: OptionType<IntegerType>;
1902
+ readonly learning_rate: OptionType<FloatType>;
1903
+ readonly min_child_weight: OptionType<IntegerType>;
1904
+ readonly subsample: OptionType<FloatType>;
1905
+ readonly colsample_bytree: OptionType<FloatType>;
1906
+ readonly reg_alpha: OptionType<FloatType>;
1907
+ readonly reg_lambda: OptionType<FloatType>;
1908
+ readonly gamma: OptionType<FloatType>;
1909
+ readonly random_state: OptionType<IntegerType>;
1910
+ readonly n_jobs: OptionType<IntegerType>;
1911
+ readonly sample_weight: OptionType<ArrayType<FloatType>>;
1912
+ readonly categorical_features: OptionType<ArrayType<IntegerType>>;
1913
+ readonly max_cat_to_onehot: OptionType<IntegerType>;
1914
+ readonly max_cat_threshold: OptionType<IntegerType>;
1915
+ }>;
1916
+ /** LightGBM classifier as base model */
1917
+ readonly lightgbm: StructType<{
1918
+ readonly n_estimators: OptionType<IntegerType>;
1919
+ readonly max_depth: OptionType<IntegerType>;
1920
+ readonly learning_rate: OptionType<FloatType>;
1921
+ readonly num_leaves: OptionType<IntegerType>;
1922
+ readonly min_child_samples: OptionType<IntegerType>;
1923
+ readonly subsample: OptionType<FloatType>;
1924
+ readonly colsample_bytree: OptionType<FloatType>;
1925
+ readonly reg_alpha: OptionType<FloatType>;
1926
+ readonly reg_lambda: OptionType<FloatType>;
1927
+ readonly random_state: OptionType<IntegerType>;
1928
+ readonly n_jobs: OptionType<IntegerType>;
1929
+ }>;
1930
+ }>;
1931
+ /** Classification conformity score method (default: lac) */
1932
+ readonly method: OptionType<VariantType<{
1933
+ /** Least Ambiguous set-valued Classifier - smallest sets */
1934
+ readonly lac: NullType;
1935
+ /** Adaptive Prediction Sets - adapts to probabilities */
1936
+ readonly aps: NullType;
1937
+ }>>;
1938
+ /** Confidence level: coverage probability (default 0.9 = 90% coverage) */
1939
+ readonly confidence_level: OptionType<FloatType>;
1940
+ /** Random seed for reproducibility */
1941
+ readonly random_state: OptionType<IntegerType>;
1942
+ }>;
1943
+ readonly MAPIEBaseModelDataType: VariantType<{
1944
+ /** XGBoost-based model (cloudpickle serialized) */
1945
+ readonly xgboost: BlobType;
1946
+ /** LightGBM-based model (cloudpickle serialized) */
1947
+ readonly lightgbm: BlobType;
1948
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1949
+ readonly histogram: BlobType;
1950
+ }>;
1951
+ readonly MAPIERegressorBlobType: VariantType<{
1952
+ /** MAPIE regressor with split conformal */
1953
+ readonly mapie_split: StructType<{
1954
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1955
+ readonly data: VariantType<{
1956
+ /** XGBoost-based model (cloudpickle serialized) */
1957
+ readonly xgboost: BlobType;
1958
+ /** LightGBM-based model (cloudpickle serialized) */
1959
+ readonly lightgbm: BlobType;
1960
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1961
+ readonly histogram: BlobType;
1962
+ }>;
1963
+ /** Number of input features */
1964
+ readonly n_features: IntegerType;
1965
+ /** Confidence level used during calibration */
1966
+ readonly confidence_level: FloatType;
1967
+ }>;
1968
+ /** MAPIE regressor with cross conformal */
1969
+ readonly mapie_cross: StructType<{
1970
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
1971
+ readonly data: VariantType<{
1972
+ /** XGBoost-based model (cloudpickle serialized) */
1973
+ readonly xgboost: BlobType;
1974
+ /** LightGBM-based model (cloudpickle serialized) */
1975
+ readonly lightgbm: BlobType;
1976
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1977
+ readonly histogram: BlobType;
1978
+ }>;
1979
+ /** Number of input features */
1980
+ readonly n_features: IntegerType;
1981
+ /** Confidence level used during calibration */
1982
+ readonly confidence_level: FloatType;
1983
+ }>;
1984
+ /** MAPIE CQR regressor (uses HistGradientBoosting internally) */
1985
+ readonly mapie_cqr: StructType<{
1986
+ /** Serialized model - variant tag indicates base model type */
1987
+ readonly data: VariantType<{
1988
+ /** XGBoost-based model (cloudpickle serialized) */
1989
+ readonly xgboost: BlobType;
1990
+ /** LightGBM-based model (cloudpickle serialized) */
1991
+ readonly lightgbm: BlobType;
1992
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
1993
+ readonly histogram: BlobType;
1994
+ }>;
1995
+ /** Number of input features */
1996
+ readonly n_features: IntegerType;
1997
+ /** Confidence level used during calibration */
1998
+ readonly confidence_level: FloatType;
1999
+ }>;
2000
+ }>;
2001
+ readonly MAPIEClassifierBlobType: VariantType<{
2002
+ /** MAPIE classifier with split conformal */
2003
+ readonly mapie_classifier: StructType<{
2004
+ /** Serialized model - variant tag indicates base model type (xgboost/lightgbm) */
2005
+ readonly data: VariantType<{
2006
+ /** XGBoost-based model (cloudpickle serialized) */
2007
+ readonly xgboost: BlobType;
2008
+ /** LightGBM-based model (cloudpickle serialized) */
2009
+ readonly lightgbm: BlobType;
2010
+ /** Histogram-based model (sklearn HistGradientBoosting, used by CQR) */
2011
+ readonly histogram: BlobType;
2012
+ }>;
2013
+ /** Number of input features */
2014
+ readonly n_features: IntegerType;
2015
+ /** Number of classes */
2016
+ readonly n_classes: IntegerType;
2017
+ /** Class labels */
2018
+ readonly classes: ArrayType<IntegerType>;
2019
+ /** Confidence level used during calibration */
2020
+ readonly confidence_level: FloatType;
2021
+ }>;
2022
+ }>;
2023
+ readonly UncertaintyPredictorType: VariantType<{
2024
+ /** Predicts interval width (upper - lower) from MAPIE regressor */
2025
+ readonly mapie_interval_width: StructType<{
2026
+ readonly data: BlobType;
2027
+ readonly n_features: IntegerType;
2028
+ }>;
2029
+ /** Predicts prediction set size from MAPIE classifier */
2030
+ readonly mapie_set_size: StructType<{
2031
+ readonly data: BlobType;
2032
+ readonly n_features: IntegerType;
2033
+ }>;
2034
+ }>;
2035
+ readonly IntervalResultType: StructType<{
2036
+ /** Lower bound of prediction interval */
2037
+ readonly lower: ArrayType<FloatType>;
2038
+ /** Point prediction (median/mean) */
2039
+ readonly pred: ArrayType<FloatType>;
2040
+ /** Upper bound of prediction interval */
2041
+ readonly upper: ArrayType<FloatType>;
2042
+ }>;
2043
+ readonly PredictionSetResultType: StructType<{
2044
+ /** Predicted class (argmax of probabilities) */
2045
+ readonly pred: ArrayType<IntegerType>;
2046
+ /** Prediction set membership matrix (n_samples x n_classes, 1 if class in set) */
2047
+ readonly sets: ArrayType<ArrayType<IntegerType>>;
2048
+ /** Class probabilities (n_samples x n_classes) */
2049
+ readonly probabilities: ArrayType<ArrayType<FloatType>>;
2050
+ /** Size of each prediction set */
2051
+ readonly set_sizes: ArrayType<IntegerType>;
2052
+ }>;
2053
+ readonly VectorType: ArrayType<FloatType>;
2054
+ readonly MatrixType: ArrayType<ArrayType<FloatType>>;
2055
+ readonly LabelVectorType: ArrayType<IntegerType>;
2056
+ };
2057
+ };
2058
+ //# sourceMappingURL=mapie.d.ts.map