@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
|
@@ -12,36 +12,37 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
*/
|
|
14
14
|
import { StructType, VariantType, OptionType, IntegerType, FloatType, BlobType, NullType } from "@elaraai/east";
|
|
15
|
+
import { VectorType, MatrixType } from "../types.js";
|
|
15
16
|
export { VectorType, MatrixType } from "../types.js";
|
|
16
17
|
/**
|
|
17
18
|
* Distribution type for NGBoost.
|
|
18
19
|
*/
|
|
19
20
|
export declare const NGBoostDistributionType: VariantType<{
|
|
20
21
|
/** Normal (Gaussian) distribution */
|
|
21
|
-
normal: NullType;
|
|
22
|
+
readonly normal: NullType;
|
|
22
23
|
/** Log-normal distribution (for positive targets) */
|
|
23
|
-
lognormal: NullType;
|
|
24
|
+
readonly lognormal: NullType;
|
|
24
25
|
}>;
|
|
25
26
|
/**
|
|
26
27
|
* Configuration for NGBoost models.
|
|
27
28
|
*/
|
|
28
29
|
export declare const NGBoostConfigType: StructType<{
|
|
29
30
|
/** Number of boosting rounds (default 500) */
|
|
30
|
-
n_estimators: OptionType<IntegerType>;
|
|
31
|
+
readonly n_estimators: OptionType<IntegerType>;
|
|
31
32
|
/** Learning rate / step size shrinkage (default 0.01) */
|
|
32
|
-
learning_rate: OptionType<FloatType>;
|
|
33
|
+
readonly learning_rate: OptionType<FloatType>;
|
|
33
34
|
/** Fraction of samples to use in each iteration (default 1.0) */
|
|
34
|
-
minibatch_frac: OptionType<FloatType>;
|
|
35
|
+
readonly minibatch_frac: OptionType<FloatType>;
|
|
35
36
|
/** Fraction of features to use in each iteration (default 1.0) */
|
|
36
|
-
col_sample: OptionType<FloatType>;
|
|
37
|
+
readonly col_sample: OptionType<FloatType>;
|
|
37
38
|
/** Random seed for reproducibility */
|
|
38
|
-
random_state: OptionType<IntegerType>;
|
|
39
|
+
readonly random_state: OptionType<IntegerType>;
|
|
39
40
|
/** Distribution type (default normal) */
|
|
40
|
-
distribution: OptionType<VariantType<{
|
|
41
|
+
readonly distribution: OptionType<VariantType<{
|
|
41
42
|
/** Normal (Gaussian) distribution */
|
|
42
|
-
normal: NullType;
|
|
43
|
+
readonly normal: NullType;
|
|
43
44
|
/** Log-normal distribution (for positive targets) */
|
|
44
|
-
lognormal: NullType;
|
|
45
|
+
readonly lognormal: NullType;
|
|
45
46
|
}>>;
|
|
46
47
|
}>;
|
|
47
48
|
/**
|
|
@@ -49,38 +50,38 @@ export declare const NGBoostConfigType: StructType<{
|
|
|
49
50
|
*/
|
|
50
51
|
export declare const NGBoostPredictConfigType: StructType<{
|
|
51
52
|
/** Confidence level for intervals (default 0.95) */
|
|
52
|
-
confidence_level: OptionType<FloatType>;
|
|
53
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
53
54
|
}>;
|
|
54
55
|
/**
|
|
55
56
|
* Result type for probabilistic predictions.
|
|
56
57
|
*/
|
|
57
58
|
export declare const NGBoostPredictResultType: StructType<{
|
|
58
59
|
/** Point predictions (mean) */
|
|
59
|
-
predictions:
|
|
60
|
+
readonly predictions: VectorType<FloatType>;
|
|
60
61
|
/** Standard deviation */
|
|
61
|
-
std: OptionType<
|
|
62
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
62
63
|
/** Lower confidence interval */
|
|
63
|
-
lower: OptionType<
|
|
64
|
+
readonly lower: OptionType<VectorType<FloatType>>;
|
|
64
65
|
/** Upper confidence interval */
|
|
65
|
-
upper: OptionType<
|
|
66
|
+
readonly upper: OptionType<VectorType<FloatType>>;
|
|
66
67
|
}>;
|
|
67
68
|
/**
|
|
68
69
|
* Model blob type for serialized NGBoost models.
|
|
69
70
|
*/
|
|
70
71
|
export declare const NGBoostModelBlobType: VariantType<{
|
|
71
72
|
/** NGBoost regressor model */
|
|
72
|
-
ngboost_regressor: StructType<{
|
|
73
|
+
readonly ngboost_regressor: StructType<{
|
|
73
74
|
/** Cloudpickle serialized model */
|
|
74
|
-
data: BlobType;
|
|
75
|
+
readonly data: BlobType;
|
|
75
76
|
/** Distribution type used */
|
|
76
|
-
distribution: VariantType<{
|
|
77
|
+
readonly distribution: VariantType<{
|
|
77
78
|
/** Normal (Gaussian) distribution */
|
|
78
|
-
normal: NullType;
|
|
79
|
+
readonly normal: NullType;
|
|
79
80
|
/** Log-normal distribution (for positive targets) */
|
|
80
|
-
lognormal: NullType;
|
|
81
|
+
readonly lognormal: NullType;
|
|
81
82
|
}>;
|
|
82
83
|
/** Number of input features */
|
|
83
|
-
n_features: IntegerType;
|
|
84
|
+
readonly n_features: IntegerType;
|
|
84
85
|
}>;
|
|
85
86
|
}>;
|
|
86
87
|
/**
|
|
@@ -91,38 +92,38 @@ export declare const NGBoostModelBlobType: VariantType<{
|
|
|
91
92
|
* @param config - NGBoost configuration
|
|
92
93
|
* @returns Model blob containing trained regressor
|
|
93
94
|
*/
|
|
94
|
-
export declare const ngboost_train_regressor: import("@elaraai/east").PlatformDefinition<[
|
|
95
|
+
export declare const ngboost_train_regressor: import("@elaraai/east").PlatformDefinition<[MatrixType<FloatType>, VectorType<FloatType>, StructType<{
|
|
95
96
|
/** Number of boosting rounds (default 500) */
|
|
96
|
-
n_estimators: OptionType<IntegerType>;
|
|
97
|
+
readonly n_estimators: OptionType<IntegerType>;
|
|
97
98
|
/** Learning rate / step size shrinkage (default 0.01) */
|
|
98
|
-
learning_rate: OptionType<FloatType>;
|
|
99
|
+
readonly learning_rate: OptionType<FloatType>;
|
|
99
100
|
/** Fraction of samples to use in each iteration (default 1.0) */
|
|
100
|
-
minibatch_frac: OptionType<FloatType>;
|
|
101
|
+
readonly minibatch_frac: OptionType<FloatType>;
|
|
101
102
|
/** Fraction of features to use in each iteration (default 1.0) */
|
|
102
|
-
col_sample: OptionType<FloatType>;
|
|
103
|
+
readonly col_sample: OptionType<FloatType>;
|
|
103
104
|
/** Random seed for reproducibility */
|
|
104
|
-
random_state: OptionType<IntegerType>;
|
|
105
|
+
readonly random_state: OptionType<IntegerType>;
|
|
105
106
|
/** Distribution type (default normal) */
|
|
106
|
-
distribution: OptionType<VariantType<{
|
|
107
|
+
readonly distribution: OptionType<VariantType<{
|
|
107
108
|
/** Normal (Gaussian) distribution */
|
|
108
|
-
normal: NullType;
|
|
109
|
+
readonly normal: NullType;
|
|
109
110
|
/** Log-normal distribution (for positive targets) */
|
|
110
|
-
lognormal: NullType;
|
|
111
|
+
readonly lognormal: NullType;
|
|
111
112
|
}>>;
|
|
112
113
|
}>], VariantType<{
|
|
113
114
|
/** NGBoost regressor model */
|
|
114
|
-
ngboost_regressor: StructType<{
|
|
115
|
+
readonly ngboost_regressor: StructType<{
|
|
115
116
|
/** Cloudpickle serialized model */
|
|
116
|
-
data: BlobType;
|
|
117
|
+
readonly data: BlobType;
|
|
117
118
|
/** Distribution type used */
|
|
118
|
-
distribution: VariantType<{
|
|
119
|
+
readonly distribution: VariantType<{
|
|
119
120
|
/** Normal (Gaussian) distribution */
|
|
120
|
-
normal: NullType;
|
|
121
|
+
readonly normal: NullType;
|
|
121
122
|
/** Log-normal distribution (for positive targets) */
|
|
122
|
-
lognormal: NullType;
|
|
123
|
+
readonly lognormal: NullType;
|
|
123
124
|
}>;
|
|
124
125
|
/** Number of input features */
|
|
125
|
-
n_features: IntegerType;
|
|
126
|
+
readonly n_features: IntegerType;
|
|
126
127
|
}>;
|
|
127
128
|
}>>;
|
|
128
129
|
/**
|
|
@@ -134,20 +135,20 @@ export declare const ngboost_train_regressor: import("@elaraai/east").PlatformDe
|
|
|
134
135
|
*/
|
|
135
136
|
export declare const ngboost_predict: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
136
137
|
/** NGBoost regressor model */
|
|
137
|
-
ngboost_regressor: StructType<{
|
|
138
|
+
readonly ngboost_regressor: StructType<{
|
|
138
139
|
/** Cloudpickle serialized model */
|
|
139
|
-
data: BlobType;
|
|
140
|
+
readonly data: BlobType;
|
|
140
141
|
/** Distribution type used */
|
|
141
|
-
distribution: VariantType<{
|
|
142
|
+
readonly distribution: VariantType<{
|
|
142
143
|
/** Normal (Gaussian) distribution */
|
|
143
|
-
normal: NullType;
|
|
144
|
+
readonly normal: NullType;
|
|
144
145
|
/** Log-normal distribution (for positive targets) */
|
|
145
|
-
lognormal: NullType;
|
|
146
|
+
readonly lognormal: NullType;
|
|
146
147
|
}>;
|
|
147
148
|
/** Number of input features */
|
|
148
|
-
n_features: IntegerType;
|
|
149
|
+
readonly n_features: IntegerType;
|
|
149
150
|
}>;
|
|
150
|
-
}>,
|
|
151
|
+
}>, MatrixType<FloatType>], VectorType<FloatType>>;
|
|
151
152
|
/**
|
|
152
153
|
* Get predictions with full uncertainty from NGBoost regressor.
|
|
153
154
|
*
|
|
@@ -160,98 +161,94 @@ export declare const ngboost_predict: import("@elaraai/east").PlatformDefinition
|
|
|
160
161
|
*/
|
|
161
162
|
export declare const ngboost_predict_dist: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
162
163
|
/** NGBoost regressor model */
|
|
163
|
-
ngboost_regressor: StructType<{
|
|
164
|
+
readonly ngboost_regressor: StructType<{
|
|
164
165
|
/** Cloudpickle serialized model */
|
|
165
|
-
data: BlobType;
|
|
166
|
+
readonly data: BlobType;
|
|
166
167
|
/** Distribution type used */
|
|
167
|
-
distribution: VariantType<{
|
|
168
|
+
readonly distribution: VariantType<{
|
|
168
169
|
/** Normal (Gaussian) distribution */
|
|
169
|
-
normal: NullType;
|
|
170
|
+
readonly normal: NullType;
|
|
170
171
|
/** Log-normal distribution (for positive targets) */
|
|
171
|
-
lognormal: NullType;
|
|
172
|
+
readonly lognormal: NullType;
|
|
172
173
|
}>;
|
|
173
174
|
/** Number of input features */
|
|
174
|
-
n_features: IntegerType;
|
|
175
|
+
readonly n_features: IntegerType;
|
|
175
176
|
}>;
|
|
176
|
-
}>,
|
|
177
|
+
}>, MatrixType<FloatType>, StructType<{
|
|
177
178
|
/** Confidence level for intervals (default 0.95) */
|
|
178
|
-
confidence_level: OptionType<FloatType>;
|
|
179
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
179
180
|
}>], StructType<{
|
|
180
181
|
/** Point predictions (mean) */
|
|
181
|
-
predictions:
|
|
182
|
+
readonly predictions: VectorType<FloatType>;
|
|
182
183
|
/** Standard deviation */
|
|
183
|
-
std: OptionType<
|
|
184
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
184
185
|
/** Lower confidence interval */
|
|
185
|
-
lower: OptionType<
|
|
186
|
+
readonly lower: OptionType<VectorType<FloatType>>;
|
|
186
187
|
/** Upper confidence interval */
|
|
187
|
-
upper: OptionType<
|
|
188
|
+
readonly upper: OptionType<VectorType<FloatType>>;
|
|
188
189
|
}>>;
|
|
189
190
|
/**
|
|
190
191
|
* Type definitions for NGBoost functions.
|
|
191
192
|
*/
|
|
192
193
|
export declare const NGBoostTypes: {
|
|
193
|
-
/** Vector type (array of floats) */
|
|
194
|
-
readonly VectorType: import("@elaraai/east").ArrayType<FloatType>;
|
|
195
|
-
/** Matrix type (2D array of floats) */
|
|
196
|
-
readonly MatrixType: import("@elaraai/east").ArrayType<import("@elaraai/east").ArrayType<FloatType>>;
|
|
197
194
|
/** Distribution type for NGBoost */
|
|
198
195
|
readonly NGBoostDistributionType: VariantType<{
|
|
199
196
|
/** Normal (Gaussian) distribution */
|
|
200
|
-
normal: NullType;
|
|
197
|
+
readonly normal: NullType;
|
|
201
198
|
/** Log-normal distribution (for positive targets) */
|
|
202
|
-
lognormal: NullType;
|
|
199
|
+
readonly lognormal: NullType;
|
|
203
200
|
}>;
|
|
204
201
|
/** NGBoost configuration type */
|
|
205
202
|
readonly NGBoostConfigType: StructType<{
|
|
206
203
|
/** Number of boosting rounds (default 500) */
|
|
207
|
-
n_estimators: OptionType<IntegerType>;
|
|
204
|
+
readonly n_estimators: OptionType<IntegerType>;
|
|
208
205
|
/** Learning rate / step size shrinkage (default 0.01) */
|
|
209
|
-
learning_rate: OptionType<FloatType>;
|
|
206
|
+
readonly learning_rate: OptionType<FloatType>;
|
|
210
207
|
/** Fraction of samples to use in each iteration (default 1.0) */
|
|
211
|
-
minibatch_frac: OptionType<FloatType>;
|
|
208
|
+
readonly minibatch_frac: OptionType<FloatType>;
|
|
212
209
|
/** Fraction of features to use in each iteration (default 1.0) */
|
|
213
|
-
col_sample: OptionType<FloatType>;
|
|
210
|
+
readonly col_sample: OptionType<FloatType>;
|
|
214
211
|
/** Random seed for reproducibility */
|
|
215
|
-
random_state: OptionType<IntegerType>;
|
|
212
|
+
readonly random_state: OptionType<IntegerType>;
|
|
216
213
|
/** Distribution type (default normal) */
|
|
217
|
-
distribution: OptionType<VariantType<{
|
|
214
|
+
readonly distribution: OptionType<VariantType<{
|
|
218
215
|
/** Normal (Gaussian) distribution */
|
|
219
|
-
normal: NullType;
|
|
216
|
+
readonly normal: NullType;
|
|
220
217
|
/** Log-normal distribution (for positive targets) */
|
|
221
|
-
lognormal: NullType;
|
|
218
|
+
readonly lognormal: NullType;
|
|
222
219
|
}>>;
|
|
223
220
|
}>;
|
|
224
221
|
/** Prediction configuration type */
|
|
225
222
|
readonly NGBoostPredictConfigType: StructType<{
|
|
226
223
|
/** Confidence level for intervals (default 0.95) */
|
|
227
|
-
confidence_level: OptionType<FloatType>;
|
|
224
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
228
225
|
}>;
|
|
229
226
|
/** Prediction result type */
|
|
230
227
|
readonly NGBoostPredictResultType: StructType<{
|
|
231
228
|
/** Point predictions (mean) */
|
|
232
|
-
predictions:
|
|
229
|
+
readonly predictions: VectorType<FloatType>;
|
|
233
230
|
/** Standard deviation */
|
|
234
|
-
std: OptionType<
|
|
231
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
235
232
|
/** Lower confidence interval */
|
|
236
|
-
lower: OptionType<
|
|
233
|
+
readonly lower: OptionType<VectorType<FloatType>>;
|
|
237
234
|
/** Upper confidence interval */
|
|
238
|
-
upper: OptionType<
|
|
235
|
+
readonly upper: OptionType<VectorType<FloatType>>;
|
|
239
236
|
}>;
|
|
240
237
|
/** Model blob type for NGBoost models */
|
|
241
238
|
readonly ModelBlobType: VariantType<{
|
|
242
239
|
/** NGBoost regressor model */
|
|
243
|
-
ngboost_regressor: StructType<{
|
|
240
|
+
readonly ngboost_regressor: StructType<{
|
|
244
241
|
/** Cloudpickle serialized model */
|
|
245
|
-
data: BlobType;
|
|
242
|
+
readonly data: BlobType;
|
|
246
243
|
/** Distribution type used */
|
|
247
|
-
distribution: VariantType<{
|
|
244
|
+
readonly distribution: VariantType<{
|
|
248
245
|
/** Normal (Gaussian) distribution */
|
|
249
|
-
normal: NullType;
|
|
246
|
+
readonly normal: NullType;
|
|
250
247
|
/** Log-normal distribution (for positive targets) */
|
|
251
|
-
lognormal: NullType;
|
|
248
|
+
readonly lognormal: NullType;
|
|
252
249
|
}>;
|
|
253
250
|
/** Number of input features */
|
|
254
|
-
n_features: IntegerType;
|
|
251
|
+
readonly n_features: IntegerType;
|
|
255
252
|
}>;
|
|
256
253
|
}>;
|
|
257
254
|
};
|
|
@@ -281,151 +278,204 @@ export declare const NGBoostTypes: {
|
|
|
281
278
|
* ```
|
|
282
279
|
*/
|
|
283
280
|
export declare const NGBoost: {
|
|
284
|
-
/**
|
|
285
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Train an NGBoost regression model with probabilistic output.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```ts
|
|
286
|
+
* import { East, FloatType, MatrixType, VectorType, variant } from "@elaraai/east";
|
|
287
|
+
* import { NGBoost, NGBoostConfigType } from "@elaraai/east-py-datascience";
|
|
288
|
+
*
|
|
289
|
+
* const train = East.function([], NGBoost.Types.ModelBlobType, ($) => {
|
|
290
|
+
* const X = $.let([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0], [7.0, 8.0]]);
|
|
291
|
+
* const y = $.let(new Float64Array([1.0, 2.0, 3.0, 4.0]));
|
|
292
|
+
* const config = $.let({
|
|
293
|
+
* n_estimators: variant("some", 100n), learning_rate: variant("some", 0.01),
|
|
294
|
+
* minibatch_frac: variant("none", null), col_sample: variant("none", null),
|
|
295
|
+
* random_state: variant("some", 42n), distribution: variant("none", null),
|
|
296
|
+
* }, NGBoostConfigType);
|
|
297
|
+
* return $.return(NGBoost.trainRegressor(X, y, config));
|
|
298
|
+
* });
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
readonly trainRegressor: import("@elaraai/east").PlatformDefinition<[MatrixType<FloatType>, VectorType<FloatType>, StructType<{
|
|
286
302
|
/** Number of boosting rounds (default 500) */
|
|
287
|
-
n_estimators: OptionType<IntegerType>;
|
|
303
|
+
readonly n_estimators: OptionType<IntegerType>;
|
|
288
304
|
/** Learning rate / step size shrinkage (default 0.01) */
|
|
289
|
-
learning_rate: OptionType<FloatType>;
|
|
305
|
+
readonly learning_rate: OptionType<FloatType>;
|
|
290
306
|
/** Fraction of samples to use in each iteration (default 1.0) */
|
|
291
|
-
minibatch_frac: OptionType<FloatType>;
|
|
307
|
+
readonly minibatch_frac: OptionType<FloatType>;
|
|
292
308
|
/** Fraction of features to use in each iteration (default 1.0) */
|
|
293
|
-
col_sample: OptionType<FloatType>;
|
|
309
|
+
readonly col_sample: OptionType<FloatType>;
|
|
294
310
|
/** Random seed for reproducibility */
|
|
295
|
-
random_state: OptionType<IntegerType>;
|
|
311
|
+
readonly random_state: OptionType<IntegerType>;
|
|
296
312
|
/** Distribution type (default normal) */
|
|
297
|
-
distribution: OptionType<VariantType<{
|
|
313
|
+
readonly distribution: OptionType<VariantType<{
|
|
298
314
|
/** Normal (Gaussian) distribution */
|
|
299
|
-
normal: NullType;
|
|
315
|
+
readonly normal: NullType;
|
|
300
316
|
/** Log-normal distribution (for positive targets) */
|
|
301
|
-
lognormal: NullType;
|
|
317
|
+
readonly lognormal: NullType;
|
|
302
318
|
}>>;
|
|
303
319
|
}>], VariantType<{
|
|
304
320
|
/** NGBoost regressor model */
|
|
305
|
-
ngboost_regressor: StructType<{
|
|
321
|
+
readonly ngboost_regressor: StructType<{
|
|
306
322
|
/** Cloudpickle serialized model */
|
|
307
|
-
data: BlobType;
|
|
323
|
+
readonly data: BlobType;
|
|
308
324
|
/** Distribution type used */
|
|
309
|
-
distribution: VariantType<{
|
|
325
|
+
readonly distribution: VariantType<{
|
|
310
326
|
/** Normal (Gaussian) distribution */
|
|
311
|
-
normal: NullType;
|
|
327
|
+
readonly normal: NullType;
|
|
312
328
|
/** Log-normal distribution (for positive targets) */
|
|
313
|
-
lognormal: NullType;
|
|
329
|
+
readonly lognormal: NullType;
|
|
314
330
|
}>;
|
|
315
331
|
/** Number of input features */
|
|
316
|
-
n_features: IntegerType;
|
|
332
|
+
readonly n_features: IntegerType;
|
|
317
333
|
}>;
|
|
318
334
|
}>>;
|
|
319
|
-
/**
|
|
335
|
+
/**
|
|
336
|
+
* Make point predictions with a trained NGBoost regressor.
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* ```ts
|
|
340
|
+
* import { East, FloatType, MatrixType, VectorType } from "@elaraai/east";
|
|
341
|
+
* import { NGBoost } from "@elaraai/east-py-datascience";
|
|
342
|
+
*
|
|
343
|
+
* const predictFn = East.function(
|
|
344
|
+
* [NGBoost.Types.ModelBlobType, MatrixType(FloatType)],
|
|
345
|
+
* VectorType(FloatType),
|
|
346
|
+
* ($, model, X) => {
|
|
347
|
+
* return $.return(NGBoost.predict(model, X));
|
|
348
|
+
* }
|
|
349
|
+
* );
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
320
352
|
readonly predict: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
321
353
|
/** NGBoost regressor model */
|
|
322
|
-
ngboost_regressor: StructType<{
|
|
354
|
+
readonly ngboost_regressor: StructType<{
|
|
323
355
|
/** Cloudpickle serialized model */
|
|
324
|
-
data: BlobType;
|
|
356
|
+
readonly data: BlobType;
|
|
325
357
|
/** Distribution type used */
|
|
326
|
-
distribution: VariantType<{
|
|
358
|
+
readonly distribution: VariantType<{
|
|
327
359
|
/** Normal (Gaussian) distribution */
|
|
328
|
-
normal: NullType;
|
|
360
|
+
readonly normal: NullType;
|
|
329
361
|
/** Log-normal distribution (for positive targets) */
|
|
330
|
-
lognormal: NullType;
|
|
362
|
+
readonly lognormal: NullType;
|
|
331
363
|
}>;
|
|
332
364
|
/** Number of input features */
|
|
333
|
-
n_features: IntegerType;
|
|
365
|
+
readonly n_features: IntegerType;
|
|
334
366
|
}>;
|
|
335
|
-
}>,
|
|
336
|
-
/**
|
|
367
|
+
}>, MatrixType<FloatType>], VectorType<FloatType>>;
|
|
368
|
+
/**
|
|
369
|
+
* Get predictions with uncertainty estimates (confidence intervals, std).
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```ts
|
|
373
|
+
* import { East, FloatType, MatrixType, variant } from "@elaraai/east";
|
|
374
|
+
* import { NGBoost, NGBoostPredictConfigType } from "@elaraai/east-py-datascience";
|
|
375
|
+
*
|
|
376
|
+
* const predictFn = East.function(
|
|
377
|
+
* [NGBoost.Types.ModelBlobType, MatrixType(FloatType)],
|
|
378
|
+
* NGBoost.Types.NGBoostPredictResultType,
|
|
379
|
+
* ($, model, X) => {
|
|
380
|
+
* const config = $.let({
|
|
381
|
+
* confidence_level: variant("some", 0.95),
|
|
382
|
+
* }, NGBoostPredictConfigType);
|
|
383
|
+
* const result = $.let(NGBoost.predictDist(model, X, config));
|
|
384
|
+
* // result.predictions => point predictions
|
|
385
|
+
* // result.lower, result.upper => confidence interval
|
|
386
|
+
* return $.return(result);
|
|
387
|
+
* }
|
|
388
|
+
* );
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
337
391
|
readonly predictDist: import("@elaraai/east").PlatformDefinition<[VariantType<{
|
|
338
392
|
/** NGBoost regressor model */
|
|
339
|
-
ngboost_regressor: StructType<{
|
|
393
|
+
readonly ngboost_regressor: StructType<{
|
|
340
394
|
/** Cloudpickle serialized model */
|
|
341
|
-
data: BlobType;
|
|
395
|
+
readonly data: BlobType;
|
|
342
396
|
/** Distribution type used */
|
|
343
|
-
distribution: VariantType<{
|
|
397
|
+
readonly distribution: VariantType<{
|
|
344
398
|
/** Normal (Gaussian) distribution */
|
|
345
|
-
normal: NullType;
|
|
399
|
+
readonly normal: NullType;
|
|
346
400
|
/** Log-normal distribution (for positive targets) */
|
|
347
|
-
lognormal: NullType;
|
|
401
|
+
readonly lognormal: NullType;
|
|
348
402
|
}>;
|
|
349
403
|
/** Number of input features */
|
|
350
|
-
n_features: IntegerType;
|
|
404
|
+
readonly n_features: IntegerType;
|
|
351
405
|
}>;
|
|
352
|
-
}>,
|
|
406
|
+
}>, MatrixType<FloatType>, StructType<{
|
|
353
407
|
/** Confidence level for intervals (default 0.95) */
|
|
354
|
-
confidence_level: OptionType<FloatType>;
|
|
408
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
355
409
|
}>], StructType<{
|
|
356
410
|
/** Point predictions (mean) */
|
|
357
|
-
predictions:
|
|
411
|
+
readonly predictions: VectorType<FloatType>;
|
|
358
412
|
/** Standard deviation */
|
|
359
|
-
std: OptionType<
|
|
413
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
360
414
|
/** Lower confidence interval */
|
|
361
|
-
lower: OptionType<
|
|
415
|
+
readonly lower: OptionType<VectorType<FloatType>>;
|
|
362
416
|
/** Upper confidence interval */
|
|
363
|
-
upper: OptionType<
|
|
417
|
+
readonly upper: OptionType<VectorType<FloatType>>;
|
|
364
418
|
}>>;
|
|
365
419
|
/** Type definitions */
|
|
366
420
|
readonly Types: {
|
|
367
|
-
/** Vector type (array of floats) */
|
|
368
|
-
readonly VectorType: import("@elaraai/east").ArrayType<FloatType>;
|
|
369
|
-
/** Matrix type (2D array of floats) */
|
|
370
|
-
readonly MatrixType: import("@elaraai/east").ArrayType<import("@elaraai/east").ArrayType<FloatType>>;
|
|
371
421
|
/** Distribution type for NGBoost */
|
|
372
422
|
readonly NGBoostDistributionType: VariantType<{
|
|
373
423
|
/** Normal (Gaussian) distribution */
|
|
374
|
-
normal: NullType;
|
|
424
|
+
readonly normal: NullType;
|
|
375
425
|
/** Log-normal distribution (for positive targets) */
|
|
376
|
-
lognormal: NullType;
|
|
426
|
+
readonly lognormal: NullType;
|
|
377
427
|
}>;
|
|
378
428
|
/** NGBoost configuration type */
|
|
379
429
|
readonly NGBoostConfigType: StructType<{
|
|
380
430
|
/** Number of boosting rounds (default 500) */
|
|
381
|
-
n_estimators: OptionType<IntegerType>;
|
|
431
|
+
readonly n_estimators: OptionType<IntegerType>;
|
|
382
432
|
/** Learning rate / step size shrinkage (default 0.01) */
|
|
383
|
-
learning_rate: OptionType<FloatType>;
|
|
433
|
+
readonly learning_rate: OptionType<FloatType>;
|
|
384
434
|
/** Fraction of samples to use in each iteration (default 1.0) */
|
|
385
|
-
minibatch_frac: OptionType<FloatType>;
|
|
435
|
+
readonly minibatch_frac: OptionType<FloatType>;
|
|
386
436
|
/** Fraction of features to use in each iteration (default 1.0) */
|
|
387
|
-
col_sample: OptionType<FloatType>;
|
|
437
|
+
readonly col_sample: OptionType<FloatType>;
|
|
388
438
|
/** Random seed for reproducibility */
|
|
389
|
-
random_state: OptionType<IntegerType>;
|
|
439
|
+
readonly random_state: OptionType<IntegerType>;
|
|
390
440
|
/** Distribution type (default normal) */
|
|
391
|
-
distribution: OptionType<VariantType<{
|
|
441
|
+
readonly distribution: OptionType<VariantType<{
|
|
392
442
|
/** Normal (Gaussian) distribution */
|
|
393
|
-
normal: NullType;
|
|
443
|
+
readonly normal: NullType;
|
|
394
444
|
/** Log-normal distribution (for positive targets) */
|
|
395
|
-
lognormal: NullType;
|
|
445
|
+
readonly lognormal: NullType;
|
|
396
446
|
}>>;
|
|
397
447
|
}>;
|
|
398
448
|
/** Prediction configuration type */
|
|
399
449
|
readonly NGBoostPredictConfigType: StructType<{
|
|
400
450
|
/** Confidence level for intervals (default 0.95) */
|
|
401
|
-
confidence_level: OptionType<FloatType>;
|
|
451
|
+
readonly confidence_level: OptionType<FloatType>;
|
|
402
452
|
}>;
|
|
403
453
|
/** Prediction result type */
|
|
404
454
|
readonly NGBoostPredictResultType: StructType<{
|
|
405
455
|
/** Point predictions (mean) */
|
|
406
|
-
predictions:
|
|
456
|
+
readonly predictions: VectorType<FloatType>;
|
|
407
457
|
/** Standard deviation */
|
|
408
|
-
std: OptionType<
|
|
458
|
+
readonly std: OptionType<VectorType<FloatType>>;
|
|
409
459
|
/** Lower confidence interval */
|
|
410
|
-
lower: OptionType<
|
|
460
|
+
readonly lower: OptionType<VectorType<FloatType>>;
|
|
411
461
|
/** Upper confidence interval */
|
|
412
|
-
upper: OptionType<
|
|
462
|
+
readonly upper: OptionType<VectorType<FloatType>>;
|
|
413
463
|
}>;
|
|
414
464
|
/** Model blob type for NGBoost models */
|
|
415
465
|
readonly ModelBlobType: VariantType<{
|
|
416
466
|
/** NGBoost regressor model */
|
|
417
|
-
ngboost_regressor: StructType<{
|
|
467
|
+
readonly ngboost_regressor: StructType<{
|
|
418
468
|
/** Cloudpickle serialized model */
|
|
419
|
-
data: BlobType;
|
|
469
|
+
readonly data: BlobType;
|
|
420
470
|
/** Distribution type used */
|
|
421
|
-
distribution: VariantType<{
|
|
471
|
+
readonly distribution: VariantType<{
|
|
422
472
|
/** Normal (Gaussian) distribution */
|
|
423
|
-
normal: NullType;
|
|
473
|
+
readonly normal: NullType;
|
|
424
474
|
/** Log-normal distribution (for positive targets) */
|
|
425
|
-
lognormal: NullType;
|
|
475
|
+
readonly lognormal: NullType;
|
|
426
476
|
}>;
|
|
427
477
|
/** Number of input features */
|
|
428
|
-
n_features: IntegerType;
|
|
478
|
+
readonly n_features: IntegerType;
|
|
429
479
|
}>;
|
|
430
480
|
}>;
|
|
431
481
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngboost.d.ts","sourceRoot":"","sources":["../../../src/ngboost/ngboost.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAEH,UAAU,EACV,WAAW,EACX,UAAU,EACV,WA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