@elaraai/east-py-datascience 0.0.2-beta.8 → 0.0.2-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -1
- package/dist/src/alns/alns.d.ts +528 -0
- package/dist/src/alns/alns.d.ts.map +1 -0
- package/dist/src/alns/alns.js +238 -0
- package/dist/src/alns/alns.js.map +1 -0
- package/dist/src/google_or/google_or.d.ts +2422 -0
- package/dist/src/google_or/google_or.d.ts.map +1 -0
- package/dist/src/google_or/google_or.js +542 -0
- package/dist/src/google_or/google_or.js.map +1 -0
- package/dist/{gp → src/gp}/gp.d.ts +185 -136
- package/dist/src/gp/gp.d.ts.map +1 -0
- package/dist/{gp → src/gp}/gp.js +64 -12
- package/dist/src/gp/gp.js.map +1 -0
- package/dist/src/index.d.ts +34 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +57 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lightgbm/lightgbm.d.ts +575 -0
- package/dist/src/lightgbm/lightgbm.d.ts.map +1 -0
- package/dist/{lightgbm → src/lightgbm}/lightgbm.js +104 -18
- package/dist/src/lightgbm/lightgbm.js.map +1 -0
- package/dist/src/lightning/lightning.d.ts +1594 -0
- package/dist/src/lightning/lightning.d.ts.map +1 -0
- package/dist/src/lightning/lightning.js +468 -0
- package/dist/src/lightning/lightning.js.map +1 -0
- package/dist/{mads → src/mads}/mads.d.ts +109 -112
- package/dist/src/mads/mads.d.ts.map +1 -0
- package/dist/{mads → src/mads}/mads.js +6 -8
- package/dist/src/mads/mads.js.map +1 -0
- package/dist/src/mapie/mapie.d.ts +3680 -0
- package/dist/src/mapie/mapie.d.ts.map +1 -0
- package/dist/src/mapie/mapie.js +616 -0
- package/dist/src/mapie/mapie.js.map +1 -0
- package/dist/{ngboost → src/ngboost}/ngboost.d.ts +192 -142
- package/dist/src/ngboost/ngboost.d.ts.map +1 -0
- package/dist/{ngboost → src/ngboost}/ngboost.js +67 -14
- package/dist/src/ngboost/ngboost.js.map +1 -0
- package/dist/src/optimization/optimization.d.ts +420 -0
- package/dist/src/optimization/optimization.d.ts.map +1 -0
- package/dist/src/optimization/optimization.js +257 -0
- package/dist/src/optimization/optimization.js.map +1 -0
- package/dist/{optuna → src/optuna}/optuna.d.ts +374 -314
- package/dist/src/optuna/optuna.d.ts.map +1 -0
- package/dist/{optuna → src/optuna}/optuna.js +2 -0
- package/dist/src/optuna/optuna.js.map +1 -0
- package/dist/src/pymc/pymc.d.ts +2932 -0
- package/dist/src/pymc/pymc.d.ts.map +1 -0
- package/dist/src/pymc/pymc.js +688 -0
- package/dist/src/pymc/pymc.js.map +1 -0
- package/dist/src/scipy/scipy.d.ts +2205 -0
- package/dist/src/scipy/scipy.d.ts.map +1 -0
- package/dist/src/scipy/scipy.js +884 -0
- package/dist/src/scipy/scipy.js.map +1 -0
- package/dist/src/shap/shap.d.ts +2988 -0
- package/dist/src/shap/shap.d.ts.map +1 -0
- package/dist/src/shap/shap.js +500 -0
- package/dist/src/shap/shap.js.map +1 -0
- package/dist/{simanneal → src/simanneal}/simanneal.d.ts +257 -160
- package/dist/src/simanneal/simanneal.d.ts.map +1 -0
- package/dist/{simanneal → src/simanneal}/simanneal.js +105 -8
- package/dist/src/simanneal/simanneal.js.map +1 -0
- package/dist/src/simulation/simulation.d.ts +431 -0
- package/dist/src/simulation/simulation.d.ts.map +1 -0
- package/dist/src/simulation/simulation.js +306 -0
- package/dist/src/simulation/simulation.js.map +1 -0
- package/dist/src/sklearn/sklearn.d.ts +6362 -0
- package/dist/src/sklearn/sklearn.d.ts.map +1 -0
- package/dist/src/sklearn/sklearn.js +1508 -0
- package/dist/src/sklearn/sklearn.js.map +1 -0
- package/dist/src/torch/torch.d.ts +1205 -0
- package/dist/src/torch/torch.d.ts.map +1 -0
- package/dist/{torch → src/torch}/torch.js +109 -18
- package/dist/src/torch/torch.js.map +1 -0
- package/dist/src/types.d.ts +43 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +44 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/xgboost/xgboost.d.ts +1424 -0
- package/dist/src/xgboost/xgboost.d.ts.map +1 -0
- package/dist/src/xgboost/xgboost.js +432 -0
- package/dist/src/xgboost/xgboost.js.map +1 -0
- package/package.json +12 -12
- package/dist/gp/gp.d.ts.map +0 -1
- package/dist/gp/gp.js.map +0 -1
- package/dist/index.d.ts +0 -27
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -41
- package/dist/index.js.map +0 -1
- package/dist/lightgbm/lightgbm.d.ts +0 -494
- package/dist/lightgbm/lightgbm.d.ts.map +0 -1
- package/dist/lightgbm/lightgbm.js.map +0 -1
- package/dist/mads/mads.d.ts.map +0 -1
- package/dist/mads/mads.js.map +0 -1
- package/dist/ngboost/ngboost.d.ts.map +0 -1
- package/dist/ngboost/ngboost.js.map +0 -1
- package/dist/optuna/optuna.d.ts.map +0 -1
- package/dist/optuna/optuna.js.map +0 -1
- package/dist/scipy/scipy.d.ts +0 -1260
- package/dist/scipy/scipy.d.ts.map +0 -1
- package/dist/scipy/scipy.js +0 -413
- package/dist/scipy/scipy.js.map +0 -1
- package/dist/shap/shap.d.ts +0 -657
- package/dist/shap/shap.d.ts.map +0 -1
- package/dist/shap/shap.js +0 -241
- package/dist/shap/shap.js.map +0 -1
- package/dist/simanneal/simanneal.d.ts.map +0 -1
- package/dist/simanneal/simanneal.js.map +0 -1
- package/dist/sklearn/sklearn.d.ts +0 -2691
- package/dist/sklearn/sklearn.d.ts.map +0 -1
- package/dist/sklearn/sklearn.js +0 -524
- package/dist/sklearn/sklearn.js.map +0 -1
- package/dist/torch/torch.d.ts +0 -1081
- package/dist/torch/torch.d.ts.map +0 -1
- package/dist/torch/torch.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types.d.ts +0 -80
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -81
- package/dist/types.js.map +0 -1
- package/dist/xgboost/xgboost.d.ts +0 -504
- package/dist/xgboost/xgboost.d.ts.map +0 -1
- package/dist/xgboost/xgboost.js +0 -177
- package/dist/xgboost/xgboost.js.map +0 -1
|
@@ -0,0 +1,2988 @@
|
|
|
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
|
+
* SHAP platform functions for East.
|
|
7
|
+
*
|
|
8
|
+
* Provides model-agnostic feature importance and explainability using SHAP values.
|
|
9
|
+
* Uses cloudpickle for explainer serialization.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
import { StructType, VariantType, OptionType, IntegerType, FloatType, StringType, ArrayType, BlobType, NullType } from "@elaraai/east";
|
|
14
|
+
import { VectorType, MatrixType } from "../types.js";
|
|
15
|
+
export { VectorType, MatrixType } from "../types.js";
|
|
16
|
+
/** String vector type for feature names */
|
|
17
|
+
export declare const StringVectorType: ArrayType<StringType>;
|
|
18
|
+
/**
|
|
19
|
+
* SHAP values type - variant for 2D (regression/binary) or 3D (multi-class).
|
|
20
|
+
*/
|
|
21
|
+
export declare const ShapValuesType: VariantType<{
|
|
22
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
23
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
24
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
25
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Base value type - variant for single (regression/binary) or per-class (multi-class).
|
|
29
|
+
*/
|
|
30
|
+
export declare const ShapBaseValueType: VariantType<{
|
|
31
|
+
/** Single base value for regression or binary classification */
|
|
32
|
+
readonly single: FloatType;
|
|
33
|
+
/** Per-class base values for multi-class classification */
|
|
34
|
+
readonly per_class: VectorType<FloatType>;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Result type for SHAP value computation.
|
|
38
|
+
*/
|
|
39
|
+
export declare const ShapResultType: StructType<{
|
|
40
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
41
|
+
readonly shap_values: VariantType<{
|
|
42
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
43
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
44
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
45
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
46
|
+
}>;
|
|
47
|
+
/** Base value(s) - single float or per-class array */
|
|
48
|
+
readonly base_value: VariantType<{
|
|
49
|
+
/** Single base value for regression or binary classification */
|
|
50
|
+
readonly single: FloatType;
|
|
51
|
+
/** Per-class base values for multi-class classification */
|
|
52
|
+
readonly per_class: VectorType<FloatType>;
|
|
53
|
+
}>;
|
|
54
|
+
/** Feature names */
|
|
55
|
+
readonly feature_names: ArrayType<StringType>;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Result type for feature importance.
|
|
59
|
+
*/
|
|
60
|
+
export declare const FeatureImportanceType: StructType<{
|
|
61
|
+
/** Feature names */
|
|
62
|
+
readonly feature_names: ArrayType<StringType>;
|
|
63
|
+
/** Mean absolute SHAP value for each feature */
|
|
64
|
+
readonly importances: VectorType<FloatType>;
|
|
65
|
+
/** Standard deviation of absolute SHAP values */
|
|
66
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Model blob type for serialized SHAP explainers.
|
|
70
|
+
*/
|
|
71
|
+
export declare const ShapModelBlobType: VariantType<{
|
|
72
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
73
|
+
readonly shap_tree_explainer: StructType<{
|
|
74
|
+
/** Cloudpickle serialized explainer */
|
|
75
|
+
readonly data: BlobType;
|
|
76
|
+
/** Number of input features */
|
|
77
|
+
readonly n_features: IntegerType;
|
|
78
|
+
}>;
|
|
79
|
+
/** SHAP KernelExplainer for any model */
|
|
80
|
+
readonly shap_kernel_explainer: StructType<{
|
|
81
|
+
/** Cloudpickle serialized explainer */
|
|
82
|
+
readonly data: BlobType;
|
|
83
|
+
/** Number of input features */
|
|
84
|
+
readonly n_features: IntegerType;
|
|
85
|
+
}>;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Tree-based model blob type - accepts XGBoost models and MAPIE wrappers with XGBoost.
|
|
89
|
+
* Note: LightGBM is not supported for TreeExplainer due to SHAP compatibility issues.
|
|
90
|
+
* Use KernelExplainer for LightGBM models.
|
|
91
|
+
*/
|
|
92
|
+
export declare const TreeModelBlobType: VariantType<{
|
|
93
|
+
/** XGBoost regressor */
|
|
94
|
+
readonly xgboost_regressor: StructType<{
|
|
95
|
+
readonly data: BlobType;
|
|
96
|
+
readonly n_features: IntegerType;
|
|
97
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
98
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
99
|
+
}>;
|
|
100
|
+
/** XGBoost classifier */
|
|
101
|
+
readonly xgboost_classifier: StructType<{
|
|
102
|
+
readonly data: BlobType;
|
|
103
|
+
readonly n_features: IntegerType;
|
|
104
|
+
readonly n_classes: IntegerType;
|
|
105
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
106
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
107
|
+
}>;
|
|
108
|
+
/** XGBoost quantile regressor (uses median quantile for explanations) */
|
|
109
|
+
readonly xgboost_quantile: StructType<{
|
|
110
|
+
readonly data: BlobType;
|
|
111
|
+
readonly quantiles: VectorType<FloatType>;
|
|
112
|
+
readonly n_features: IntegerType;
|
|
113
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
114
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
115
|
+
}>;
|
|
116
|
+
/** MAPIE split conformal regressor with XGBoost base */
|
|
117
|
+
readonly mapie_split: StructType<{
|
|
118
|
+
readonly data: VariantType<{
|
|
119
|
+
readonly xgboost: VariantType<{
|
|
120
|
+
readonly xgboost_regressor: StructType<{
|
|
121
|
+
readonly data: BlobType;
|
|
122
|
+
readonly n_features: IntegerType;
|
|
123
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
124
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
125
|
+
}>;
|
|
126
|
+
readonly xgboost_classifier: StructType<{
|
|
127
|
+
readonly data: BlobType;
|
|
128
|
+
readonly n_features: IntegerType;
|
|
129
|
+
readonly n_classes: IntegerType;
|
|
130
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
131
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
132
|
+
}>;
|
|
133
|
+
readonly xgboost_quantile: StructType<{
|
|
134
|
+
readonly data: BlobType;
|
|
135
|
+
readonly quantiles: VectorType<FloatType>;
|
|
136
|
+
readonly n_features: IntegerType;
|
|
137
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
138
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
139
|
+
}>;
|
|
140
|
+
}>;
|
|
141
|
+
readonly lightgbm: VariantType<{
|
|
142
|
+
readonly lightgbm_regressor: StructType<{
|
|
143
|
+
readonly data: BlobType;
|
|
144
|
+
readonly n_features: IntegerType;
|
|
145
|
+
}>;
|
|
146
|
+
readonly lightgbm_classifier: StructType<{
|
|
147
|
+
readonly data: BlobType;
|
|
148
|
+
readonly n_features: IntegerType;
|
|
149
|
+
readonly n_classes: IntegerType;
|
|
150
|
+
}>;
|
|
151
|
+
}>;
|
|
152
|
+
readonly histogram: BlobType;
|
|
153
|
+
}>;
|
|
154
|
+
readonly n_features: IntegerType;
|
|
155
|
+
readonly confidence_level: FloatType;
|
|
156
|
+
}>;
|
|
157
|
+
/** MAPIE cross conformal regressor with XGBoost base */
|
|
158
|
+
readonly mapie_cross: StructType<{
|
|
159
|
+
readonly data: VariantType<{
|
|
160
|
+
readonly xgboost: VariantType<{
|
|
161
|
+
readonly xgboost_regressor: StructType<{
|
|
162
|
+
readonly data: BlobType;
|
|
163
|
+
readonly n_features: IntegerType;
|
|
164
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
165
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
166
|
+
}>;
|
|
167
|
+
readonly xgboost_classifier: StructType<{
|
|
168
|
+
readonly data: BlobType;
|
|
169
|
+
readonly n_features: IntegerType;
|
|
170
|
+
readonly n_classes: IntegerType;
|
|
171
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
172
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
173
|
+
}>;
|
|
174
|
+
readonly xgboost_quantile: StructType<{
|
|
175
|
+
readonly data: BlobType;
|
|
176
|
+
readonly quantiles: VectorType<FloatType>;
|
|
177
|
+
readonly n_features: IntegerType;
|
|
178
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
179
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
180
|
+
}>;
|
|
181
|
+
}>;
|
|
182
|
+
readonly lightgbm: VariantType<{
|
|
183
|
+
readonly lightgbm_regressor: StructType<{
|
|
184
|
+
readonly data: BlobType;
|
|
185
|
+
readonly n_features: IntegerType;
|
|
186
|
+
}>;
|
|
187
|
+
readonly lightgbm_classifier: StructType<{
|
|
188
|
+
readonly data: BlobType;
|
|
189
|
+
readonly n_features: IntegerType;
|
|
190
|
+
readonly n_classes: IntegerType;
|
|
191
|
+
}>;
|
|
192
|
+
}>;
|
|
193
|
+
readonly histogram: BlobType;
|
|
194
|
+
}>;
|
|
195
|
+
readonly n_features: IntegerType;
|
|
196
|
+
readonly confidence_level: FloatType;
|
|
197
|
+
}>;
|
|
198
|
+
/** MAPIE CQR conformal regressor with XGBoost base */
|
|
199
|
+
readonly mapie_cqr: StructType<{
|
|
200
|
+
readonly data: VariantType<{
|
|
201
|
+
readonly xgboost: VariantType<{
|
|
202
|
+
readonly xgboost_regressor: StructType<{
|
|
203
|
+
readonly data: BlobType;
|
|
204
|
+
readonly n_features: IntegerType;
|
|
205
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
206
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
207
|
+
}>;
|
|
208
|
+
readonly xgboost_classifier: StructType<{
|
|
209
|
+
readonly data: BlobType;
|
|
210
|
+
readonly n_features: IntegerType;
|
|
211
|
+
readonly n_classes: IntegerType;
|
|
212
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
213
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
214
|
+
}>;
|
|
215
|
+
readonly xgboost_quantile: StructType<{
|
|
216
|
+
readonly data: BlobType;
|
|
217
|
+
readonly quantiles: VectorType<FloatType>;
|
|
218
|
+
readonly n_features: IntegerType;
|
|
219
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
220
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
221
|
+
}>;
|
|
222
|
+
}>;
|
|
223
|
+
readonly lightgbm: VariantType<{
|
|
224
|
+
readonly lightgbm_regressor: StructType<{
|
|
225
|
+
readonly data: BlobType;
|
|
226
|
+
readonly n_features: IntegerType;
|
|
227
|
+
}>;
|
|
228
|
+
readonly lightgbm_classifier: StructType<{
|
|
229
|
+
readonly data: BlobType;
|
|
230
|
+
readonly n_features: IntegerType;
|
|
231
|
+
readonly n_classes: IntegerType;
|
|
232
|
+
}>;
|
|
233
|
+
}>;
|
|
234
|
+
readonly histogram: BlobType;
|
|
235
|
+
}>;
|
|
236
|
+
readonly n_features: IntegerType;
|
|
237
|
+
readonly confidence_level: FloatType;
|
|
238
|
+
}>;
|
|
239
|
+
/** MAPIE conformal classifier with XGBoost base */
|
|
240
|
+
readonly mapie_classifier: StructType<{
|
|
241
|
+
readonly data: VariantType<{
|
|
242
|
+
readonly xgboost: VariantType<{
|
|
243
|
+
readonly xgboost_regressor: StructType<{
|
|
244
|
+
readonly data: BlobType;
|
|
245
|
+
readonly n_features: IntegerType;
|
|
246
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
247
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
248
|
+
}>;
|
|
249
|
+
readonly xgboost_classifier: StructType<{
|
|
250
|
+
readonly data: BlobType;
|
|
251
|
+
readonly n_features: IntegerType;
|
|
252
|
+
readonly n_classes: IntegerType;
|
|
253
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
254
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
255
|
+
}>;
|
|
256
|
+
readonly xgboost_quantile: StructType<{
|
|
257
|
+
readonly data: BlobType;
|
|
258
|
+
readonly quantiles: VectorType<FloatType>;
|
|
259
|
+
readonly n_features: IntegerType;
|
|
260
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
261
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
262
|
+
}>;
|
|
263
|
+
}>;
|
|
264
|
+
readonly lightgbm: VariantType<{
|
|
265
|
+
readonly lightgbm_regressor: StructType<{
|
|
266
|
+
readonly data: BlobType;
|
|
267
|
+
readonly n_features: IntegerType;
|
|
268
|
+
}>;
|
|
269
|
+
readonly lightgbm_classifier: StructType<{
|
|
270
|
+
readonly data: BlobType;
|
|
271
|
+
readonly n_features: IntegerType;
|
|
272
|
+
readonly n_classes: IntegerType;
|
|
273
|
+
}>;
|
|
274
|
+
}>;
|
|
275
|
+
readonly histogram: BlobType;
|
|
276
|
+
}>;
|
|
277
|
+
readonly n_features: IntegerType;
|
|
278
|
+
readonly n_classes: IntegerType;
|
|
279
|
+
readonly classes: VectorType<IntegerType>;
|
|
280
|
+
readonly confidence_level: FloatType;
|
|
281
|
+
}>;
|
|
282
|
+
}>;
|
|
283
|
+
/**
|
|
284
|
+
* Any model blob type - accepts any model for kernel explainer.
|
|
285
|
+
* Includes all tree-based models plus NGBoost, GP, Torch, and sklearn models.
|
|
286
|
+
*/
|
|
287
|
+
export declare const AnyModelBlobType: VariantType<{
|
|
288
|
+
readonly xgboost_regressor: StructType<{
|
|
289
|
+
readonly data: BlobType;
|
|
290
|
+
readonly n_features: IntegerType;
|
|
291
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
292
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
293
|
+
}>;
|
|
294
|
+
readonly xgboost_classifier: StructType<{
|
|
295
|
+
readonly data: BlobType;
|
|
296
|
+
readonly n_features: IntegerType;
|
|
297
|
+
readonly n_classes: IntegerType;
|
|
298
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
299
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
300
|
+
}>;
|
|
301
|
+
readonly xgboost_quantile: StructType<{
|
|
302
|
+
readonly data: BlobType;
|
|
303
|
+
readonly quantiles: VectorType<FloatType>;
|
|
304
|
+
readonly n_features: IntegerType;
|
|
305
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
306
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
307
|
+
}>;
|
|
308
|
+
readonly lightgbm_regressor: StructType<{
|
|
309
|
+
readonly data: BlobType;
|
|
310
|
+
readonly n_features: IntegerType;
|
|
311
|
+
}>;
|
|
312
|
+
readonly lightgbm_classifier: StructType<{
|
|
313
|
+
readonly data: BlobType;
|
|
314
|
+
readonly n_features: IntegerType;
|
|
315
|
+
readonly n_classes: IntegerType;
|
|
316
|
+
}>;
|
|
317
|
+
readonly ngboost_regressor: StructType<{
|
|
318
|
+
readonly data: BlobType;
|
|
319
|
+
readonly distribution: VariantType<{
|
|
320
|
+
readonly normal: NullType;
|
|
321
|
+
readonly lognormal: NullType;
|
|
322
|
+
}>;
|
|
323
|
+
readonly n_features: IntegerType;
|
|
324
|
+
}>;
|
|
325
|
+
readonly gp_regressor: StructType<{
|
|
326
|
+
readonly data: BlobType;
|
|
327
|
+
readonly n_features: IntegerType;
|
|
328
|
+
readonly kernel_type: StringType;
|
|
329
|
+
}>;
|
|
330
|
+
readonly torch_mlp: StructType<{
|
|
331
|
+
readonly data: BlobType;
|
|
332
|
+
readonly n_features: IntegerType;
|
|
333
|
+
readonly hidden_layers: ArrayType<IntegerType>;
|
|
334
|
+
readonly output_dim: IntegerType;
|
|
335
|
+
}>;
|
|
336
|
+
readonly standard_scaler: StructType<{
|
|
337
|
+
readonly onnx: BlobType;
|
|
338
|
+
readonly n_features: IntegerType;
|
|
339
|
+
}>;
|
|
340
|
+
readonly min_max_scaler: StructType<{
|
|
341
|
+
readonly onnx: BlobType;
|
|
342
|
+
readonly n_features: IntegerType;
|
|
343
|
+
}>;
|
|
344
|
+
readonly robust_scaler: StructType<{
|
|
345
|
+
readonly onnx: BlobType;
|
|
346
|
+
readonly n_features: IntegerType;
|
|
347
|
+
}>;
|
|
348
|
+
readonly label_encoder: StructType<{
|
|
349
|
+
readonly data: BlobType;
|
|
350
|
+
readonly n_classes: IntegerType;
|
|
351
|
+
}>;
|
|
352
|
+
readonly ordinal_encoder: StructType<{
|
|
353
|
+
readonly data: BlobType;
|
|
354
|
+
readonly n_features: IntegerType;
|
|
355
|
+
}>;
|
|
356
|
+
readonly gaussian_mixture: StructType<{
|
|
357
|
+
readonly data: BlobType;
|
|
358
|
+
readonly n_features: IntegerType;
|
|
359
|
+
readonly n_components: IntegerType;
|
|
360
|
+
}>;
|
|
361
|
+
readonly regressor_chain: StructType<{
|
|
362
|
+
readonly data: BlobType;
|
|
363
|
+
readonly n_features: IntegerType;
|
|
364
|
+
readonly n_targets: IntegerType;
|
|
365
|
+
readonly base_estimator_type: StringType;
|
|
366
|
+
}>;
|
|
367
|
+
readonly mapie_split: StructType<{
|
|
368
|
+
readonly data: VariantType<{
|
|
369
|
+
readonly xgboost: VariantType<{
|
|
370
|
+
readonly xgboost_regressor: StructType<{
|
|
371
|
+
readonly data: BlobType;
|
|
372
|
+
readonly n_features: IntegerType;
|
|
373
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
374
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
375
|
+
}>;
|
|
376
|
+
readonly xgboost_classifier: StructType<{
|
|
377
|
+
readonly data: BlobType;
|
|
378
|
+
readonly n_features: IntegerType;
|
|
379
|
+
readonly n_classes: IntegerType;
|
|
380
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
381
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
382
|
+
}>;
|
|
383
|
+
readonly xgboost_quantile: StructType<{
|
|
384
|
+
readonly data: BlobType;
|
|
385
|
+
readonly quantiles: VectorType<FloatType>;
|
|
386
|
+
readonly n_features: IntegerType;
|
|
387
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
388
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
389
|
+
}>;
|
|
390
|
+
}>;
|
|
391
|
+
readonly lightgbm: VariantType<{
|
|
392
|
+
readonly lightgbm_regressor: StructType<{
|
|
393
|
+
readonly data: BlobType;
|
|
394
|
+
readonly n_features: IntegerType;
|
|
395
|
+
}>;
|
|
396
|
+
readonly lightgbm_classifier: StructType<{
|
|
397
|
+
readonly data: BlobType;
|
|
398
|
+
readonly n_features: IntegerType;
|
|
399
|
+
readonly n_classes: IntegerType;
|
|
400
|
+
}>;
|
|
401
|
+
}>;
|
|
402
|
+
readonly histogram: BlobType;
|
|
403
|
+
}>;
|
|
404
|
+
readonly n_features: IntegerType;
|
|
405
|
+
readonly confidence_level: FloatType;
|
|
406
|
+
}>;
|
|
407
|
+
readonly mapie_cross: StructType<{
|
|
408
|
+
readonly data: VariantType<{
|
|
409
|
+
readonly xgboost: VariantType<{
|
|
410
|
+
readonly xgboost_regressor: StructType<{
|
|
411
|
+
readonly data: BlobType;
|
|
412
|
+
readonly n_features: IntegerType;
|
|
413
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
414
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
415
|
+
}>;
|
|
416
|
+
readonly xgboost_classifier: StructType<{
|
|
417
|
+
readonly data: BlobType;
|
|
418
|
+
readonly n_features: IntegerType;
|
|
419
|
+
readonly n_classes: IntegerType;
|
|
420
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
421
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
422
|
+
}>;
|
|
423
|
+
readonly xgboost_quantile: StructType<{
|
|
424
|
+
readonly data: BlobType;
|
|
425
|
+
readonly quantiles: VectorType<FloatType>;
|
|
426
|
+
readonly n_features: IntegerType;
|
|
427
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
428
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
429
|
+
}>;
|
|
430
|
+
}>;
|
|
431
|
+
readonly lightgbm: VariantType<{
|
|
432
|
+
readonly lightgbm_regressor: StructType<{
|
|
433
|
+
readonly data: BlobType;
|
|
434
|
+
readonly n_features: IntegerType;
|
|
435
|
+
}>;
|
|
436
|
+
readonly lightgbm_classifier: StructType<{
|
|
437
|
+
readonly data: BlobType;
|
|
438
|
+
readonly n_features: IntegerType;
|
|
439
|
+
readonly n_classes: IntegerType;
|
|
440
|
+
}>;
|
|
441
|
+
}>;
|
|
442
|
+
readonly histogram: BlobType;
|
|
443
|
+
}>;
|
|
444
|
+
readonly n_features: IntegerType;
|
|
445
|
+
readonly confidence_level: FloatType;
|
|
446
|
+
}>;
|
|
447
|
+
readonly mapie_cqr: StructType<{
|
|
448
|
+
readonly data: VariantType<{
|
|
449
|
+
readonly xgboost: VariantType<{
|
|
450
|
+
readonly xgboost_regressor: StructType<{
|
|
451
|
+
readonly data: BlobType;
|
|
452
|
+
readonly n_features: IntegerType;
|
|
453
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
454
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
455
|
+
}>;
|
|
456
|
+
readonly xgboost_classifier: StructType<{
|
|
457
|
+
readonly data: BlobType;
|
|
458
|
+
readonly n_features: IntegerType;
|
|
459
|
+
readonly n_classes: IntegerType;
|
|
460
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
461
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
462
|
+
}>;
|
|
463
|
+
readonly xgboost_quantile: StructType<{
|
|
464
|
+
readonly data: BlobType;
|
|
465
|
+
readonly quantiles: VectorType<FloatType>;
|
|
466
|
+
readonly n_features: IntegerType;
|
|
467
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
468
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
469
|
+
}>;
|
|
470
|
+
}>;
|
|
471
|
+
readonly lightgbm: VariantType<{
|
|
472
|
+
readonly lightgbm_regressor: StructType<{
|
|
473
|
+
readonly data: BlobType;
|
|
474
|
+
readonly n_features: IntegerType;
|
|
475
|
+
}>;
|
|
476
|
+
readonly lightgbm_classifier: StructType<{
|
|
477
|
+
readonly data: BlobType;
|
|
478
|
+
readonly n_features: IntegerType;
|
|
479
|
+
readonly n_classes: IntegerType;
|
|
480
|
+
}>;
|
|
481
|
+
}>;
|
|
482
|
+
readonly histogram: BlobType;
|
|
483
|
+
}>;
|
|
484
|
+
readonly n_features: IntegerType;
|
|
485
|
+
readonly confidence_level: FloatType;
|
|
486
|
+
}>;
|
|
487
|
+
readonly mapie_classifier: StructType<{
|
|
488
|
+
readonly data: VariantType<{
|
|
489
|
+
readonly xgboost: VariantType<{
|
|
490
|
+
readonly xgboost_regressor: StructType<{
|
|
491
|
+
readonly data: BlobType;
|
|
492
|
+
readonly n_features: IntegerType;
|
|
493
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
494
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
495
|
+
}>;
|
|
496
|
+
readonly xgboost_classifier: StructType<{
|
|
497
|
+
readonly data: BlobType;
|
|
498
|
+
readonly n_features: IntegerType;
|
|
499
|
+
readonly n_classes: IntegerType;
|
|
500
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
501
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
502
|
+
}>;
|
|
503
|
+
readonly xgboost_quantile: StructType<{
|
|
504
|
+
readonly data: BlobType;
|
|
505
|
+
readonly quantiles: VectorType<FloatType>;
|
|
506
|
+
readonly n_features: IntegerType;
|
|
507
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
508
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
509
|
+
}>;
|
|
510
|
+
}>;
|
|
511
|
+
readonly lightgbm: VariantType<{
|
|
512
|
+
readonly lightgbm_regressor: StructType<{
|
|
513
|
+
readonly data: BlobType;
|
|
514
|
+
readonly n_features: IntegerType;
|
|
515
|
+
}>;
|
|
516
|
+
readonly lightgbm_classifier: StructType<{
|
|
517
|
+
readonly data: BlobType;
|
|
518
|
+
readonly n_features: IntegerType;
|
|
519
|
+
readonly n_classes: IntegerType;
|
|
520
|
+
}>;
|
|
521
|
+
}>;
|
|
522
|
+
readonly histogram: BlobType;
|
|
523
|
+
}>;
|
|
524
|
+
readonly n_features: IntegerType;
|
|
525
|
+
readonly n_classes: IntegerType;
|
|
526
|
+
readonly classes: VectorType<IntegerType>;
|
|
527
|
+
readonly confidence_level: FloatType;
|
|
528
|
+
}>;
|
|
529
|
+
readonly mapie_interval_width: StructType<{
|
|
530
|
+
readonly data: BlobType;
|
|
531
|
+
readonly n_features: IntegerType;
|
|
532
|
+
}>;
|
|
533
|
+
readonly mapie_set_size: StructType<{
|
|
534
|
+
readonly data: BlobType;
|
|
535
|
+
readonly n_features: IntegerType;
|
|
536
|
+
}>;
|
|
537
|
+
}>;
|
|
538
|
+
export { MAPIEBaseModelDataType } from "../mapie/mapie.js";
|
|
539
|
+
/**
|
|
540
|
+
* MAPIE regressor model blob type for SHAP.
|
|
541
|
+
* Accepts split, cross, or CQR conformal regressors.
|
|
542
|
+
* Must match MAPIERegressorBlobType from mapie.ts.
|
|
543
|
+
*/
|
|
544
|
+
export declare const MAPIERegressorBlobType: VariantType<{
|
|
545
|
+
readonly mapie_split: StructType<{
|
|
546
|
+
readonly data: VariantType<{
|
|
547
|
+
readonly xgboost: VariantType<{
|
|
548
|
+
readonly xgboost_regressor: StructType<{
|
|
549
|
+
readonly data: BlobType;
|
|
550
|
+
readonly n_features: IntegerType;
|
|
551
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
552
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
553
|
+
}>;
|
|
554
|
+
readonly xgboost_classifier: StructType<{
|
|
555
|
+
readonly data: BlobType;
|
|
556
|
+
readonly n_features: IntegerType;
|
|
557
|
+
readonly n_classes: IntegerType;
|
|
558
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
559
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
560
|
+
}>;
|
|
561
|
+
readonly xgboost_quantile: StructType<{
|
|
562
|
+
readonly data: BlobType;
|
|
563
|
+
readonly quantiles: VectorType<FloatType>;
|
|
564
|
+
readonly n_features: IntegerType;
|
|
565
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
566
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
567
|
+
}>;
|
|
568
|
+
}>;
|
|
569
|
+
readonly lightgbm: VariantType<{
|
|
570
|
+
readonly lightgbm_regressor: StructType<{
|
|
571
|
+
readonly data: BlobType;
|
|
572
|
+
readonly n_features: IntegerType;
|
|
573
|
+
}>;
|
|
574
|
+
readonly lightgbm_classifier: StructType<{
|
|
575
|
+
readonly data: BlobType;
|
|
576
|
+
readonly n_features: IntegerType;
|
|
577
|
+
readonly n_classes: IntegerType;
|
|
578
|
+
}>;
|
|
579
|
+
}>;
|
|
580
|
+
readonly histogram: BlobType;
|
|
581
|
+
}>;
|
|
582
|
+
readonly n_features: IntegerType;
|
|
583
|
+
readonly confidence_level: FloatType;
|
|
584
|
+
}>;
|
|
585
|
+
readonly mapie_cross: StructType<{
|
|
586
|
+
readonly data: VariantType<{
|
|
587
|
+
readonly xgboost: VariantType<{
|
|
588
|
+
readonly xgboost_regressor: StructType<{
|
|
589
|
+
readonly data: BlobType;
|
|
590
|
+
readonly n_features: IntegerType;
|
|
591
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
592
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
593
|
+
}>;
|
|
594
|
+
readonly xgboost_classifier: StructType<{
|
|
595
|
+
readonly data: BlobType;
|
|
596
|
+
readonly n_features: IntegerType;
|
|
597
|
+
readonly n_classes: IntegerType;
|
|
598
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
599
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
600
|
+
}>;
|
|
601
|
+
readonly xgboost_quantile: StructType<{
|
|
602
|
+
readonly data: BlobType;
|
|
603
|
+
readonly quantiles: VectorType<FloatType>;
|
|
604
|
+
readonly n_features: IntegerType;
|
|
605
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
606
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
607
|
+
}>;
|
|
608
|
+
}>;
|
|
609
|
+
readonly lightgbm: VariantType<{
|
|
610
|
+
readonly lightgbm_regressor: StructType<{
|
|
611
|
+
readonly data: BlobType;
|
|
612
|
+
readonly n_features: IntegerType;
|
|
613
|
+
}>;
|
|
614
|
+
readonly lightgbm_classifier: StructType<{
|
|
615
|
+
readonly data: BlobType;
|
|
616
|
+
readonly n_features: IntegerType;
|
|
617
|
+
readonly n_classes: IntegerType;
|
|
618
|
+
}>;
|
|
619
|
+
}>;
|
|
620
|
+
readonly histogram: BlobType;
|
|
621
|
+
}>;
|
|
622
|
+
readonly n_features: IntegerType;
|
|
623
|
+
readonly confidence_level: FloatType;
|
|
624
|
+
}>;
|
|
625
|
+
readonly mapie_cqr: StructType<{
|
|
626
|
+
readonly data: VariantType<{
|
|
627
|
+
readonly xgboost: VariantType<{
|
|
628
|
+
readonly xgboost_regressor: StructType<{
|
|
629
|
+
readonly data: BlobType;
|
|
630
|
+
readonly n_features: IntegerType;
|
|
631
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
632
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
633
|
+
}>;
|
|
634
|
+
readonly xgboost_classifier: StructType<{
|
|
635
|
+
readonly data: BlobType;
|
|
636
|
+
readonly n_features: IntegerType;
|
|
637
|
+
readonly n_classes: IntegerType;
|
|
638
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
639
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
640
|
+
}>;
|
|
641
|
+
readonly xgboost_quantile: StructType<{
|
|
642
|
+
readonly data: BlobType;
|
|
643
|
+
readonly quantiles: VectorType<FloatType>;
|
|
644
|
+
readonly n_features: IntegerType;
|
|
645
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
646
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
647
|
+
}>;
|
|
648
|
+
}>;
|
|
649
|
+
readonly lightgbm: VariantType<{
|
|
650
|
+
readonly lightgbm_regressor: StructType<{
|
|
651
|
+
readonly data: BlobType;
|
|
652
|
+
readonly n_features: IntegerType;
|
|
653
|
+
}>;
|
|
654
|
+
readonly lightgbm_classifier: StructType<{
|
|
655
|
+
readonly data: BlobType;
|
|
656
|
+
readonly n_features: IntegerType;
|
|
657
|
+
readonly n_classes: IntegerType;
|
|
658
|
+
}>;
|
|
659
|
+
}>;
|
|
660
|
+
readonly histogram: BlobType;
|
|
661
|
+
}>;
|
|
662
|
+
readonly n_features: IntegerType;
|
|
663
|
+
readonly confidence_level: FloatType;
|
|
664
|
+
}>;
|
|
665
|
+
}>;
|
|
666
|
+
/**
|
|
667
|
+
* MAPIE classifier model blob type for SHAP.
|
|
668
|
+
* Must match MAPIEClassifierBlobType from mapie.ts.
|
|
669
|
+
*/
|
|
670
|
+
export declare const MAPIEClassifierBlobType: StructType<{
|
|
671
|
+
readonly data: VariantType<{
|
|
672
|
+
readonly xgboost: VariantType<{
|
|
673
|
+
readonly xgboost_regressor: StructType<{
|
|
674
|
+
readonly data: BlobType;
|
|
675
|
+
readonly n_features: IntegerType;
|
|
676
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
677
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
678
|
+
}>;
|
|
679
|
+
readonly xgboost_classifier: StructType<{
|
|
680
|
+
readonly data: BlobType;
|
|
681
|
+
readonly n_features: IntegerType;
|
|
682
|
+
readonly n_classes: IntegerType;
|
|
683
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
684
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
685
|
+
}>;
|
|
686
|
+
readonly xgboost_quantile: StructType<{
|
|
687
|
+
readonly data: BlobType;
|
|
688
|
+
readonly quantiles: VectorType<FloatType>;
|
|
689
|
+
readonly n_features: IntegerType;
|
|
690
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
691
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
692
|
+
}>;
|
|
693
|
+
}>;
|
|
694
|
+
readonly lightgbm: VariantType<{
|
|
695
|
+
readonly lightgbm_regressor: StructType<{
|
|
696
|
+
readonly data: BlobType;
|
|
697
|
+
readonly n_features: IntegerType;
|
|
698
|
+
}>;
|
|
699
|
+
readonly lightgbm_classifier: StructType<{
|
|
700
|
+
readonly data: BlobType;
|
|
701
|
+
readonly n_features: IntegerType;
|
|
702
|
+
readonly n_classes: IntegerType;
|
|
703
|
+
}>;
|
|
704
|
+
}>;
|
|
705
|
+
readonly histogram: BlobType;
|
|
706
|
+
}>;
|
|
707
|
+
readonly n_features: IntegerType;
|
|
708
|
+
readonly n_classes: IntegerType;
|
|
709
|
+
readonly classes: VectorType<IntegerType>;
|
|
710
|
+
readonly confidence_level: FloatType;
|
|
711
|
+
}>;
|
|
712
|
+
/**
|
|
713
|
+
* SHAP result for MAPIE regressors.
|
|
714
|
+
* Contains explanations for both point prediction and uncertainty (interval width).
|
|
715
|
+
*/
|
|
716
|
+
export declare const MapieRegressorShapResultType: StructType<{
|
|
717
|
+
/** SHAP values for point prediction (what drives the predicted value) */
|
|
718
|
+
readonly point_prediction: StructType<{
|
|
719
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
720
|
+
readonly shap_values: VariantType<{
|
|
721
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
722
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
723
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
724
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
725
|
+
}>;
|
|
726
|
+
/** Base value(s) - single float or per-class array */
|
|
727
|
+
readonly base_value: VariantType<{
|
|
728
|
+
/** Single base value for regression or binary classification */
|
|
729
|
+
readonly single: FloatType;
|
|
730
|
+
/** Per-class base values for multi-class classification */
|
|
731
|
+
readonly per_class: VectorType<FloatType>;
|
|
732
|
+
}>;
|
|
733
|
+
/** Feature names */
|
|
734
|
+
readonly feature_names: ArrayType<StringType>;
|
|
735
|
+
}>;
|
|
736
|
+
/** SHAP values for interval width (what drives uncertainty) */
|
|
737
|
+
readonly interval_width: StructType<{
|
|
738
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
739
|
+
readonly shap_values: VariantType<{
|
|
740
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
741
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
742
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
743
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
744
|
+
}>;
|
|
745
|
+
/** Base value(s) - single float or per-class array */
|
|
746
|
+
readonly base_value: VariantType<{
|
|
747
|
+
/** Single base value for regression or binary classification */
|
|
748
|
+
readonly single: FloatType;
|
|
749
|
+
/** Per-class base values for multi-class classification */
|
|
750
|
+
readonly per_class: VectorType<FloatType>;
|
|
751
|
+
}>;
|
|
752
|
+
/** Feature names */
|
|
753
|
+
readonly feature_names: ArrayType<StringType>;
|
|
754
|
+
}>;
|
|
755
|
+
}>;
|
|
756
|
+
/**
|
|
757
|
+
* SHAP result for MAPIE classifiers.
|
|
758
|
+
* Contains explanations for both class probabilities and prediction set size.
|
|
759
|
+
*/
|
|
760
|
+
export declare const MapieClassifierShapResultType: StructType<{
|
|
761
|
+
/** SHAP values for class probabilities (what drives each class probability) */
|
|
762
|
+
readonly class_probabilities: StructType<{
|
|
763
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
764
|
+
readonly shap_values: VariantType<{
|
|
765
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
766
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
767
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
768
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
769
|
+
}>;
|
|
770
|
+
/** Base value(s) - single float or per-class array */
|
|
771
|
+
readonly base_value: VariantType<{
|
|
772
|
+
/** Single base value for regression or binary classification */
|
|
773
|
+
readonly single: FloatType;
|
|
774
|
+
/** Per-class base values for multi-class classification */
|
|
775
|
+
readonly per_class: VectorType<FloatType>;
|
|
776
|
+
}>;
|
|
777
|
+
/** Feature names */
|
|
778
|
+
readonly feature_names: ArrayType<StringType>;
|
|
779
|
+
}>;
|
|
780
|
+
/** SHAP values for prediction set size (what drives uncertainty) */
|
|
781
|
+
readonly prediction_set_size: StructType<{
|
|
782
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
783
|
+
readonly shap_values: VariantType<{
|
|
784
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
785
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
786
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
787
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
788
|
+
}>;
|
|
789
|
+
/** Base value(s) - single float or per-class array */
|
|
790
|
+
readonly base_value: VariantType<{
|
|
791
|
+
/** Single base value for regression or binary classification */
|
|
792
|
+
readonly single: FloatType;
|
|
793
|
+
/** Per-class base values for multi-class classification */
|
|
794
|
+
readonly per_class: VectorType<FloatType>;
|
|
795
|
+
}>;
|
|
796
|
+
/** Feature names */
|
|
797
|
+
readonly feature_names: ArrayType<StringType>;
|
|
798
|
+
}>;
|
|
799
|
+
}>;
|
|
800
|
+
/**
|
|
801
|
+
* Create a SHAP TreeExplainer for tree-based models.
|
|
802
|
+
*
|
|
803
|
+
* Works with XGBoost and LightGBM models (regressor and classifier).
|
|
804
|
+
*
|
|
805
|
+
* @param model - Tree-based model blob (XGBoost or LightGBM)
|
|
806
|
+
* @returns SHAP TreeExplainer blob
|
|
807
|
+
*/
|
|
808
|
+
export declare const shap_tree_explainer_create: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
809
|
+
/** XGBoost regressor */
|
|
810
|
+
readonly xgboost_regressor: StructType<{
|
|
811
|
+
readonly data: BlobType;
|
|
812
|
+
readonly n_features: IntegerType;
|
|
813
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
814
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
815
|
+
}>;
|
|
816
|
+
/** XGBoost classifier */
|
|
817
|
+
readonly xgboost_classifier: StructType<{
|
|
818
|
+
readonly data: BlobType;
|
|
819
|
+
readonly n_features: IntegerType;
|
|
820
|
+
readonly n_classes: IntegerType;
|
|
821
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
822
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
823
|
+
}>;
|
|
824
|
+
/** XGBoost quantile regressor (uses median quantile for explanations) */
|
|
825
|
+
readonly xgboost_quantile: StructType<{
|
|
826
|
+
readonly data: BlobType;
|
|
827
|
+
readonly quantiles: VectorType<FloatType>;
|
|
828
|
+
readonly n_features: IntegerType;
|
|
829
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
830
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
831
|
+
}>;
|
|
832
|
+
/** MAPIE split conformal regressor with XGBoost base */
|
|
833
|
+
readonly mapie_split: StructType<{
|
|
834
|
+
readonly data: VariantType<{
|
|
835
|
+
readonly xgboost: VariantType<{
|
|
836
|
+
readonly xgboost_regressor: StructType<{
|
|
837
|
+
readonly data: BlobType;
|
|
838
|
+
readonly n_features: IntegerType;
|
|
839
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
840
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
841
|
+
}>;
|
|
842
|
+
readonly xgboost_classifier: StructType<{
|
|
843
|
+
readonly data: BlobType;
|
|
844
|
+
readonly n_features: IntegerType;
|
|
845
|
+
readonly n_classes: IntegerType;
|
|
846
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
847
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
848
|
+
}>;
|
|
849
|
+
readonly xgboost_quantile: StructType<{
|
|
850
|
+
readonly data: BlobType;
|
|
851
|
+
readonly quantiles: VectorType<FloatType>;
|
|
852
|
+
readonly n_features: IntegerType;
|
|
853
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
854
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
855
|
+
}>;
|
|
856
|
+
}>;
|
|
857
|
+
readonly lightgbm: VariantType<{
|
|
858
|
+
readonly lightgbm_regressor: StructType<{
|
|
859
|
+
readonly data: BlobType;
|
|
860
|
+
readonly n_features: IntegerType;
|
|
861
|
+
}>;
|
|
862
|
+
readonly lightgbm_classifier: StructType<{
|
|
863
|
+
readonly data: BlobType;
|
|
864
|
+
readonly n_features: IntegerType;
|
|
865
|
+
readonly n_classes: IntegerType;
|
|
866
|
+
}>;
|
|
867
|
+
}>;
|
|
868
|
+
readonly histogram: BlobType;
|
|
869
|
+
}>;
|
|
870
|
+
readonly n_features: IntegerType;
|
|
871
|
+
readonly confidence_level: FloatType;
|
|
872
|
+
}>;
|
|
873
|
+
/** MAPIE cross conformal regressor with XGBoost base */
|
|
874
|
+
readonly mapie_cross: StructType<{
|
|
875
|
+
readonly data: VariantType<{
|
|
876
|
+
readonly xgboost: VariantType<{
|
|
877
|
+
readonly xgboost_regressor: StructType<{
|
|
878
|
+
readonly data: BlobType;
|
|
879
|
+
readonly n_features: IntegerType;
|
|
880
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
881
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
882
|
+
}>;
|
|
883
|
+
readonly xgboost_classifier: StructType<{
|
|
884
|
+
readonly data: BlobType;
|
|
885
|
+
readonly n_features: IntegerType;
|
|
886
|
+
readonly n_classes: IntegerType;
|
|
887
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
888
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
889
|
+
}>;
|
|
890
|
+
readonly xgboost_quantile: StructType<{
|
|
891
|
+
readonly data: BlobType;
|
|
892
|
+
readonly quantiles: VectorType<FloatType>;
|
|
893
|
+
readonly n_features: IntegerType;
|
|
894
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
895
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
896
|
+
}>;
|
|
897
|
+
}>;
|
|
898
|
+
readonly lightgbm: VariantType<{
|
|
899
|
+
readonly lightgbm_regressor: StructType<{
|
|
900
|
+
readonly data: BlobType;
|
|
901
|
+
readonly n_features: IntegerType;
|
|
902
|
+
}>;
|
|
903
|
+
readonly lightgbm_classifier: StructType<{
|
|
904
|
+
readonly data: BlobType;
|
|
905
|
+
readonly n_features: IntegerType;
|
|
906
|
+
readonly n_classes: IntegerType;
|
|
907
|
+
}>;
|
|
908
|
+
}>;
|
|
909
|
+
readonly histogram: BlobType;
|
|
910
|
+
}>;
|
|
911
|
+
readonly n_features: IntegerType;
|
|
912
|
+
readonly confidence_level: FloatType;
|
|
913
|
+
}>;
|
|
914
|
+
/** MAPIE CQR conformal regressor with XGBoost base */
|
|
915
|
+
readonly mapie_cqr: StructType<{
|
|
916
|
+
readonly data: VariantType<{
|
|
917
|
+
readonly xgboost: VariantType<{
|
|
918
|
+
readonly xgboost_regressor: StructType<{
|
|
919
|
+
readonly data: BlobType;
|
|
920
|
+
readonly n_features: IntegerType;
|
|
921
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
922
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
923
|
+
}>;
|
|
924
|
+
readonly xgboost_classifier: StructType<{
|
|
925
|
+
readonly data: BlobType;
|
|
926
|
+
readonly n_features: IntegerType;
|
|
927
|
+
readonly n_classes: IntegerType;
|
|
928
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
929
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
930
|
+
}>;
|
|
931
|
+
readonly xgboost_quantile: StructType<{
|
|
932
|
+
readonly data: BlobType;
|
|
933
|
+
readonly quantiles: VectorType<FloatType>;
|
|
934
|
+
readonly n_features: IntegerType;
|
|
935
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
936
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
937
|
+
}>;
|
|
938
|
+
}>;
|
|
939
|
+
readonly lightgbm: VariantType<{
|
|
940
|
+
readonly lightgbm_regressor: StructType<{
|
|
941
|
+
readonly data: BlobType;
|
|
942
|
+
readonly n_features: IntegerType;
|
|
943
|
+
}>;
|
|
944
|
+
readonly lightgbm_classifier: StructType<{
|
|
945
|
+
readonly data: BlobType;
|
|
946
|
+
readonly n_features: IntegerType;
|
|
947
|
+
readonly n_classes: IntegerType;
|
|
948
|
+
}>;
|
|
949
|
+
}>;
|
|
950
|
+
readonly histogram: BlobType;
|
|
951
|
+
}>;
|
|
952
|
+
readonly n_features: IntegerType;
|
|
953
|
+
readonly confidence_level: FloatType;
|
|
954
|
+
}>;
|
|
955
|
+
/** MAPIE conformal classifier with XGBoost base */
|
|
956
|
+
readonly mapie_classifier: StructType<{
|
|
957
|
+
readonly data: VariantType<{
|
|
958
|
+
readonly xgboost: VariantType<{
|
|
959
|
+
readonly xgboost_regressor: StructType<{
|
|
960
|
+
readonly data: BlobType;
|
|
961
|
+
readonly n_features: IntegerType;
|
|
962
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
963
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
964
|
+
}>;
|
|
965
|
+
readonly xgboost_classifier: StructType<{
|
|
966
|
+
readonly data: BlobType;
|
|
967
|
+
readonly n_features: IntegerType;
|
|
968
|
+
readonly n_classes: IntegerType;
|
|
969
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
970
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
971
|
+
}>;
|
|
972
|
+
readonly xgboost_quantile: StructType<{
|
|
973
|
+
readonly data: BlobType;
|
|
974
|
+
readonly quantiles: VectorType<FloatType>;
|
|
975
|
+
readonly n_features: IntegerType;
|
|
976
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
977
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
978
|
+
}>;
|
|
979
|
+
}>;
|
|
980
|
+
readonly lightgbm: VariantType<{
|
|
981
|
+
readonly lightgbm_regressor: StructType<{
|
|
982
|
+
readonly data: BlobType;
|
|
983
|
+
readonly n_features: IntegerType;
|
|
984
|
+
}>;
|
|
985
|
+
readonly lightgbm_classifier: StructType<{
|
|
986
|
+
readonly data: BlobType;
|
|
987
|
+
readonly n_features: IntegerType;
|
|
988
|
+
readonly n_classes: IntegerType;
|
|
989
|
+
}>;
|
|
990
|
+
}>;
|
|
991
|
+
readonly histogram: BlobType;
|
|
992
|
+
}>;
|
|
993
|
+
readonly n_features: IntegerType;
|
|
994
|
+
readonly n_classes: IntegerType;
|
|
995
|
+
readonly classes: VectorType<IntegerType>;
|
|
996
|
+
readonly confidence_level: FloatType;
|
|
997
|
+
}>;
|
|
998
|
+
}>], VariantType<{
|
|
999
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
1000
|
+
readonly shap_tree_explainer: StructType<{
|
|
1001
|
+
/** Cloudpickle serialized explainer */
|
|
1002
|
+
readonly data: BlobType;
|
|
1003
|
+
/** Number of input features */
|
|
1004
|
+
readonly n_features: IntegerType;
|
|
1005
|
+
}>;
|
|
1006
|
+
/** SHAP KernelExplainer for any model */
|
|
1007
|
+
readonly shap_kernel_explainer: StructType<{
|
|
1008
|
+
/** Cloudpickle serialized explainer */
|
|
1009
|
+
readonly data: BlobType;
|
|
1010
|
+
/** Number of input features */
|
|
1011
|
+
readonly n_features: IntegerType;
|
|
1012
|
+
}>;
|
|
1013
|
+
}>>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Create a SHAP KernelExplainer for any model.
|
|
1016
|
+
*
|
|
1017
|
+
* Works with any model that has a predict method (NGBoost, GP, Torch, etc.).
|
|
1018
|
+
* Requires background data for computing expected values.
|
|
1019
|
+
*
|
|
1020
|
+
* @param model - Any model blob
|
|
1021
|
+
* @param X_background - Background data for computing expected values
|
|
1022
|
+
* @returns SHAP KernelExplainer blob
|
|
1023
|
+
*/
|
|
1024
|
+
export declare const shap_kernel_explainer_create: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
1025
|
+
readonly xgboost_regressor: StructType<{
|
|
1026
|
+
readonly data: BlobType;
|
|
1027
|
+
readonly n_features: IntegerType;
|
|
1028
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1029
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1030
|
+
}>;
|
|
1031
|
+
readonly xgboost_classifier: StructType<{
|
|
1032
|
+
readonly data: BlobType;
|
|
1033
|
+
readonly n_features: IntegerType;
|
|
1034
|
+
readonly n_classes: IntegerType;
|
|
1035
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1036
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1037
|
+
}>;
|
|
1038
|
+
readonly xgboost_quantile: StructType<{
|
|
1039
|
+
readonly data: BlobType;
|
|
1040
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1041
|
+
readonly n_features: IntegerType;
|
|
1042
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1043
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1044
|
+
}>;
|
|
1045
|
+
readonly lightgbm_regressor: StructType<{
|
|
1046
|
+
readonly data: BlobType;
|
|
1047
|
+
readonly n_features: IntegerType;
|
|
1048
|
+
}>;
|
|
1049
|
+
readonly lightgbm_classifier: StructType<{
|
|
1050
|
+
readonly data: BlobType;
|
|
1051
|
+
readonly n_features: IntegerType;
|
|
1052
|
+
readonly n_classes: IntegerType;
|
|
1053
|
+
}>;
|
|
1054
|
+
readonly ngboost_regressor: StructType<{
|
|
1055
|
+
readonly data: BlobType;
|
|
1056
|
+
readonly distribution: VariantType<{
|
|
1057
|
+
readonly normal: NullType;
|
|
1058
|
+
readonly lognormal: NullType;
|
|
1059
|
+
}>;
|
|
1060
|
+
readonly n_features: IntegerType;
|
|
1061
|
+
}>;
|
|
1062
|
+
readonly gp_regressor: StructType<{
|
|
1063
|
+
readonly data: BlobType;
|
|
1064
|
+
readonly n_features: IntegerType;
|
|
1065
|
+
readonly kernel_type: StringType;
|
|
1066
|
+
}>;
|
|
1067
|
+
readonly torch_mlp: StructType<{
|
|
1068
|
+
readonly data: BlobType;
|
|
1069
|
+
readonly n_features: IntegerType;
|
|
1070
|
+
readonly hidden_layers: ArrayType<IntegerType>;
|
|
1071
|
+
readonly output_dim: IntegerType;
|
|
1072
|
+
}>;
|
|
1073
|
+
readonly standard_scaler: StructType<{
|
|
1074
|
+
readonly onnx: BlobType;
|
|
1075
|
+
readonly n_features: IntegerType;
|
|
1076
|
+
}>;
|
|
1077
|
+
readonly min_max_scaler: StructType<{
|
|
1078
|
+
readonly onnx: BlobType;
|
|
1079
|
+
readonly n_features: IntegerType;
|
|
1080
|
+
}>;
|
|
1081
|
+
readonly robust_scaler: StructType<{
|
|
1082
|
+
readonly onnx: BlobType;
|
|
1083
|
+
readonly n_features: IntegerType;
|
|
1084
|
+
}>;
|
|
1085
|
+
readonly label_encoder: StructType<{
|
|
1086
|
+
readonly data: BlobType;
|
|
1087
|
+
readonly n_classes: IntegerType;
|
|
1088
|
+
}>;
|
|
1089
|
+
readonly ordinal_encoder: StructType<{
|
|
1090
|
+
readonly data: BlobType;
|
|
1091
|
+
readonly n_features: IntegerType;
|
|
1092
|
+
}>;
|
|
1093
|
+
readonly gaussian_mixture: StructType<{
|
|
1094
|
+
readonly data: BlobType;
|
|
1095
|
+
readonly n_features: IntegerType;
|
|
1096
|
+
readonly n_components: IntegerType;
|
|
1097
|
+
}>;
|
|
1098
|
+
readonly regressor_chain: StructType<{
|
|
1099
|
+
readonly data: BlobType;
|
|
1100
|
+
readonly n_features: IntegerType;
|
|
1101
|
+
readonly n_targets: IntegerType;
|
|
1102
|
+
readonly base_estimator_type: StringType;
|
|
1103
|
+
}>;
|
|
1104
|
+
readonly mapie_split: StructType<{
|
|
1105
|
+
readonly data: VariantType<{
|
|
1106
|
+
readonly xgboost: VariantType<{
|
|
1107
|
+
readonly xgboost_regressor: StructType<{
|
|
1108
|
+
readonly data: BlobType;
|
|
1109
|
+
readonly n_features: IntegerType;
|
|
1110
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1111
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1112
|
+
}>;
|
|
1113
|
+
readonly xgboost_classifier: StructType<{
|
|
1114
|
+
readonly data: BlobType;
|
|
1115
|
+
readonly n_features: IntegerType;
|
|
1116
|
+
readonly n_classes: IntegerType;
|
|
1117
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1118
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1119
|
+
}>;
|
|
1120
|
+
readonly xgboost_quantile: StructType<{
|
|
1121
|
+
readonly data: BlobType;
|
|
1122
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1123
|
+
readonly n_features: IntegerType;
|
|
1124
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1125
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1126
|
+
}>;
|
|
1127
|
+
}>;
|
|
1128
|
+
readonly lightgbm: VariantType<{
|
|
1129
|
+
readonly lightgbm_regressor: StructType<{
|
|
1130
|
+
readonly data: BlobType;
|
|
1131
|
+
readonly n_features: IntegerType;
|
|
1132
|
+
}>;
|
|
1133
|
+
readonly lightgbm_classifier: StructType<{
|
|
1134
|
+
readonly data: BlobType;
|
|
1135
|
+
readonly n_features: IntegerType;
|
|
1136
|
+
readonly n_classes: IntegerType;
|
|
1137
|
+
}>;
|
|
1138
|
+
}>;
|
|
1139
|
+
readonly histogram: BlobType;
|
|
1140
|
+
}>;
|
|
1141
|
+
readonly n_features: IntegerType;
|
|
1142
|
+
readonly confidence_level: FloatType;
|
|
1143
|
+
}>;
|
|
1144
|
+
readonly mapie_cross: StructType<{
|
|
1145
|
+
readonly data: VariantType<{
|
|
1146
|
+
readonly xgboost: VariantType<{
|
|
1147
|
+
readonly xgboost_regressor: StructType<{
|
|
1148
|
+
readonly data: BlobType;
|
|
1149
|
+
readonly n_features: IntegerType;
|
|
1150
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1151
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1152
|
+
}>;
|
|
1153
|
+
readonly xgboost_classifier: StructType<{
|
|
1154
|
+
readonly data: BlobType;
|
|
1155
|
+
readonly n_features: IntegerType;
|
|
1156
|
+
readonly n_classes: IntegerType;
|
|
1157
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1158
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1159
|
+
}>;
|
|
1160
|
+
readonly xgboost_quantile: StructType<{
|
|
1161
|
+
readonly data: BlobType;
|
|
1162
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1163
|
+
readonly n_features: IntegerType;
|
|
1164
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1165
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1166
|
+
}>;
|
|
1167
|
+
}>;
|
|
1168
|
+
readonly lightgbm: VariantType<{
|
|
1169
|
+
readonly lightgbm_regressor: StructType<{
|
|
1170
|
+
readonly data: BlobType;
|
|
1171
|
+
readonly n_features: IntegerType;
|
|
1172
|
+
}>;
|
|
1173
|
+
readonly lightgbm_classifier: StructType<{
|
|
1174
|
+
readonly data: BlobType;
|
|
1175
|
+
readonly n_features: IntegerType;
|
|
1176
|
+
readonly n_classes: IntegerType;
|
|
1177
|
+
}>;
|
|
1178
|
+
}>;
|
|
1179
|
+
readonly histogram: BlobType;
|
|
1180
|
+
}>;
|
|
1181
|
+
readonly n_features: IntegerType;
|
|
1182
|
+
readonly confidence_level: FloatType;
|
|
1183
|
+
}>;
|
|
1184
|
+
readonly mapie_cqr: StructType<{
|
|
1185
|
+
readonly data: VariantType<{
|
|
1186
|
+
readonly xgboost: VariantType<{
|
|
1187
|
+
readonly xgboost_regressor: StructType<{
|
|
1188
|
+
readonly data: BlobType;
|
|
1189
|
+
readonly n_features: IntegerType;
|
|
1190
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1191
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1192
|
+
}>;
|
|
1193
|
+
readonly xgboost_classifier: StructType<{
|
|
1194
|
+
readonly data: BlobType;
|
|
1195
|
+
readonly n_features: IntegerType;
|
|
1196
|
+
readonly n_classes: IntegerType;
|
|
1197
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1198
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1199
|
+
}>;
|
|
1200
|
+
readonly xgboost_quantile: StructType<{
|
|
1201
|
+
readonly data: BlobType;
|
|
1202
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1203
|
+
readonly n_features: IntegerType;
|
|
1204
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1205
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1206
|
+
}>;
|
|
1207
|
+
}>;
|
|
1208
|
+
readonly lightgbm: VariantType<{
|
|
1209
|
+
readonly lightgbm_regressor: StructType<{
|
|
1210
|
+
readonly data: BlobType;
|
|
1211
|
+
readonly n_features: IntegerType;
|
|
1212
|
+
}>;
|
|
1213
|
+
readonly lightgbm_classifier: StructType<{
|
|
1214
|
+
readonly data: BlobType;
|
|
1215
|
+
readonly n_features: IntegerType;
|
|
1216
|
+
readonly n_classes: IntegerType;
|
|
1217
|
+
}>;
|
|
1218
|
+
}>;
|
|
1219
|
+
readonly histogram: BlobType;
|
|
1220
|
+
}>;
|
|
1221
|
+
readonly n_features: IntegerType;
|
|
1222
|
+
readonly confidence_level: FloatType;
|
|
1223
|
+
}>;
|
|
1224
|
+
readonly mapie_classifier: StructType<{
|
|
1225
|
+
readonly data: VariantType<{
|
|
1226
|
+
readonly xgboost: VariantType<{
|
|
1227
|
+
readonly xgboost_regressor: StructType<{
|
|
1228
|
+
readonly data: BlobType;
|
|
1229
|
+
readonly n_features: IntegerType;
|
|
1230
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1231
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1232
|
+
}>;
|
|
1233
|
+
readonly xgboost_classifier: StructType<{
|
|
1234
|
+
readonly data: BlobType;
|
|
1235
|
+
readonly n_features: IntegerType;
|
|
1236
|
+
readonly n_classes: IntegerType;
|
|
1237
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1238
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1239
|
+
}>;
|
|
1240
|
+
readonly xgboost_quantile: StructType<{
|
|
1241
|
+
readonly data: BlobType;
|
|
1242
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1243
|
+
readonly n_features: IntegerType;
|
|
1244
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1245
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1246
|
+
}>;
|
|
1247
|
+
}>;
|
|
1248
|
+
readonly lightgbm: VariantType<{
|
|
1249
|
+
readonly lightgbm_regressor: StructType<{
|
|
1250
|
+
readonly data: BlobType;
|
|
1251
|
+
readonly n_features: IntegerType;
|
|
1252
|
+
}>;
|
|
1253
|
+
readonly lightgbm_classifier: StructType<{
|
|
1254
|
+
readonly data: BlobType;
|
|
1255
|
+
readonly n_features: IntegerType;
|
|
1256
|
+
readonly n_classes: IntegerType;
|
|
1257
|
+
}>;
|
|
1258
|
+
}>;
|
|
1259
|
+
readonly histogram: BlobType;
|
|
1260
|
+
}>;
|
|
1261
|
+
readonly n_features: IntegerType;
|
|
1262
|
+
readonly n_classes: IntegerType;
|
|
1263
|
+
readonly classes: VectorType<IntegerType>;
|
|
1264
|
+
readonly confidence_level: FloatType;
|
|
1265
|
+
}>;
|
|
1266
|
+
readonly mapie_interval_width: StructType<{
|
|
1267
|
+
readonly data: BlobType;
|
|
1268
|
+
readonly n_features: IntegerType;
|
|
1269
|
+
}>;
|
|
1270
|
+
readonly mapie_set_size: StructType<{
|
|
1271
|
+
readonly data: BlobType;
|
|
1272
|
+
readonly n_features: IntegerType;
|
|
1273
|
+
}>;
|
|
1274
|
+
}>, MatrixType<FloatType>], VariantType<{
|
|
1275
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
1276
|
+
readonly shap_tree_explainer: StructType<{
|
|
1277
|
+
/** Cloudpickle serialized explainer */
|
|
1278
|
+
readonly data: BlobType;
|
|
1279
|
+
/** Number of input features */
|
|
1280
|
+
readonly n_features: IntegerType;
|
|
1281
|
+
}>;
|
|
1282
|
+
/** SHAP KernelExplainer for any model */
|
|
1283
|
+
readonly shap_kernel_explainer: StructType<{
|
|
1284
|
+
/** Cloudpickle serialized explainer */
|
|
1285
|
+
readonly data: BlobType;
|
|
1286
|
+
/** Number of input features */
|
|
1287
|
+
readonly n_features: IntegerType;
|
|
1288
|
+
}>;
|
|
1289
|
+
}>>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Compute SHAP values for samples.
|
|
1292
|
+
*
|
|
1293
|
+
* @param explainer - SHAP explainer blob
|
|
1294
|
+
* @param X - Feature matrix to explain
|
|
1295
|
+
* @param feature_names - Names of features
|
|
1296
|
+
* @returns SHAP values, base value, and feature names
|
|
1297
|
+
*/
|
|
1298
|
+
export declare const shap_compute_values: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
1299
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
1300
|
+
readonly shap_tree_explainer: StructType<{
|
|
1301
|
+
/** Cloudpickle serialized explainer */
|
|
1302
|
+
readonly data: BlobType;
|
|
1303
|
+
/** Number of input features */
|
|
1304
|
+
readonly n_features: IntegerType;
|
|
1305
|
+
}>;
|
|
1306
|
+
/** SHAP KernelExplainer for any model */
|
|
1307
|
+
readonly shap_kernel_explainer: StructType<{
|
|
1308
|
+
/** Cloudpickle serialized explainer */
|
|
1309
|
+
readonly data: BlobType;
|
|
1310
|
+
/** Number of input features */
|
|
1311
|
+
readonly n_features: IntegerType;
|
|
1312
|
+
}>;
|
|
1313
|
+
}>, MatrixType<FloatType>, ArrayType<StringType>], StructType<{
|
|
1314
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
1315
|
+
readonly shap_values: VariantType<{
|
|
1316
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
1317
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
1318
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
1319
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
1320
|
+
}>;
|
|
1321
|
+
/** Base value(s) - single float or per-class array */
|
|
1322
|
+
readonly base_value: VariantType<{
|
|
1323
|
+
/** Single base value for regression or binary classification */
|
|
1324
|
+
readonly single: FloatType;
|
|
1325
|
+
/** Per-class base values for multi-class classification */
|
|
1326
|
+
readonly per_class: VectorType<FloatType>;
|
|
1327
|
+
}>;
|
|
1328
|
+
/** Feature names */
|
|
1329
|
+
readonly feature_names: ArrayType<StringType>;
|
|
1330
|
+
}>>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Compute global feature importance from SHAP values.
|
|
1333
|
+
*
|
|
1334
|
+
* @param shap_values - SHAP values (2D matrix or 3D tensor)
|
|
1335
|
+
* @param feature_names - Names of features
|
|
1336
|
+
* @returns Feature importance with mean |SHAP| values
|
|
1337
|
+
*/
|
|
1338
|
+
export declare const shap_feature_importance: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
1339
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
1340
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
1341
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
1342
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
1343
|
+
}>, ArrayType<StringType>], StructType<{
|
|
1344
|
+
/** Feature names */
|
|
1345
|
+
readonly feature_names: ArrayType<StringType>;
|
|
1346
|
+
/** Mean absolute SHAP value for each feature */
|
|
1347
|
+
readonly importances: VectorType<FloatType>;
|
|
1348
|
+
/** Standard deviation of absolute SHAP values */
|
|
1349
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
1350
|
+
}>>;
|
|
1351
|
+
/**
|
|
1352
|
+
* Type definitions for SHAP functions.
|
|
1353
|
+
*/
|
|
1354
|
+
export declare const ShapTypes: {
|
|
1355
|
+
/** String vector type */
|
|
1356
|
+
readonly StringVectorType: ArrayType<StringType>;
|
|
1357
|
+
/** SHAP values variant type (2D or 3D) */
|
|
1358
|
+
readonly ShapValuesType: VariantType<{
|
|
1359
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
1360
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
1361
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
1362
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
1363
|
+
}>;
|
|
1364
|
+
/** SHAP base value variant type (single or per-class) */
|
|
1365
|
+
readonly ShapBaseValueType: VariantType<{
|
|
1366
|
+
/** Single base value for regression or binary classification */
|
|
1367
|
+
readonly single: FloatType;
|
|
1368
|
+
/** Per-class base values for multi-class classification */
|
|
1369
|
+
readonly per_class: VectorType<FloatType>;
|
|
1370
|
+
}>;
|
|
1371
|
+
/** SHAP result type */
|
|
1372
|
+
readonly ShapResultType: StructType<{
|
|
1373
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
1374
|
+
readonly shap_values: VariantType<{
|
|
1375
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
1376
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
1377
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
1378
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
1379
|
+
}>;
|
|
1380
|
+
/** Base value(s) - single float or per-class array */
|
|
1381
|
+
readonly base_value: VariantType<{
|
|
1382
|
+
/** Single base value for regression or binary classification */
|
|
1383
|
+
readonly single: FloatType;
|
|
1384
|
+
/** Per-class base values for multi-class classification */
|
|
1385
|
+
readonly per_class: VectorType<FloatType>;
|
|
1386
|
+
}>;
|
|
1387
|
+
/** Feature names */
|
|
1388
|
+
readonly feature_names: ArrayType<StringType>;
|
|
1389
|
+
}>;
|
|
1390
|
+
/** Feature importance type */
|
|
1391
|
+
readonly FeatureImportanceType: StructType<{
|
|
1392
|
+
/** Feature names */
|
|
1393
|
+
readonly feature_names: ArrayType<StringType>;
|
|
1394
|
+
/** Mean absolute SHAP value for each feature */
|
|
1395
|
+
readonly importances: VectorType<FloatType>;
|
|
1396
|
+
/** Standard deviation of absolute SHAP values */
|
|
1397
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
1398
|
+
}>;
|
|
1399
|
+
/** SHAP explainer model blob type */
|
|
1400
|
+
readonly ShapModelBlobType: VariantType<{
|
|
1401
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
1402
|
+
readonly shap_tree_explainer: StructType<{
|
|
1403
|
+
/** Cloudpickle serialized explainer */
|
|
1404
|
+
readonly data: BlobType;
|
|
1405
|
+
/** Number of input features */
|
|
1406
|
+
readonly n_features: IntegerType;
|
|
1407
|
+
}>;
|
|
1408
|
+
/** SHAP KernelExplainer for any model */
|
|
1409
|
+
readonly shap_kernel_explainer: StructType<{
|
|
1410
|
+
/** Cloudpickle serialized explainer */
|
|
1411
|
+
readonly data: BlobType;
|
|
1412
|
+
/** Number of input features */
|
|
1413
|
+
readonly n_features: IntegerType;
|
|
1414
|
+
}>;
|
|
1415
|
+
}>;
|
|
1416
|
+
/** Tree model blob type for input */
|
|
1417
|
+
readonly TreeModelBlobType: VariantType<{
|
|
1418
|
+
/** XGBoost regressor */
|
|
1419
|
+
readonly xgboost_regressor: StructType<{
|
|
1420
|
+
readonly data: BlobType;
|
|
1421
|
+
readonly n_features: IntegerType;
|
|
1422
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1423
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1424
|
+
}>;
|
|
1425
|
+
/** XGBoost classifier */
|
|
1426
|
+
readonly xgboost_classifier: StructType<{
|
|
1427
|
+
readonly data: BlobType;
|
|
1428
|
+
readonly n_features: IntegerType;
|
|
1429
|
+
readonly n_classes: IntegerType;
|
|
1430
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1431
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1432
|
+
}>;
|
|
1433
|
+
/** XGBoost quantile regressor (uses median quantile for explanations) */
|
|
1434
|
+
readonly xgboost_quantile: StructType<{
|
|
1435
|
+
readonly data: BlobType;
|
|
1436
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1437
|
+
readonly n_features: IntegerType;
|
|
1438
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1439
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1440
|
+
}>;
|
|
1441
|
+
/** MAPIE split conformal regressor with XGBoost base */
|
|
1442
|
+
readonly mapie_split: StructType<{
|
|
1443
|
+
readonly data: VariantType<{
|
|
1444
|
+
readonly xgboost: VariantType<{
|
|
1445
|
+
readonly xgboost_regressor: StructType<{
|
|
1446
|
+
readonly data: BlobType;
|
|
1447
|
+
readonly n_features: IntegerType;
|
|
1448
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1449
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1450
|
+
}>;
|
|
1451
|
+
readonly xgboost_classifier: StructType<{
|
|
1452
|
+
readonly data: BlobType;
|
|
1453
|
+
readonly n_features: IntegerType;
|
|
1454
|
+
readonly n_classes: IntegerType;
|
|
1455
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1456
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1457
|
+
}>;
|
|
1458
|
+
readonly xgboost_quantile: StructType<{
|
|
1459
|
+
readonly data: BlobType;
|
|
1460
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1461
|
+
readonly n_features: IntegerType;
|
|
1462
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1463
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1464
|
+
}>;
|
|
1465
|
+
}>;
|
|
1466
|
+
readonly lightgbm: VariantType<{
|
|
1467
|
+
readonly lightgbm_regressor: StructType<{
|
|
1468
|
+
readonly data: BlobType;
|
|
1469
|
+
readonly n_features: IntegerType;
|
|
1470
|
+
}>;
|
|
1471
|
+
readonly lightgbm_classifier: StructType<{
|
|
1472
|
+
readonly data: BlobType;
|
|
1473
|
+
readonly n_features: IntegerType;
|
|
1474
|
+
readonly n_classes: IntegerType;
|
|
1475
|
+
}>;
|
|
1476
|
+
}>;
|
|
1477
|
+
readonly histogram: BlobType;
|
|
1478
|
+
}>;
|
|
1479
|
+
readonly n_features: IntegerType;
|
|
1480
|
+
readonly confidence_level: FloatType;
|
|
1481
|
+
}>;
|
|
1482
|
+
/** MAPIE cross conformal regressor with XGBoost base */
|
|
1483
|
+
readonly mapie_cross: StructType<{
|
|
1484
|
+
readonly data: VariantType<{
|
|
1485
|
+
readonly xgboost: VariantType<{
|
|
1486
|
+
readonly xgboost_regressor: StructType<{
|
|
1487
|
+
readonly data: BlobType;
|
|
1488
|
+
readonly n_features: IntegerType;
|
|
1489
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1490
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1491
|
+
}>;
|
|
1492
|
+
readonly xgboost_classifier: StructType<{
|
|
1493
|
+
readonly data: BlobType;
|
|
1494
|
+
readonly n_features: IntegerType;
|
|
1495
|
+
readonly n_classes: IntegerType;
|
|
1496
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1497
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1498
|
+
}>;
|
|
1499
|
+
readonly xgboost_quantile: StructType<{
|
|
1500
|
+
readonly data: BlobType;
|
|
1501
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1502
|
+
readonly n_features: IntegerType;
|
|
1503
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1504
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1505
|
+
}>;
|
|
1506
|
+
}>;
|
|
1507
|
+
readonly lightgbm: VariantType<{
|
|
1508
|
+
readonly lightgbm_regressor: StructType<{
|
|
1509
|
+
readonly data: BlobType;
|
|
1510
|
+
readonly n_features: IntegerType;
|
|
1511
|
+
}>;
|
|
1512
|
+
readonly lightgbm_classifier: StructType<{
|
|
1513
|
+
readonly data: BlobType;
|
|
1514
|
+
readonly n_features: IntegerType;
|
|
1515
|
+
readonly n_classes: IntegerType;
|
|
1516
|
+
}>;
|
|
1517
|
+
}>;
|
|
1518
|
+
readonly histogram: BlobType;
|
|
1519
|
+
}>;
|
|
1520
|
+
readonly n_features: IntegerType;
|
|
1521
|
+
readonly confidence_level: FloatType;
|
|
1522
|
+
}>;
|
|
1523
|
+
/** MAPIE CQR conformal regressor with XGBoost base */
|
|
1524
|
+
readonly mapie_cqr: StructType<{
|
|
1525
|
+
readonly data: VariantType<{
|
|
1526
|
+
readonly xgboost: VariantType<{
|
|
1527
|
+
readonly xgboost_regressor: StructType<{
|
|
1528
|
+
readonly data: BlobType;
|
|
1529
|
+
readonly n_features: IntegerType;
|
|
1530
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1531
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1532
|
+
}>;
|
|
1533
|
+
readonly xgboost_classifier: StructType<{
|
|
1534
|
+
readonly data: BlobType;
|
|
1535
|
+
readonly n_features: IntegerType;
|
|
1536
|
+
readonly n_classes: IntegerType;
|
|
1537
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1538
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1539
|
+
}>;
|
|
1540
|
+
readonly xgboost_quantile: StructType<{
|
|
1541
|
+
readonly data: BlobType;
|
|
1542
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1543
|
+
readonly n_features: IntegerType;
|
|
1544
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1545
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1546
|
+
}>;
|
|
1547
|
+
}>;
|
|
1548
|
+
readonly lightgbm: VariantType<{
|
|
1549
|
+
readonly lightgbm_regressor: StructType<{
|
|
1550
|
+
readonly data: BlobType;
|
|
1551
|
+
readonly n_features: IntegerType;
|
|
1552
|
+
}>;
|
|
1553
|
+
readonly lightgbm_classifier: StructType<{
|
|
1554
|
+
readonly data: BlobType;
|
|
1555
|
+
readonly n_features: IntegerType;
|
|
1556
|
+
readonly n_classes: IntegerType;
|
|
1557
|
+
}>;
|
|
1558
|
+
}>;
|
|
1559
|
+
readonly histogram: BlobType;
|
|
1560
|
+
}>;
|
|
1561
|
+
readonly n_features: IntegerType;
|
|
1562
|
+
readonly confidence_level: FloatType;
|
|
1563
|
+
}>;
|
|
1564
|
+
/** MAPIE conformal classifier with XGBoost base */
|
|
1565
|
+
readonly mapie_classifier: StructType<{
|
|
1566
|
+
readonly data: VariantType<{
|
|
1567
|
+
readonly xgboost: VariantType<{
|
|
1568
|
+
readonly xgboost_regressor: StructType<{
|
|
1569
|
+
readonly data: BlobType;
|
|
1570
|
+
readonly n_features: IntegerType;
|
|
1571
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1572
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1573
|
+
}>;
|
|
1574
|
+
readonly xgboost_classifier: StructType<{
|
|
1575
|
+
readonly data: BlobType;
|
|
1576
|
+
readonly n_features: IntegerType;
|
|
1577
|
+
readonly n_classes: IntegerType;
|
|
1578
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1579
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1580
|
+
}>;
|
|
1581
|
+
readonly xgboost_quantile: StructType<{
|
|
1582
|
+
readonly data: BlobType;
|
|
1583
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1584
|
+
readonly n_features: IntegerType;
|
|
1585
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1586
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1587
|
+
}>;
|
|
1588
|
+
}>;
|
|
1589
|
+
readonly lightgbm: VariantType<{
|
|
1590
|
+
readonly lightgbm_regressor: StructType<{
|
|
1591
|
+
readonly data: BlobType;
|
|
1592
|
+
readonly n_features: IntegerType;
|
|
1593
|
+
}>;
|
|
1594
|
+
readonly lightgbm_classifier: StructType<{
|
|
1595
|
+
readonly data: BlobType;
|
|
1596
|
+
readonly n_features: IntegerType;
|
|
1597
|
+
readonly n_classes: IntegerType;
|
|
1598
|
+
}>;
|
|
1599
|
+
}>;
|
|
1600
|
+
readonly histogram: BlobType;
|
|
1601
|
+
}>;
|
|
1602
|
+
readonly n_features: IntegerType;
|
|
1603
|
+
readonly n_classes: IntegerType;
|
|
1604
|
+
readonly classes: VectorType<IntegerType>;
|
|
1605
|
+
readonly confidence_level: FloatType;
|
|
1606
|
+
}>;
|
|
1607
|
+
}>;
|
|
1608
|
+
/** Any model blob type for kernel explainer */
|
|
1609
|
+
readonly AnyModelBlobType: VariantType<{
|
|
1610
|
+
readonly xgboost_regressor: StructType<{
|
|
1611
|
+
readonly data: BlobType;
|
|
1612
|
+
readonly n_features: IntegerType;
|
|
1613
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1614
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1615
|
+
}>;
|
|
1616
|
+
readonly xgboost_classifier: StructType<{
|
|
1617
|
+
readonly data: BlobType;
|
|
1618
|
+
readonly n_features: IntegerType;
|
|
1619
|
+
readonly n_classes: IntegerType;
|
|
1620
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1621
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1622
|
+
}>;
|
|
1623
|
+
readonly xgboost_quantile: StructType<{
|
|
1624
|
+
readonly data: BlobType;
|
|
1625
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1626
|
+
readonly n_features: IntegerType;
|
|
1627
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1628
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1629
|
+
}>;
|
|
1630
|
+
readonly lightgbm_regressor: StructType<{
|
|
1631
|
+
readonly data: BlobType;
|
|
1632
|
+
readonly n_features: IntegerType;
|
|
1633
|
+
}>;
|
|
1634
|
+
readonly lightgbm_classifier: StructType<{
|
|
1635
|
+
readonly data: BlobType;
|
|
1636
|
+
readonly n_features: IntegerType;
|
|
1637
|
+
readonly n_classes: IntegerType;
|
|
1638
|
+
}>;
|
|
1639
|
+
readonly ngboost_regressor: StructType<{
|
|
1640
|
+
readonly data: BlobType;
|
|
1641
|
+
readonly distribution: VariantType<{
|
|
1642
|
+
readonly normal: NullType;
|
|
1643
|
+
readonly lognormal: NullType;
|
|
1644
|
+
}>;
|
|
1645
|
+
readonly n_features: IntegerType;
|
|
1646
|
+
}>;
|
|
1647
|
+
readonly gp_regressor: StructType<{
|
|
1648
|
+
readonly data: BlobType;
|
|
1649
|
+
readonly n_features: IntegerType;
|
|
1650
|
+
readonly kernel_type: StringType;
|
|
1651
|
+
}>;
|
|
1652
|
+
readonly torch_mlp: StructType<{
|
|
1653
|
+
readonly data: BlobType;
|
|
1654
|
+
readonly n_features: IntegerType;
|
|
1655
|
+
readonly hidden_layers: ArrayType<IntegerType>;
|
|
1656
|
+
readonly output_dim: IntegerType;
|
|
1657
|
+
}>;
|
|
1658
|
+
readonly standard_scaler: StructType<{
|
|
1659
|
+
readonly onnx: BlobType;
|
|
1660
|
+
readonly n_features: IntegerType;
|
|
1661
|
+
}>;
|
|
1662
|
+
readonly min_max_scaler: StructType<{
|
|
1663
|
+
readonly onnx: BlobType;
|
|
1664
|
+
readonly n_features: IntegerType;
|
|
1665
|
+
}>;
|
|
1666
|
+
readonly robust_scaler: StructType<{
|
|
1667
|
+
readonly onnx: BlobType;
|
|
1668
|
+
readonly n_features: IntegerType;
|
|
1669
|
+
}>;
|
|
1670
|
+
readonly label_encoder: StructType<{
|
|
1671
|
+
readonly data: BlobType;
|
|
1672
|
+
readonly n_classes: IntegerType;
|
|
1673
|
+
}>;
|
|
1674
|
+
readonly ordinal_encoder: StructType<{
|
|
1675
|
+
readonly data: BlobType;
|
|
1676
|
+
readonly n_features: IntegerType;
|
|
1677
|
+
}>;
|
|
1678
|
+
readonly gaussian_mixture: StructType<{
|
|
1679
|
+
readonly data: BlobType;
|
|
1680
|
+
readonly n_features: IntegerType;
|
|
1681
|
+
readonly n_components: IntegerType;
|
|
1682
|
+
}>;
|
|
1683
|
+
readonly regressor_chain: StructType<{
|
|
1684
|
+
readonly data: BlobType;
|
|
1685
|
+
readonly n_features: IntegerType;
|
|
1686
|
+
readonly n_targets: IntegerType;
|
|
1687
|
+
readonly base_estimator_type: StringType;
|
|
1688
|
+
}>;
|
|
1689
|
+
readonly mapie_split: StructType<{
|
|
1690
|
+
readonly data: VariantType<{
|
|
1691
|
+
readonly xgboost: VariantType<{
|
|
1692
|
+
readonly xgboost_regressor: StructType<{
|
|
1693
|
+
readonly data: BlobType;
|
|
1694
|
+
readonly n_features: IntegerType;
|
|
1695
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1696
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1697
|
+
}>;
|
|
1698
|
+
readonly xgboost_classifier: StructType<{
|
|
1699
|
+
readonly data: BlobType;
|
|
1700
|
+
readonly n_features: IntegerType;
|
|
1701
|
+
readonly n_classes: IntegerType;
|
|
1702
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1703
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1704
|
+
}>;
|
|
1705
|
+
readonly xgboost_quantile: StructType<{
|
|
1706
|
+
readonly data: BlobType;
|
|
1707
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1708
|
+
readonly n_features: IntegerType;
|
|
1709
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1710
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1711
|
+
}>;
|
|
1712
|
+
}>;
|
|
1713
|
+
readonly lightgbm: VariantType<{
|
|
1714
|
+
readonly lightgbm_regressor: StructType<{
|
|
1715
|
+
readonly data: BlobType;
|
|
1716
|
+
readonly n_features: IntegerType;
|
|
1717
|
+
}>;
|
|
1718
|
+
readonly lightgbm_classifier: StructType<{
|
|
1719
|
+
readonly data: BlobType;
|
|
1720
|
+
readonly n_features: IntegerType;
|
|
1721
|
+
readonly n_classes: IntegerType;
|
|
1722
|
+
}>;
|
|
1723
|
+
}>;
|
|
1724
|
+
readonly histogram: BlobType;
|
|
1725
|
+
}>;
|
|
1726
|
+
readonly n_features: IntegerType;
|
|
1727
|
+
readonly confidence_level: FloatType;
|
|
1728
|
+
}>;
|
|
1729
|
+
readonly mapie_cross: StructType<{
|
|
1730
|
+
readonly data: VariantType<{
|
|
1731
|
+
readonly xgboost: VariantType<{
|
|
1732
|
+
readonly xgboost_regressor: StructType<{
|
|
1733
|
+
readonly data: BlobType;
|
|
1734
|
+
readonly n_features: IntegerType;
|
|
1735
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1736
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1737
|
+
}>;
|
|
1738
|
+
readonly xgboost_classifier: StructType<{
|
|
1739
|
+
readonly data: BlobType;
|
|
1740
|
+
readonly n_features: IntegerType;
|
|
1741
|
+
readonly n_classes: IntegerType;
|
|
1742
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1743
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1744
|
+
}>;
|
|
1745
|
+
readonly xgboost_quantile: StructType<{
|
|
1746
|
+
readonly data: BlobType;
|
|
1747
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1748
|
+
readonly n_features: IntegerType;
|
|
1749
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1750
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1751
|
+
}>;
|
|
1752
|
+
}>;
|
|
1753
|
+
readonly lightgbm: VariantType<{
|
|
1754
|
+
readonly lightgbm_regressor: StructType<{
|
|
1755
|
+
readonly data: BlobType;
|
|
1756
|
+
readonly n_features: IntegerType;
|
|
1757
|
+
}>;
|
|
1758
|
+
readonly lightgbm_classifier: StructType<{
|
|
1759
|
+
readonly data: BlobType;
|
|
1760
|
+
readonly n_features: IntegerType;
|
|
1761
|
+
readonly n_classes: IntegerType;
|
|
1762
|
+
}>;
|
|
1763
|
+
}>;
|
|
1764
|
+
readonly histogram: BlobType;
|
|
1765
|
+
}>;
|
|
1766
|
+
readonly n_features: IntegerType;
|
|
1767
|
+
readonly confidence_level: FloatType;
|
|
1768
|
+
}>;
|
|
1769
|
+
readonly mapie_cqr: StructType<{
|
|
1770
|
+
readonly data: VariantType<{
|
|
1771
|
+
readonly xgboost: VariantType<{
|
|
1772
|
+
readonly xgboost_regressor: StructType<{
|
|
1773
|
+
readonly data: BlobType;
|
|
1774
|
+
readonly n_features: IntegerType;
|
|
1775
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1776
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1777
|
+
}>;
|
|
1778
|
+
readonly xgboost_classifier: StructType<{
|
|
1779
|
+
readonly data: BlobType;
|
|
1780
|
+
readonly n_features: IntegerType;
|
|
1781
|
+
readonly n_classes: IntegerType;
|
|
1782
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1783
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1784
|
+
}>;
|
|
1785
|
+
readonly xgboost_quantile: StructType<{
|
|
1786
|
+
readonly data: BlobType;
|
|
1787
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1788
|
+
readonly n_features: IntegerType;
|
|
1789
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1790
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1791
|
+
}>;
|
|
1792
|
+
}>;
|
|
1793
|
+
readonly lightgbm: VariantType<{
|
|
1794
|
+
readonly lightgbm_regressor: StructType<{
|
|
1795
|
+
readonly data: BlobType;
|
|
1796
|
+
readonly n_features: IntegerType;
|
|
1797
|
+
}>;
|
|
1798
|
+
readonly lightgbm_classifier: StructType<{
|
|
1799
|
+
readonly data: BlobType;
|
|
1800
|
+
readonly n_features: IntegerType;
|
|
1801
|
+
readonly n_classes: IntegerType;
|
|
1802
|
+
}>;
|
|
1803
|
+
}>;
|
|
1804
|
+
readonly histogram: BlobType;
|
|
1805
|
+
}>;
|
|
1806
|
+
readonly n_features: IntegerType;
|
|
1807
|
+
readonly confidence_level: FloatType;
|
|
1808
|
+
}>;
|
|
1809
|
+
readonly mapie_classifier: StructType<{
|
|
1810
|
+
readonly data: VariantType<{
|
|
1811
|
+
readonly xgboost: VariantType<{
|
|
1812
|
+
readonly xgboost_regressor: StructType<{
|
|
1813
|
+
readonly data: BlobType;
|
|
1814
|
+
readonly n_features: IntegerType;
|
|
1815
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1816
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1817
|
+
}>;
|
|
1818
|
+
readonly xgboost_classifier: StructType<{
|
|
1819
|
+
readonly data: BlobType;
|
|
1820
|
+
readonly n_features: IntegerType;
|
|
1821
|
+
readonly n_classes: IntegerType;
|
|
1822
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1823
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1824
|
+
}>;
|
|
1825
|
+
readonly xgboost_quantile: StructType<{
|
|
1826
|
+
readonly data: BlobType;
|
|
1827
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1828
|
+
readonly n_features: IntegerType;
|
|
1829
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1830
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1831
|
+
}>;
|
|
1832
|
+
}>;
|
|
1833
|
+
readonly lightgbm: VariantType<{
|
|
1834
|
+
readonly lightgbm_regressor: StructType<{
|
|
1835
|
+
readonly data: BlobType;
|
|
1836
|
+
readonly n_features: IntegerType;
|
|
1837
|
+
}>;
|
|
1838
|
+
readonly lightgbm_classifier: StructType<{
|
|
1839
|
+
readonly data: BlobType;
|
|
1840
|
+
readonly n_features: IntegerType;
|
|
1841
|
+
readonly n_classes: IntegerType;
|
|
1842
|
+
}>;
|
|
1843
|
+
}>;
|
|
1844
|
+
readonly histogram: BlobType;
|
|
1845
|
+
}>;
|
|
1846
|
+
readonly n_features: IntegerType;
|
|
1847
|
+
readonly n_classes: IntegerType;
|
|
1848
|
+
readonly classes: VectorType<IntegerType>;
|
|
1849
|
+
readonly confidence_level: FloatType;
|
|
1850
|
+
}>;
|
|
1851
|
+
readonly mapie_interval_width: StructType<{
|
|
1852
|
+
readonly data: BlobType;
|
|
1853
|
+
readonly n_features: IntegerType;
|
|
1854
|
+
}>;
|
|
1855
|
+
readonly mapie_set_size: StructType<{
|
|
1856
|
+
readonly data: BlobType;
|
|
1857
|
+
readonly n_features: IntegerType;
|
|
1858
|
+
}>;
|
|
1859
|
+
}>;
|
|
1860
|
+
};
|
|
1861
|
+
/**
|
|
1862
|
+
* SHAP explainability functions.
|
|
1863
|
+
*
|
|
1864
|
+
* Provides model-agnostic feature importance and SHAP value computation.
|
|
1865
|
+
*
|
|
1866
|
+
* @example
|
|
1867
|
+
* ```ts
|
|
1868
|
+
* import { East, variant } from "@elaraai/east";
|
|
1869
|
+
* import { Shap, LightGBM } from "@elaraai/east-py-datascience";
|
|
1870
|
+
*
|
|
1871
|
+
* const explain = East.function([LightGBM.Types.ModelBlobType, Shap.Types.MatrixType(FloatType)], Shap.Types.ShapResultType, ($, model, X) => {
|
|
1872
|
+
* // Create explainer
|
|
1873
|
+
* const explainer = $.let(Shap.treeExplainerCreate(model));
|
|
1874
|
+
*
|
|
1875
|
+
* // Compute SHAP values
|
|
1876
|
+
* const feature_names = $.let(["feature1", "feature2"]);
|
|
1877
|
+
* const result = $.let(Shap.computeValues(explainer, X, feature_names));
|
|
1878
|
+
*
|
|
1879
|
+
* return $.return(result);
|
|
1880
|
+
* });
|
|
1881
|
+
* ```
|
|
1882
|
+
*/
|
|
1883
|
+
export declare const Shap: {
|
|
1884
|
+
/**
|
|
1885
|
+
* Create a SHAP TreeExplainer for tree-based models (XGBoost, LightGBM).
|
|
1886
|
+
*
|
|
1887
|
+
* @example
|
|
1888
|
+
* ```ts
|
|
1889
|
+
* import { East, FloatType, MatrixType } from "@elaraai/east";
|
|
1890
|
+
* import { Shap, XGBoost } from "@elaraai/east-py-datascience";
|
|
1891
|
+
*
|
|
1892
|
+
* const explain = East.function(
|
|
1893
|
+
* [XGBoost.Types.ModelBlobType],
|
|
1894
|
+
* Shap.Types.ShapModelBlobType,
|
|
1895
|
+
* ($, model) => {
|
|
1896
|
+
* return $.return(Shap.treeExplainerCreate(model));
|
|
1897
|
+
* }
|
|
1898
|
+
* );
|
|
1899
|
+
* ```
|
|
1900
|
+
*/
|
|
1901
|
+
readonly treeExplainerCreate: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
1902
|
+
/** XGBoost regressor */
|
|
1903
|
+
readonly xgboost_regressor: StructType<{
|
|
1904
|
+
readonly data: BlobType;
|
|
1905
|
+
readonly n_features: IntegerType;
|
|
1906
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1907
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1908
|
+
}>;
|
|
1909
|
+
/** XGBoost classifier */
|
|
1910
|
+
readonly xgboost_classifier: StructType<{
|
|
1911
|
+
readonly data: BlobType;
|
|
1912
|
+
readonly n_features: IntegerType;
|
|
1913
|
+
readonly n_classes: IntegerType;
|
|
1914
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1915
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1916
|
+
}>;
|
|
1917
|
+
/** XGBoost quantile regressor (uses median quantile for explanations) */
|
|
1918
|
+
readonly xgboost_quantile: StructType<{
|
|
1919
|
+
readonly data: BlobType;
|
|
1920
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1921
|
+
readonly n_features: IntegerType;
|
|
1922
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1923
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1924
|
+
}>;
|
|
1925
|
+
/** MAPIE split conformal regressor with XGBoost base */
|
|
1926
|
+
readonly mapie_split: StructType<{
|
|
1927
|
+
readonly data: VariantType<{
|
|
1928
|
+
readonly xgboost: VariantType<{
|
|
1929
|
+
readonly xgboost_regressor: StructType<{
|
|
1930
|
+
readonly data: BlobType;
|
|
1931
|
+
readonly n_features: IntegerType;
|
|
1932
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1933
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1934
|
+
}>;
|
|
1935
|
+
readonly xgboost_classifier: StructType<{
|
|
1936
|
+
readonly data: BlobType;
|
|
1937
|
+
readonly n_features: IntegerType;
|
|
1938
|
+
readonly n_classes: IntegerType;
|
|
1939
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1940
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1941
|
+
}>;
|
|
1942
|
+
readonly xgboost_quantile: StructType<{
|
|
1943
|
+
readonly data: BlobType;
|
|
1944
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1945
|
+
readonly n_features: IntegerType;
|
|
1946
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1947
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1948
|
+
}>;
|
|
1949
|
+
}>;
|
|
1950
|
+
readonly lightgbm: VariantType<{
|
|
1951
|
+
readonly lightgbm_regressor: StructType<{
|
|
1952
|
+
readonly data: BlobType;
|
|
1953
|
+
readonly n_features: IntegerType;
|
|
1954
|
+
}>;
|
|
1955
|
+
readonly lightgbm_classifier: StructType<{
|
|
1956
|
+
readonly data: BlobType;
|
|
1957
|
+
readonly n_features: IntegerType;
|
|
1958
|
+
readonly n_classes: IntegerType;
|
|
1959
|
+
}>;
|
|
1960
|
+
}>;
|
|
1961
|
+
readonly histogram: BlobType;
|
|
1962
|
+
}>;
|
|
1963
|
+
readonly n_features: IntegerType;
|
|
1964
|
+
readonly confidence_level: FloatType;
|
|
1965
|
+
}>;
|
|
1966
|
+
/** MAPIE cross conformal regressor with XGBoost base */
|
|
1967
|
+
readonly mapie_cross: StructType<{
|
|
1968
|
+
readonly data: VariantType<{
|
|
1969
|
+
readonly xgboost: VariantType<{
|
|
1970
|
+
readonly xgboost_regressor: StructType<{
|
|
1971
|
+
readonly data: BlobType;
|
|
1972
|
+
readonly n_features: IntegerType;
|
|
1973
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1974
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1975
|
+
}>;
|
|
1976
|
+
readonly xgboost_classifier: StructType<{
|
|
1977
|
+
readonly data: BlobType;
|
|
1978
|
+
readonly n_features: IntegerType;
|
|
1979
|
+
readonly n_classes: IntegerType;
|
|
1980
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1981
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1982
|
+
}>;
|
|
1983
|
+
readonly xgboost_quantile: StructType<{
|
|
1984
|
+
readonly data: BlobType;
|
|
1985
|
+
readonly quantiles: VectorType<FloatType>;
|
|
1986
|
+
readonly n_features: IntegerType;
|
|
1987
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
1988
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
1989
|
+
}>;
|
|
1990
|
+
}>;
|
|
1991
|
+
readonly lightgbm: VariantType<{
|
|
1992
|
+
readonly lightgbm_regressor: StructType<{
|
|
1993
|
+
readonly data: BlobType;
|
|
1994
|
+
readonly n_features: IntegerType;
|
|
1995
|
+
}>;
|
|
1996
|
+
readonly lightgbm_classifier: StructType<{
|
|
1997
|
+
readonly data: BlobType;
|
|
1998
|
+
readonly n_features: IntegerType;
|
|
1999
|
+
readonly n_classes: IntegerType;
|
|
2000
|
+
}>;
|
|
2001
|
+
}>;
|
|
2002
|
+
readonly histogram: BlobType;
|
|
2003
|
+
}>;
|
|
2004
|
+
readonly n_features: IntegerType;
|
|
2005
|
+
readonly confidence_level: FloatType;
|
|
2006
|
+
}>;
|
|
2007
|
+
/** MAPIE CQR conformal regressor with XGBoost base */
|
|
2008
|
+
readonly mapie_cqr: StructType<{
|
|
2009
|
+
readonly data: VariantType<{
|
|
2010
|
+
readonly xgboost: VariantType<{
|
|
2011
|
+
readonly xgboost_regressor: StructType<{
|
|
2012
|
+
readonly data: BlobType;
|
|
2013
|
+
readonly n_features: IntegerType;
|
|
2014
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2015
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2016
|
+
}>;
|
|
2017
|
+
readonly xgboost_classifier: StructType<{
|
|
2018
|
+
readonly data: BlobType;
|
|
2019
|
+
readonly n_features: IntegerType;
|
|
2020
|
+
readonly n_classes: IntegerType;
|
|
2021
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2022
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2023
|
+
}>;
|
|
2024
|
+
readonly xgboost_quantile: StructType<{
|
|
2025
|
+
readonly data: BlobType;
|
|
2026
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2027
|
+
readonly n_features: IntegerType;
|
|
2028
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2029
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2030
|
+
}>;
|
|
2031
|
+
}>;
|
|
2032
|
+
readonly lightgbm: VariantType<{
|
|
2033
|
+
readonly lightgbm_regressor: StructType<{
|
|
2034
|
+
readonly data: BlobType;
|
|
2035
|
+
readonly n_features: IntegerType;
|
|
2036
|
+
}>;
|
|
2037
|
+
readonly lightgbm_classifier: StructType<{
|
|
2038
|
+
readonly data: BlobType;
|
|
2039
|
+
readonly n_features: IntegerType;
|
|
2040
|
+
readonly n_classes: IntegerType;
|
|
2041
|
+
}>;
|
|
2042
|
+
}>;
|
|
2043
|
+
readonly histogram: BlobType;
|
|
2044
|
+
}>;
|
|
2045
|
+
readonly n_features: IntegerType;
|
|
2046
|
+
readonly confidence_level: FloatType;
|
|
2047
|
+
}>;
|
|
2048
|
+
/** MAPIE conformal classifier with XGBoost base */
|
|
2049
|
+
readonly mapie_classifier: StructType<{
|
|
2050
|
+
readonly data: VariantType<{
|
|
2051
|
+
readonly xgboost: VariantType<{
|
|
2052
|
+
readonly xgboost_regressor: StructType<{
|
|
2053
|
+
readonly data: BlobType;
|
|
2054
|
+
readonly n_features: IntegerType;
|
|
2055
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2056
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2057
|
+
}>;
|
|
2058
|
+
readonly xgboost_classifier: StructType<{
|
|
2059
|
+
readonly data: BlobType;
|
|
2060
|
+
readonly n_features: IntegerType;
|
|
2061
|
+
readonly n_classes: IntegerType;
|
|
2062
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2063
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2064
|
+
}>;
|
|
2065
|
+
readonly xgboost_quantile: StructType<{
|
|
2066
|
+
readonly data: BlobType;
|
|
2067
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2068
|
+
readonly n_features: IntegerType;
|
|
2069
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2070
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2071
|
+
}>;
|
|
2072
|
+
}>;
|
|
2073
|
+
readonly lightgbm: VariantType<{
|
|
2074
|
+
readonly lightgbm_regressor: StructType<{
|
|
2075
|
+
readonly data: BlobType;
|
|
2076
|
+
readonly n_features: IntegerType;
|
|
2077
|
+
}>;
|
|
2078
|
+
readonly lightgbm_classifier: StructType<{
|
|
2079
|
+
readonly data: BlobType;
|
|
2080
|
+
readonly n_features: IntegerType;
|
|
2081
|
+
readonly n_classes: IntegerType;
|
|
2082
|
+
}>;
|
|
2083
|
+
}>;
|
|
2084
|
+
readonly histogram: BlobType;
|
|
2085
|
+
}>;
|
|
2086
|
+
readonly n_features: IntegerType;
|
|
2087
|
+
readonly n_classes: IntegerType;
|
|
2088
|
+
readonly classes: VectorType<IntegerType>;
|
|
2089
|
+
readonly confidence_level: FloatType;
|
|
2090
|
+
}>;
|
|
2091
|
+
}>], VariantType<{
|
|
2092
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
2093
|
+
readonly shap_tree_explainer: StructType<{
|
|
2094
|
+
/** Cloudpickle serialized explainer */
|
|
2095
|
+
readonly data: BlobType;
|
|
2096
|
+
/** Number of input features */
|
|
2097
|
+
readonly n_features: IntegerType;
|
|
2098
|
+
}>;
|
|
2099
|
+
/** SHAP KernelExplainer for any model */
|
|
2100
|
+
readonly shap_kernel_explainer: StructType<{
|
|
2101
|
+
/** Cloudpickle serialized explainer */
|
|
2102
|
+
readonly data: BlobType;
|
|
2103
|
+
/** Number of input features */
|
|
2104
|
+
readonly n_features: IntegerType;
|
|
2105
|
+
}>;
|
|
2106
|
+
}>>;
|
|
2107
|
+
/**
|
|
2108
|
+
* Create a SHAP KernelExplainer for any model.
|
|
2109
|
+
*
|
|
2110
|
+
* Works with any model (NGBoost, GP, Torch, etc.). Requires background
|
|
2111
|
+
* data for computing expected values.
|
|
2112
|
+
*
|
|
2113
|
+
* @example
|
|
2114
|
+
* ```ts
|
|
2115
|
+
* import { East, FloatType, MatrixType } from "@elaraai/east";
|
|
2116
|
+
* import { Shap, NGBoost } from "@elaraai/east-py-datascience";
|
|
2117
|
+
*
|
|
2118
|
+
* const explain = East.function(
|
|
2119
|
+
* [NGBoost.Types.ModelBlobType, MatrixType(FloatType)],
|
|
2120
|
+
* Shap.Types.ShapModelBlobType,
|
|
2121
|
+
* ($, model, X_background) => {
|
|
2122
|
+
* return $.return(Shap.kernelExplainerCreate(model, X_background));
|
|
2123
|
+
* }
|
|
2124
|
+
* );
|
|
2125
|
+
* ```
|
|
2126
|
+
*/
|
|
2127
|
+
readonly kernelExplainerCreate: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
2128
|
+
readonly xgboost_regressor: StructType<{
|
|
2129
|
+
readonly data: BlobType;
|
|
2130
|
+
readonly n_features: IntegerType;
|
|
2131
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2132
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2133
|
+
}>;
|
|
2134
|
+
readonly xgboost_classifier: StructType<{
|
|
2135
|
+
readonly data: BlobType;
|
|
2136
|
+
readonly n_features: IntegerType;
|
|
2137
|
+
readonly n_classes: IntegerType;
|
|
2138
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2139
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2140
|
+
}>;
|
|
2141
|
+
readonly xgboost_quantile: StructType<{
|
|
2142
|
+
readonly data: BlobType;
|
|
2143
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2144
|
+
readonly n_features: IntegerType;
|
|
2145
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2146
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2147
|
+
}>;
|
|
2148
|
+
readonly lightgbm_regressor: StructType<{
|
|
2149
|
+
readonly data: BlobType;
|
|
2150
|
+
readonly n_features: IntegerType;
|
|
2151
|
+
}>;
|
|
2152
|
+
readonly lightgbm_classifier: StructType<{
|
|
2153
|
+
readonly data: BlobType;
|
|
2154
|
+
readonly n_features: IntegerType;
|
|
2155
|
+
readonly n_classes: IntegerType;
|
|
2156
|
+
}>;
|
|
2157
|
+
readonly ngboost_regressor: StructType<{
|
|
2158
|
+
readonly data: BlobType;
|
|
2159
|
+
readonly distribution: VariantType<{
|
|
2160
|
+
readonly normal: NullType;
|
|
2161
|
+
readonly lognormal: NullType;
|
|
2162
|
+
}>;
|
|
2163
|
+
readonly n_features: IntegerType;
|
|
2164
|
+
}>;
|
|
2165
|
+
readonly gp_regressor: StructType<{
|
|
2166
|
+
readonly data: BlobType;
|
|
2167
|
+
readonly n_features: IntegerType;
|
|
2168
|
+
readonly kernel_type: StringType;
|
|
2169
|
+
}>;
|
|
2170
|
+
readonly torch_mlp: StructType<{
|
|
2171
|
+
readonly data: BlobType;
|
|
2172
|
+
readonly n_features: IntegerType;
|
|
2173
|
+
readonly hidden_layers: ArrayType<IntegerType>;
|
|
2174
|
+
readonly output_dim: IntegerType;
|
|
2175
|
+
}>;
|
|
2176
|
+
readonly standard_scaler: StructType<{
|
|
2177
|
+
readonly onnx: BlobType;
|
|
2178
|
+
readonly n_features: IntegerType;
|
|
2179
|
+
}>;
|
|
2180
|
+
readonly min_max_scaler: StructType<{
|
|
2181
|
+
readonly onnx: BlobType;
|
|
2182
|
+
readonly n_features: IntegerType;
|
|
2183
|
+
}>;
|
|
2184
|
+
readonly robust_scaler: StructType<{
|
|
2185
|
+
readonly onnx: BlobType;
|
|
2186
|
+
readonly n_features: IntegerType;
|
|
2187
|
+
}>;
|
|
2188
|
+
readonly label_encoder: StructType<{
|
|
2189
|
+
readonly data: BlobType;
|
|
2190
|
+
readonly n_classes: IntegerType;
|
|
2191
|
+
}>;
|
|
2192
|
+
readonly ordinal_encoder: StructType<{
|
|
2193
|
+
readonly data: BlobType;
|
|
2194
|
+
readonly n_features: IntegerType;
|
|
2195
|
+
}>;
|
|
2196
|
+
readonly gaussian_mixture: StructType<{
|
|
2197
|
+
readonly data: BlobType;
|
|
2198
|
+
readonly n_features: IntegerType;
|
|
2199
|
+
readonly n_components: IntegerType;
|
|
2200
|
+
}>;
|
|
2201
|
+
readonly regressor_chain: StructType<{
|
|
2202
|
+
readonly data: BlobType;
|
|
2203
|
+
readonly n_features: IntegerType;
|
|
2204
|
+
readonly n_targets: IntegerType;
|
|
2205
|
+
readonly base_estimator_type: StringType;
|
|
2206
|
+
}>;
|
|
2207
|
+
readonly mapie_split: StructType<{
|
|
2208
|
+
readonly data: VariantType<{
|
|
2209
|
+
readonly xgboost: VariantType<{
|
|
2210
|
+
readonly xgboost_regressor: StructType<{
|
|
2211
|
+
readonly data: BlobType;
|
|
2212
|
+
readonly n_features: IntegerType;
|
|
2213
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2214
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2215
|
+
}>;
|
|
2216
|
+
readonly xgboost_classifier: StructType<{
|
|
2217
|
+
readonly data: BlobType;
|
|
2218
|
+
readonly n_features: IntegerType;
|
|
2219
|
+
readonly n_classes: IntegerType;
|
|
2220
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2221
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2222
|
+
}>;
|
|
2223
|
+
readonly xgboost_quantile: StructType<{
|
|
2224
|
+
readonly data: BlobType;
|
|
2225
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2226
|
+
readonly n_features: IntegerType;
|
|
2227
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2228
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2229
|
+
}>;
|
|
2230
|
+
}>;
|
|
2231
|
+
readonly lightgbm: VariantType<{
|
|
2232
|
+
readonly lightgbm_regressor: StructType<{
|
|
2233
|
+
readonly data: BlobType;
|
|
2234
|
+
readonly n_features: IntegerType;
|
|
2235
|
+
}>;
|
|
2236
|
+
readonly lightgbm_classifier: StructType<{
|
|
2237
|
+
readonly data: BlobType;
|
|
2238
|
+
readonly n_features: IntegerType;
|
|
2239
|
+
readonly n_classes: IntegerType;
|
|
2240
|
+
}>;
|
|
2241
|
+
}>;
|
|
2242
|
+
readonly histogram: BlobType;
|
|
2243
|
+
}>;
|
|
2244
|
+
readonly n_features: IntegerType;
|
|
2245
|
+
readonly confidence_level: FloatType;
|
|
2246
|
+
}>;
|
|
2247
|
+
readonly mapie_cross: StructType<{
|
|
2248
|
+
readonly data: VariantType<{
|
|
2249
|
+
readonly xgboost: VariantType<{
|
|
2250
|
+
readonly xgboost_regressor: StructType<{
|
|
2251
|
+
readonly data: BlobType;
|
|
2252
|
+
readonly n_features: IntegerType;
|
|
2253
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2254
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2255
|
+
}>;
|
|
2256
|
+
readonly xgboost_classifier: StructType<{
|
|
2257
|
+
readonly data: BlobType;
|
|
2258
|
+
readonly n_features: IntegerType;
|
|
2259
|
+
readonly n_classes: IntegerType;
|
|
2260
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2261
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2262
|
+
}>;
|
|
2263
|
+
readonly xgboost_quantile: StructType<{
|
|
2264
|
+
readonly data: BlobType;
|
|
2265
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2266
|
+
readonly n_features: IntegerType;
|
|
2267
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2268
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2269
|
+
}>;
|
|
2270
|
+
}>;
|
|
2271
|
+
readonly lightgbm: VariantType<{
|
|
2272
|
+
readonly lightgbm_regressor: StructType<{
|
|
2273
|
+
readonly data: BlobType;
|
|
2274
|
+
readonly n_features: IntegerType;
|
|
2275
|
+
}>;
|
|
2276
|
+
readonly lightgbm_classifier: StructType<{
|
|
2277
|
+
readonly data: BlobType;
|
|
2278
|
+
readonly n_features: IntegerType;
|
|
2279
|
+
readonly n_classes: IntegerType;
|
|
2280
|
+
}>;
|
|
2281
|
+
}>;
|
|
2282
|
+
readonly histogram: BlobType;
|
|
2283
|
+
}>;
|
|
2284
|
+
readonly n_features: IntegerType;
|
|
2285
|
+
readonly confidence_level: FloatType;
|
|
2286
|
+
}>;
|
|
2287
|
+
readonly mapie_cqr: StructType<{
|
|
2288
|
+
readonly data: VariantType<{
|
|
2289
|
+
readonly xgboost: VariantType<{
|
|
2290
|
+
readonly xgboost_regressor: StructType<{
|
|
2291
|
+
readonly data: BlobType;
|
|
2292
|
+
readonly n_features: IntegerType;
|
|
2293
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2294
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2295
|
+
}>;
|
|
2296
|
+
readonly xgboost_classifier: StructType<{
|
|
2297
|
+
readonly data: BlobType;
|
|
2298
|
+
readonly n_features: IntegerType;
|
|
2299
|
+
readonly n_classes: IntegerType;
|
|
2300
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2301
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2302
|
+
}>;
|
|
2303
|
+
readonly xgboost_quantile: StructType<{
|
|
2304
|
+
readonly data: BlobType;
|
|
2305
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2306
|
+
readonly n_features: IntegerType;
|
|
2307
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2308
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2309
|
+
}>;
|
|
2310
|
+
}>;
|
|
2311
|
+
readonly lightgbm: VariantType<{
|
|
2312
|
+
readonly lightgbm_regressor: StructType<{
|
|
2313
|
+
readonly data: BlobType;
|
|
2314
|
+
readonly n_features: IntegerType;
|
|
2315
|
+
}>;
|
|
2316
|
+
readonly lightgbm_classifier: StructType<{
|
|
2317
|
+
readonly data: BlobType;
|
|
2318
|
+
readonly n_features: IntegerType;
|
|
2319
|
+
readonly n_classes: IntegerType;
|
|
2320
|
+
}>;
|
|
2321
|
+
}>;
|
|
2322
|
+
readonly histogram: BlobType;
|
|
2323
|
+
}>;
|
|
2324
|
+
readonly n_features: IntegerType;
|
|
2325
|
+
readonly confidence_level: FloatType;
|
|
2326
|
+
}>;
|
|
2327
|
+
readonly mapie_classifier: StructType<{
|
|
2328
|
+
readonly data: VariantType<{
|
|
2329
|
+
readonly xgboost: VariantType<{
|
|
2330
|
+
readonly xgboost_regressor: StructType<{
|
|
2331
|
+
readonly data: BlobType;
|
|
2332
|
+
readonly n_features: IntegerType;
|
|
2333
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2334
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2335
|
+
}>;
|
|
2336
|
+
readonly xgboost_classifier: StructType<{
|
|
2337
|
+
readonly data: BlobType;
|
|
2338
|
+
readonly n_features: IntegerType;
|
|
2339
|
+
readonly n_classes: IntegerType;
|
|
2340
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2341
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2342
|
+
}>;
|
|
2343
|
+
readonly xgboost_quantile: StructType<{
|
|
2344
|
+
readonly data: BlobType;
|
|
2345
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2346
|
+
readonly n_features: IntegerType;
|
|
2347
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2348
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2349
|
+
}>;
|
|
2350
|
+
}>;
|
|
2351
|
+
readonly lightgbm: VariantType<{
|
|
2352
|
+
readonly lightgbm_regressor: StructType<{
|
|
2353
|
+
readonly data: BlobType;
|
|
2354
|
+
readonly n_features: IntegerType;
|
|
2355
|
+
}>;
|
|
2356
|
+
readonly lightgbm_classifier: StructType<{
|
|
2357
|
+
readonly data: BlobType;
|
|
2358
|
+
readonly n_features: IntegerType;
|
|
2359
|
+
readonly n_classes: IntegerType;
|
|
2360
|
+
}>;
|
|
2361
|
+
}>;
|
|
2362
|
+
readonly histogram: BlobType;
|
|
2363
|
+
}>;
|
|
2364
|
+
readonly n_features: IntegerType;
|
|
2365
|
+
readonly n_classes: IntegerType;
|
|
2366
|
+
readonly classes: VectorType<IntegerType>;
|
|
2367
|
+
readonly confidence_level: FloatType;
|
|
2368
|
+
}>;
|
|
2369
|
+
readonly mapie_interval_width: StructType<{
|
|
2370
|
+
readonly data: BlobType;
|
|
2371
|
+
readonly n_features: IntegerType;
|
|
2372
|
+
}>;
|
|
2373
|
+
readonly mapie_set_size: StructType<{
|
|
2374
|
+
readonly data: BlobType;
|
|
2375
|
+
readonly n_features: IntegerType;
|
|
2376
|
+
}>;
|
|
2377
|
+
}>, MatrixType<FloatType>], VariantType<{
|
|
2378
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
2379
|
+
readonly shap_tree_explainer: StructType<{
|
|
2380
|
+
/** Cloudpickle serialized explainer */
|
|
2381
|
+
readonly data: BlobType;
|
|
2382
|
+
/** Number of input features */
|
|
2383
|
+
readonly n_features: IntegerType;
|
|
2384
|
+
}>;
|
|
2385
|
+
/** SHAP KernelExplainer for any model */
|
|
2386
|
+
readonly shap_kernel_explainer: StructType<{
|
|
2387
|
+
/** Cloudpickle serialized explainer */
|
|
2388
|
+
readonly data: BlobType;
|
|
2389
|
+
/** Number of input features */
|
|
2390
|
+
readonly n_features: IntegerType;
|
|
2391
|
+
}>;
|
|
2392
|
+
}>>;
|
|
2393
|
+
/**
|
|
2394
|
+
* Compute SHAP values for samples.
|
|
2395
|
+
*
|
|
2396
|
+
* @example
|
|
2397
|
+
* ```ts
|
|
2398
|
+
* import { East, FloatType, MatrixType, StringType, VectorType } from "@elaraai/east";
|
|
2399
|
+
* import { Shap } from "@elaraai/east-py-datascience";
|
|
2400
|
+
*
|
|
2401
|
+
* const compute = East.function(
|
|
2402
|
+
* [Shap.Types.ShapModelBlobType, MatrixType(FloatType)],
|
|
2403
|
+
* Shap.Types.ShapResultType,
|
|
2404
|
+
* ($, explainer, X) => {
|
|
2405
|
+
* const feature_names = $.let(["feature_a", "feature_b"]);
|
|
2406
|
+
* const result = $.let(Shap.computeValues(explainer, X, feature_names));
|
|
2407
|
+
* // result.values => SHAP values matrix
|
|
2408
|
+
* // result.base_value => expected value
|
|
2409
|
+
* return $.return(result);
|
|
2410
|
+
* }
|
|
2411
|
+
* );
|
|
2412
|
+
* ```
|
|
2413
|
+
*/
|
|
2414
|
+
readonly computeValues: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
2415
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
2416
|
+
readonly shap_tree_explainer: StructType<{
|
|
2417
|
+
/** Cloudpickle serialized explainer */
|
|
2418
|
+
readonly data: BlobType;
|
|
2419
|
+
/** Number of input features */
|
|
2420
|
+
readonly n_features: IntegerType;
|
|
2421
|
+
}>;
|
|
2422
|
+
/** SHAP KernelExplainer for any model */
|
|
2423
|
+
readonly shap_kernel_explainer: StructType<{
|
|
2424
|
+
/** Cloudpickle serialized explainer */
|
|
2425
|
+
readonly data: BlobType;
|
|
2426
|
+
/** Number of input features */
|
|
2427
|
+
readonly n_features: IntegerType;
|
|
2428
|
+
}>;
|
|
2429
|
+
}>, MatrixType<FloatType>, ArrayType<StringType>], StructType<{
|
|
2430
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
2431
|
+
readonly shap_values: VariantType<{
|
|
2432
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
2433
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
2434
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
2435
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
2436
|
+
}>;
|
|
2437
|
+
/** Base value(s) - single float or per-class array */
|
|
2438
|
+
readonly base_value: VariantType<{
|
|
2439
|
+
/** Single base value for regression or binary classification */
|
|
2440
|
+
readonly single: FloatType;
|
|
2441
|
+
/** Per-class base values for multi-class classification */
|
|
2442
|
+
readonly per_class: VectorType<FloatType>;
|
|
2443
|
+
}>;
|
|
2444
|
+
/** Feature names */
|
|
2445
|
+
readonly feature_names: ArrayType<StringType>;
|
|
2446
|
+
}>>;
|
|
2447
|
+
/**
|
|
2448
|
+
* Compute global feature importance from SHAP values.
|
|
2449
|
+
*
|
|
2450
|
+
* @example
|
|
2451
|
+
* ```ts
|
|
2452
|
+
* import { East, FloatType, MatrixType, StringType, VectorType } from "@elaraai/east";
|
|
2453
|
+
* import { Shap } from "@elaraai/east-py-datascience";
|
|
2454
|
+
*
|
|
2455
|
+
* const importance = East.function(
|
|
2456
|
+
* [Shap.Types.ShapModelBlobType, MatrixType(FloatType)],
|
|
2457
|
+
* Shap.Types.FeatureImportanceType,
|
|
2458
|
+
* ($, explainer, X) => {
|
|
2459
|
+
* const feature_names = $.let(["feature_a", "feature_b"]);
|
|
2460
|
+
* const shap_result = $.let(Shap.computeValues(explainer, X, feature_names));
|
|
2461
|
+
* return $.return(Shap.featureImportance(shap_result.values, feature_names));
|
|
2462
|
+
* }
|
|
2463
|
+
* );
|
|
2464
|
+
* ```
|
|
2465
|
+
*/
|
|
2466
|
+
readonly featureImportance: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
2467
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
2468
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
2469
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
2470
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
2471
|
+
}>, ArrayType<StringType>], StructType<{
|
|
2472
|
+
/** Feature names */
|
|
2473
|
+
readonly feature_names: ArrayType<StringType>;
|
|
2474
|
+
/** Mean absolute SHAP value for each feature */
|
|
2475
|
+
readonly importances: VectorType<FloatType>;
|
|
2476
|
+
/** Standard deviation of absolute SHAP values */
|
|
2477
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
2478
|
+
}>>;
|
|
2479
|
+
/** Type definitions */
|
|
2480
|
+
readonly Types: {
|
|
2481
|
+
/** String vector type */
|
|
2482
|
+
readonly StringVectorType: ArrayType<StringType>;
|
|
2483
|
+
/** SHAP values variant type (2D or 3D) */
|
|
2484
|
+
readonly ShapValuesType: VariantType<{
|
|
2485
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
2486
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
2487
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
2488
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
2489
|
+
}>;
|
|
2490
|
+
/** SHAP base value variant type (single or per-class) */
|
|
2491
|
+
readonly ShapBaseValueType: VariantType<{
|
|
2492
|
+
/** Single base value for regression or binary classification */
|
|
2493
|
+
readonly single: FloatType;
|
|
2494
|
+
/** Per-class base values for multi-class classification */
|
|
2495
|
+
readonly per_class: VectorType<FloatType>;
|
|
2496
|
+
}>;
|
|
2497
|
+
/** SHAP result type */
|
|
2498
|
+
readonly ShapResultType: StructType<{
|
|
2499
|
+
/** SHAP values - 2D matrix or 3D tensor depending on model type */
|
|
2500
|
+
readonly shap_values: VariantType<{
|
|
2501
|
+
/** 2D matrix for regression or binary classification (n_samples x n_features) */
|
|
2502
|
+
readonly matrix_2d: MatrixType<FloatType>;
|
|
2503
|
+
/** 3D tensor for multi-class classification (n_samples x n_features x n_classes) */
|
|
2504
|
+
readonly tensor_3d: ArrayType<MatrixType<FloatType>>;
|
|
2505
|
+
}>;
|
|
2506
|
+
/** Base value(s) - single float or per-class array */
|
|
2507
|
+
readonly base_value: VariantType<{
|
|
2508
|
+
/** Single base value for regression or binary classification */
|
|
2509
|
+
readonly single: FloatType;
|
|
2510
|
+
/** Per-class base values for multi-class classification */
|
|
2511
|
+
readonly per_class: VectorType<FloatType>;
|
|
2512
|
+
}>;
|
|
2513
|
+
/** Feature names */
|
|
2514
|
+
readonly feature_names: ArrayType<StringType>;
|
|
2515
|
+
}>;
|
|
2516
|
+
/** Feature importance type */
|
|
2517
|
+
readonly FeatureImportanceType: StructType<{
|
|
2518
|
+
/** Feature names */
|
|
2519
|
+
readonly feature_names: ArrayType<StringType>;
|
|
2520
|
+
/** Mean absolute SHAP value for each feature */
|
|
2521
|
+
readonly importances: VectorType<FloatType>;
|
|
2522
|
+
/** Standard deviation of absolute SHAP values */
|
|
2523
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
2524
|
+
}>;
|
|
2525
|
+
/** SHAP explainer model blob type */
|
|
2526
|
+
readonly ShapModelBlobType: VariantType<{
|
|
2527
|
+
/** SHAP TreeExplainer for tree-based models */
|
|
2528
|
+
readonly shap_tree_explainer: StructType<{
|
|
2529
|
+
/** Cloudpickle serialized explainer */
|
|
2530
|
+
readonly data: BlobType;
|
|
2531
|
+
/** Number of input features */
|
|
2532
|
+
readonly n_features: IntegerType;
|
|
2533
|
+
}>;
|
|
2534
|
+
/** SHAP KernelExplainer for any model */
|
|
2535
|
+
readonly shap_kernel_explainer: StructType<{
|
|
2536
|
+
/** Cloudpickle serialized explainer */
|
|
2537
|
+
readonly data: BlobType;
|
|
2538
|
+
/** Number of input features */
|
|
2539
|
+
readonly n_features: IntegerType;
|
|
2540
|
+
}>;
|
|
2541
|
+
}>;
|
|
2542
|
+
/** Tree model blob type for input */
|
|
2543
|
+
readonly TreeModelBlobType: VariantType<{
|
|
2544
|
+
/** XGBoost regressor */
|
|
2545
|
+
readonly xgboost_regressor: StructType<{
|
|
2546
|
+
readonly data: BlobType;
|
|
2547
|
+
readonly n_features: IntegerType;
|
|
2548
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2549
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2550
|
+
}>;
|
|
2551
|
+
/** XGBoost classifier */
|
|
2552
|
+
readonly xgboost_classifier: StructType<{
|
|
2553
|
+
readonly data: BlobType;
|
|
2554
|
+
readonly n_features: IntegerType;
|
|
2555
|
+
readonly n_classes: IntegerType;
|
|
2556
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2557
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2558
|
+
}>;
|
|
2559
|
+
/** XGBoost quantile regressor (uses median quantile for explanations) */
|
|
2560
|
+
readonly xgboost_quantile: StructType<{
|
|
2561
|
+
readonly data: BlobType;
|
|
2562
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2563
|
+
readonly n_features: IntegerType;
|
|
2564
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2565
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2566
|
+
}>;
|
|
2567
|
+
/** MAPIE split conformal regressor with XGBoost base */
|
|
2568
|
+
readonly mapie_split: StructType<{
|
|
2569
|
+
readonly data: VariantType<{
|
|
2570
|
+
readonly xgboost: VariantType<{
|
|
2571
|
+
readonly xgboost_regressor: StructType<{
|
|
2572
|
+
readonly data: BlobType;
|
|
2573
|
+
readonly n_features: IntegerType;
|
|
2574
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2575
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2576
|
+
}>;
|
|
2577
|
+
readonly xgboost_classifier: StructType<{
|
|
2578
|
+
readonly data: BlobType;
|
|
2579
|
+
readonly n_features: IntegerType;
|
|
2580
|
+
readonly n_classes: IntegerType;
|
|
2581
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2582
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2583
|
+
}>;
|
|
2584
|
+
readonly xgboost_quantile: StructType<{
|
|
2585
|
+
readonly data: BlobType;
|
|
2586
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2587
|
+
readonly n_features: IntegerType;
|
|
2588
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2589
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2590
|
+
}>;
|
|
2591
|
+
}>;
|
|
2592
|
+
readonly lightgbm: VariantType<{
|
|
2593
|
+
readonly lightgbm_regressor: StructType<{
|
|
2594
|
+
readonly data: BlobType;
|
|
2595
|
+
readonly n_features: IntegerType;
|
|
2596
|
+
}>;
|
|
2597
|
+
readonly lightgbm_classifier: StructType<{
|
|
2598
|
+
readonly data: BlobType;
|
|
2599
|
+
readonly n_features: IntegerType;
|
|
2600
|
+
readonly n_classes: IntegerType;
|
|
2601
|
+
}>;
|
|
2602
|
+
}>;
|
|
2603
|
+
readonly histogram: BlobType;
|
|
2604
|
+
}>;
|
|
2605
|
+
readonly n_features: IntegerType;
|
|
2606
|
+
readonly confidence_level: FloatType;
|
|
2607
|
+
}>;
|
|
2608
|
+
/** MAPIE cross conformal regressor with XGBoost base */
|
|
2609
|
+
readonly mapie_cross: StructType<{
|
|
2610
|
+
readonly data: VariantType<{
|
|
2611
|
+
readonly xgboost: VariantType<{
|
|
2612
|
+
readonly xgboost_regressor: StructType<{
|
|
2613
|
+
readonly data: BlobType;
|
|
2614
|
+
readonly n_features: IntegerType;
|
|
2615
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2616
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2617
|
+
}>;
|
|
2618
|
+
readonly xgboost_classifier: StructType<{
|
|
2619
|
+
readonly data: BlobType;
|
|
2620
|
+
readonly n_features: IntegerType;
|
|
2621
|
+
readonly n_classes: IntegerType;
|
|
2622
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2623
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2624
|
+
}>;
|
|
2625
|
+
readonly xgboost_quantile: StructType<{
|
|
2626
|
+
readonly data: BlobType;
|
|
2627
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2628
|
+
readonly n_features: IntegerType;
|
|
2629
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2630
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2631
|
+
}>;
|
|
2632
|
+
}>;
|
|
2633
|
+
readonly lightgbm: VariantType<{
|
|
2634
|
+
readonly lightgbm_regressor: StructType<{
|
|
2635
|
+
readonly data: BlobType;
|
|
2636
|
+
readonly n_features: IntegerType;
|
|
2637
|
+
}>;
|
|
2638
|
+
readonly lightgbm_classifier: StructType<{
|
|
2639
|
+
readonly data: BlobType;
|
|
2640
|
+
readonly n_features: IntegerType;
|
|
2641
|
+
readonly n_classes: IntegerType;
|
|
2642
|
+
}>;
|
|
2643
|
+
}>;
|
|
2644
|
+
readonly histogram: BlobType;
|
|
2645
|
+
}>;
|
|
2646
|
+
readonly n_features: IntegerType;
|
|
2647
|
+
readonly confidence_level: FloatType;
|
|
2648
|
+
}>;
|
|
2649
|
+
/** MAPIE CQR conformal regressor with XGBoost base */
|
|
2650
|
+
readonly mapie_cqr: StructType<{
|
|
2651
|
+
readonly data: VariantType<{
|
|
2652
|
+
readonly xgboost: VariantType<{
|
|
2653
|
+
readonly xgboost_regressor: StructType<{
|
|
2654
|
+
readonly data: BlobType;
|
|
2655
|
+
readonly n_features: IntegerType;
|
|
2656
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2657
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2658
|
+
}>;
|
|
2659
|
+
readonly xgboost_classifier: StructType<{
|
|
2660
|
+
readonly data: BlobType;
|
|
2661
|
+
readonly n_features: IntegerType;
|
|
2662
|
+
readonly n_classes: IntegerType;
|
|
2663
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2664
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2665
|
+
}>;
|
|
2666
|
+
readonly xgboost_quantile: StructType<{
|
|
2667
|
+
readonly data: BlobType;
|
|
2668
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2669
|
+
readonly n_features: IntegerType;
|
|
2670
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2671
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2672
|
+
}>;
|
|
2673
|
+
}>;
|
|
2674
|
+
readonly lightgbm: VariantType<{
|
|
2675
|
+
readonly lightgbm_regressor: StructType<{
|
|
2676
|
+
readonly data: BlobType;
|
|
2677
|
+
readonly n_features: IntegerType;
|
|
2678
|
+
}>;
|
|
2679
|
+
readonly lightgbm_classifier: StructType<{
|
|
2680
|
+
readonly data: BlobType;
|
|
2681
|
+
readonly n_features: IntegerType;
|
|
2682
|
+
readonly n_classes: IntegerType;
|
|
2683
|
+
}>;
|
|
2684
|
+
}>;
|
|
2685
|
+
readonly histogram: BlobType;
|
|
2686
|
+
}>;
|
|
2687
|
+
readonly n_features: IntegerType;
|
|
2688
|
+
readonly confidence_level: FloatType;
|
|
2689
|
+
}>;
|
|
2690
|
+
/** MAPIE conformal classifier with XGBoost base */
|
|
2691
|
+
readonly mapie_classifier: StructType<{
|
|
2692
|
+
readonly data: VariantType<{
|
|
2693
|
+
readonly xgboost: VariantType<{
|
|
2694
|
+
readonly xgboost_regressor: StructType<{
|
|
2695
|
+
readonly data: BlobType;
|
|
2696
|
+
readonly n_features: IntegerType;
|
|
2697
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2698
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2699
|
+
}>;
|
|
2700
|
+
readonly xgboost_classifier: StructType<{
|
|
2701
|
+
readonly data: BlobType;
|
|
2702
|
+
readonly n_features: IntegerType;
|
|
2703
|
+
readonly n_classes: IntegerType;
|
|
2704
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2705
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2706
|
+
}>;
|
|
2707
|
+
readonly xgboost_quantile: StructType<{
|
|
2708
|
+
readonly data: BlobType;
|
|
2709
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2710
|
+
readonly n_features: IntegerType;
|
|
2711
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2712
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2713
|
+
}>;
|
|
2714
|
+
}>;
|
|
2715
|
+
readonly lightgbm: VariantType<{
|
|
2716
|
+
readonly lightgbm_regressor: StructType<{
|
|
2717
|
+
readonly data: BlobType;
|
|
2718
|
+
readonly n_features: IntegerType;
|
|
2719
|
+
}>;
|
|
2720
|
+
readonly lightgbm_classifier: StructType<{
|
|
2721
|
+
readonly data: BlobType;
|
|
2722
|
+
readonly n_features: IntegerType;
|
|
2723
|
+
readonly n_classes: IntegerType;
|
|
2724
|
+
}>;
|
|
2725
|
+
}>;
|
|
2726
|
+
readonly histogram: BlobType;
|
|
2727
|
+
}>;
|
|
2728
|
+
readonly n_features: IntegerType;
|
|
2729
|
+
readonly n_classes: IntegerType;
|
|
2730
|
+
readonly classes: VectorType<IntegerType>;
|
|
2731
|
+
readonly confidence_level: FloatType;
|
|
2732
|
+
}>;
|
|
2733
|
+
}>;
|
|
2734
|
+
/** Any model blob type for kernel explainer */
|
|
2735
|
+
readonly AnyModelBlobType: VariantType<{
|
|
2736
|
+
readonly xgboost_regressor: StructType<{
|
|
2737
|
+
readonly data: BlobType;
|
|
2738
|
+
readonly n_features: IntegerType;
|
|
2739
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2740
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2741
|
+
}>;
|
|
2742
|
+
readonly xgboost_classifier: StructType<{
|
|
2743
|
+
readonly data: BlobType;
|
|
2744
|
+
readonly n_features: IntegerType;
|
|
2745
|
+
readonly n_classes: IntegerType;
|
|
2746
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2747
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2748
|
+
}>;
|
|
2749
|
+
readonly xgboost_quantile: StructType<{
|
|
2750
|
+
readonly data: BlobType;
|
|
2751
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2752
|
+
readonly n_features: IntegerType;
|
|
2753
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2754
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2755
|
+
}>;
|
|
2756
|
+
readonly lightgbm_regressor: StructType<{
|
|
2757
|
+
readonly data: BlobType;
|
|
2758
|
+
readonly n_features: IntegerType;
|
|
2759
|
+
}>;
|
|
2760
|
+
readonly lightgbm_classifier: StructType<{
|
|
2761
|
+
readonly data: BlobType;
|
|
2762
|
+
readonly n_features: IntegerType;
|
|
2763
|
+
readonly n_classes: IntegerType;
|
|
2764
|
+
}>;
|
|
2765
|
+
readonly ngboost_regressor: StructType<{
|
|
2766
|
+
readonly data: BlobType;
|
|
2767
|
+
readonly distribution: VariantType<{
|
|
2768
|
+
readonly normal: NullType;
|
|
2769
|
+
readonly lognormal: NullType;
|
|
2770
|
+
}>;
|
|
2771
|
+
readonly n_features: IntegerType;
|
|
2772
|
+
}>;
|
|
2773
|
+
readonly gp_regressor: StructType<{
|
|
2774
|
+
readonly data: BlobType;
|
|
2775
|
+
readonly n_features: IntegerType;
|
|
2776
|
+
readonly kernel_type: StringType;
|
|
2777
|
+
}>;
|
|
2778
|
+
readonly torch_mlp: StructType<{
|
|
2779
|
+
readonly data: BlobType;
|
|
2780
|
+
readonly n_features: IntegerType;
|
|
2781
|
+
readonly hidden_layers: ArrayType<IntegerType>;
|
|
2782
|
+
readonly output_dim: IntegerType;
|
|
2783
|
+
}>;
|
|
2784
|
+
readonly standard_scaler: StructType<{
|
|
2785
|
+
readonly onnx: BlobType;
|
|
2786
|
+
readonly n_features: IntegerType;
|
|
2787
|
+
}>;
|
|
2788
|
+
readonly min_max_scaler: StructType<{
|
|
2789
|
+
readonly onnx: BlobType;
|
|
2790
|
+
readonly n_features: IntegerType;
|
|
2791
|
+
}>;
|
|
2792
|
+
readonly robust_scaler: StructType<{
|
|
2793
|
+
readonly onnx: BlobType;
|
|
2794
|
+
readonly n_features: IntegerType;
|
|
2795
|
+
}>;
|
|
2796
|
+
readonly label_encoder: StructType<{
|
|
2797
|
+
readonly data: BlobType;
|
|
2798
|
+
readonly n_classes: IntegerType;
|
|
2799
|
+
}>;
|
|
2800
|
+
readonly ordinal_encoder: StructType<{
|
|
2801
|
+
readonly data: BlobType;
|
|
2802
|
+
readonly n_features: IntegerType;
|
|
2803
|
+
}>;
|
|
2804
|
+
readonly gaussian_mixture: StructType<{
|
|
2805
|
+
readonly data: BlobType;
|
|
2806
|
+
readonly n_features: IntegerType;
|
|
2807
|
+
readonly n_components: IntegerType;
|
|
2808
|
+
}>;
|
|
2809
|
+
readonly regressor_chain: StructType<{
|
|
2810
|
+
readonly data: BlobType;
|
|
2811
|
+
readonly n_features: IntegerType;
|
|
2812
|
+
readonly n_targets: IntegerType;
|
|
2813
|
+
readonly base_estimator_type: StringType;
|
|
2814
|
+
}>;
|
|
2815
|
+
readonly mapie_split: StructType<{
|
|
2816
|
+
readonly data: VariantType<{
|
|
2817
|
+
readonly xgboost: VariantType<{
|
|
2818
|
+
readonly xgboost_regressor: StructType<{
|
|
2819
|
+
readonly data: BlobType;
|
|
2820
|
+
readonly n_features: IntegerType;
|
|
2821
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2822
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2823
|
+
}>;
|
|
2824
|
+
readonly xgboost_classifier: StructType<{
|
|
2825
|
+
readonly data: BlobType;
|
|
2826
|
+
readonly n_features: IntegerType;
|
|
2827
|
+
readonly n_classes: IntegerType;
|
|
2828
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2829
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2830
|
+
}>;
|
|
2831
|
+
readonly xgboost_quantile: StructType<{
|
|
2832
|
+
readonly data: BlobType;
|
|
2833
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2834
|
+
readonly n_features: IntegerType;
|
|
2835
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2836
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2837
|
+
}>;
|
|
2838
|
+
}>;
|
|
2839
|
+
readonly lightgbm: VariantType<{
|
|
2840
|
+
readonly lightgbm_regressor: StructType<{
|
|
2841
|
+
readonly data: BlobType;
|
|
2842
|
+
readonly n_features: IntegerType;
|
|
2843
|
+
}>;
|
|
2844
|
+
readonly lightgbm_classifier: StructType<{
|
|
2845
|
+
readonly data: BlobType;
|
|
2846
|
+
readonly n_features: IntegerType;
|
|
2847
|
+
readonly n_classes: IntegerType;
|
|
2848
|
+
}>;
|
|
2849
|
+
}>;
|
|
2850
|
+
readonly histogram: BlobType;
|
|
2851
|
+
}>;
|
|
2852
|
+
readonly n_features: IntegerType;
|
|
2853
|
+
readonly confidence_level: FloatType;
|
|
2854
|
+
}>;
|
|
2855
|
+
readonly mapie_cross: StructType<{
|
|
2856
|
+
readonly data: VariantType<{
|
|
2857
|
+
readonly xgboost: VariantType<{
|
|
2858
|
+
readonly xgboost_regressor: StructType<{
|
|
2859
|
+
readonly data: BlobType;
|
|
2860
|
+
readonly n_features: IntegerType;
|
|
2861
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2862
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2863
|
+
}>;
|
|
2864
|
+
readonly xgboost_classifier: StructType<{
|
|
2865
|
+
readonly data: BlobType;
|
|
2866
|
+
readonly n_features: IntegerType;
|
|
2867
|
+
readonly n_classes: IntegerType;
|
|
2868
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2869
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2870
|
+
}>;
|
|
2871
|
+
readonly xgboost_quantile: StructType<{
|
|
2872
|
+
readonly data: BlobType;
|
|
2873
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2874
|
+
readonly n_features: IntegerType;
|
|
2875
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2876
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2877
|
+
}>;
|
|
2878
|
+
}>;
|
|
2879
|
+
readonly lightgbm: VariantType<{
|
|
2880
|
+
readonly lightgbm_regressor: StructType<{
|
|
2881
|
+
readonly data: BlobType;
|
|
2882
|
+
readonly n_features: IntegerType;
|
|
2883
|
+
}>;
|
|
2884
|
+
readonly lightgbm_classifier: StructType<{
|
|
2885
|
+
readonly data: BlobType;
|
|
2886
|
+
readonly n_features: IntegerType;
|
|
2887
|
+
readonly n_classes: IntegerType;
|
|
2888
|
+
}>;
|
|
2889
|
+
}>;
|
|
2890
|
+
readonly histogram: BlobType;
|
|
2891
|
+
}>;
|
|
2892
|
+
readonly n_features: IntegerType;
|
|
2893
|
+
readonly confidence_level: FloatType;
|
|
2894
|
+
}>;
|
|
2895
|
+
readonly mapie_cqr: StructType<{
|
|
2896
|
+
readonly data: VariantType<{
|
|
2897
|
+
readonly xgboost: VariantType<{
|
|
2898
|
+
readonly xgboost_regressor: StructType<{
|
|
2899
|
+
readonly data: BlobType;
|
|
2900
|
+
readonly n_features: IntegerType;
|
|
2901
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2902
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2903
|
+
}>;
|
|
2904
|
+
readonly xgboost_classifier: StructType<{
|
|
2905
|
+
readonly data: BlobType;
|
|
2906
|
+
readonly n_features: IntegerType;
|
|
2907
|
+
readonly n_classes: IntegerType;
|
|
2908
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2909
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2910
|
+
}>;
|
|
2911
|
+
readonly xgboost_quantile: StructType<{
|
|
2912
|
+
readonly data: BlobType;
|
|
2913
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2914
|
+
readonly n_features: IntegerType;
|
|
2915
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2916
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2917
|
+
}>;
|
|
2918
|
+
}>;
|
|
2919
|
+
readonly lightgbm: VariantType<{
|
|
2920
|
+
readonly lightgbm_regressor: StructType<{
|
|
2921
|
+
readonly data: BlobType;
|
|
2922
|
+
readonly n_features: IntegerType;
|
|
2923
|
+
}>;
|
|
2924
|
+
readonly lightgbm_classifier: StructType<{
|
|
2925
|
+
readonly data: BlobType;
|
|
2926
|
+
readonly n_features: IntegerType;
|
|
2927
|
+
readonly n_classes: IntegerType;
|
|
2928
|
+
}>;
|
|
2929
|
+
}>;
|
|
2930
|
+
readonly histogram: BlobType;
|
|
2931
|
+
}>;
|
|
2932
|
+
readonly n_features: IntegerType;
|
|
2933
|
+
readonly confidence_level: FloatType;
|
|
2934
|
+
}>;
|
|
2935
|
+
readonly mapie_classifier: StructType<{
|
|
2936
|
+
readonly data: VariantType<{
|
|
2937
|
+
readonly xgboost: VariantType<{
|
|
2938
|
+
readonly xgboost_regressor: StructType<{
|
|
2939
|
+
readonly data: BlobType;
|
|
2940
|
+
readonly n_features: IntegerType;
|
|
2941
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2942
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2943
|
+
}>;
|
|
2944
|
+
readonly xgboost_classifier: StructType<{
|
|
2945
|
+
readonly data: BlobType;
|
|
2946
|
+
readonly n_features: IntegerType;
|
|
2947
|
+
readonly n_classes: IntegerType;
|
|
2948
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2949
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2950
|
+
}>;
|
|
2951
|
+
readonly xgboost_quantile: StructType<{
|
|
2952
|
+
readonly data: BlobType;
|
|
2953
|
+
readonly quantiles: VectorType<FloatType>;
|
|
2954
|
+
readonly n_features: IntegerType;
|
|
2955
|
+
readonly categorical_features: OptionType<VectorType<IntegerType>>;
|
|
2956
|
+
readonly categorical_n: OptionType<VectorType<IntegerType>>;
|
|
2957
|
+
}>;
|
|
2958
|
+
}>;
|
|
2959
|
+
readonly lightgbm: VariantType<{
|
|
2960
|
+
readonly lightgbm_regressor: StructType<{
|
|
2961
|
+
readonly data: BlobType;
|
|
2962
|
+
readonly n_features: IntegerType;
|
|
2963
|
+
}>;
|
|
2964
|
+
readonly lightgbm_classifier: StructType<{
|
|
2965
|
+
readonly data: BlobType;
|
|
2966
|
+
readonly n_features: IntegerType;
|
|
2967
|
+
readonly n_classes: IntegerType;
|
|
2968
|
+
}>;
|
|
2969
|
+
}>;
|
|
2970
|
+
readonly histogram: BlobType;
|
|
2971
|
+
}>;
|
|
2972
|
+
readonly n_features: IntegerType;
|
|
2973
|
+
readonly n_classes: IntegerType;
|
|
2974
|
+
readonly classes: VectorType<IntegerType>;
|
|
2975
|
+
readonly confidence_level: FloatType;
|
|
2976
|
+
}>;
|
|
2977
|
+
readonly mapie_interval_width: StructType<{
|
|
2978
|
+
readonly data: BlobType;
|
|
2979
|
+
readonly n_features: IntegerType;
|
|
2980
|
+
}>;
|
|
2981
|
+
readonly mapie_set_size: StructType<{
|
|
2982
|
+
readonly data: BlobType;
|
|
2983
|
+
readonly n_features: IntegerType;
|
|
2984
|
+
}>;
|
|
2985
|
+
}>;
|
|
2986
|
+
};
|
|
2987
|
+
};
|
|
2988
|
+
//# sourceMappingURL=shap.d.ts.map
|