@elaraai/east-py-datascience 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/package.json +3 -3
  2. package/dist/src/alns/alns.d.ts +0 -528
  3. package/dist/src/alns/alns.d.ts.map +0 -1
  4. package/dist/src/alns/alns.js +0 -238
  5. package/dist/src/alns/alns.js.map +0 -1
  6. package/dist/src/google_or/google_or.d.ts +0 -2457
  7. package/dist/src/google_or/google_or.d.ts.map +0 -1
  8. package/dist/src/google_or/google_or.js +0 -547
  9. package/dist/src/google_or/google_or.js.map +0 -1
  10. package/dist/src/gp/gp.d.ts +0 -447
  11. package/dist/src/gp/gp.d.ts.map +0 -1
  12. package/dist/src/gp/gp.js +0 -222
  13. package/dist/src/gp/gp.js.map +0 -1
  14. package/dist/src/index.d.ts +0 -34
  15. package/dist/src/index.d.ts.map +0 -1
  16. package/dist/src/index.js +0 -57
  17. package/dist/src/index.js.map +0 -1
  18. package/dist/src/lightgbm/lightgbm.d.ts +0 -575
  19. package/dist/src/lightgbm/lightgbm.d.ts.map +0 -1
  20. package/dist/src/lightgbm/lightgbm.js +0 -241
  21. package/dist/src/lightgbm/lightgbm.js.map +0 -1
  22. package/dist/src/lightning/lightning.d.ts +0 -1594
  23. package/dist/src/lightning/lightning.d.ts.map +0 -1
  24. package/dist/src/lightning/lightning.js +0 -468
  25. package/dist/src/lightning/lightning.js.map +0 -1
  26. package/dist/src/mads/mads.d.ts +0 -410
  27. package/dist/src/mads/mads.d.ts.map +0 -1
  28. package/dist/src/mads/mads.js +0 -219
  29. package/dist/src/mads/mads.js.map +0 -1
  30. package/dist/src/mapie/mapie.d.ts +0 -3680
  31. package/dist/src/mapie/mapie.d.ts.map +0 -1
  32. package/dist/src/mapie/mapie.js +0 -616
  33. package/dist/src/mapie/mapie.js.map +0 -1
  34. package/dist/src/ngboost/ngboost.d.ts +0 -483
  35. package/dist/src/ngboost/ngboost.d.ts.map +0 -1
  36. package/dist/src/ngboost/ngboost.js +0 -231
  37. package/dist/src/ngboost/ngboost.js.map +0 -1
  38. package/dist/src/optimization/optimization.d.ts +0 -700
  39. package/dist/src/optimization/optimization.d.ts.map +0 -1
  40. package/dist/src/optimization/optimization.js +0 -411
  41. package/dist/src/optimization/optimization.js.map +0 -1
  42. package/dist/src/optuna/optuna.d.ts +0 -857
  43. package/dist/src/optuna/optuna.d.ts.map +0 -1
  44. package/dist/src/optuna/optuna.js +0 -270
  45. package/dist/src/optuna/optuna.js.map +0 -1
  46. package/dist/src/pymc/pymc.d.ts +0 -2932
  47. package/dist/src/pymc/pymc.d.ts.map +0 -1
  48. package/dist/src/pymc/pymc.js +0 -688
  49. package/dist/src/pymc/pymc.js.map +0 -1
  50. package/dist/src/scipy/scipy.d.ts +0 -2205
  51. package/dist/src/scipy/scipy.d.ts.map +0 -1
  52. package/dist/src/scipy/scipy.js +0 -884
  53. package/dist/src/scipy/scipy.js.map +0 -1
  54. package/dist/src/shap/shap.d.ts +0 -4611
  55. package/dist/src/shap/shap.d.ts.map +0 -1
  56. package/dist/src/shap/shap.js +0 -552
  57. package/dist/src/shap/shap.js.map +0 -1
  58. package/dist/src/simanneal/simanneal.d.ts +0 -628
  59. package/dist/src/simanneal/simanneal.d.ts.map +0 -1
  60. package/dist/src/simanneal/simanneal.js +0 -328
  61. package/dist/src/simanneal/simanneal.js.map +0 -1
  62. package/dist/src/simulation/simulation.d.ts +0 -224
  63. package/dist/src/simulation/simulation.d.ts.map +0 -1
  64. package/dist/src/simulation/simulation.js +0 -189
  65. package/dist/src/simulation/simulation.js.map +0 -1
  66. package/dist/src/sklearn/sklearn.d.ts +0 -6362
  67. package/dist/src/sklearn/sklearn.d.ts.map +0 -1
  68. package/dist/src/sklearn/sklearn.js +0 -1508
  69. package/dist/src/sklearn/sklearn.js.map +0 -1
  70. package/dist/src/torch/torch.d.ts +0 -1205
  71. package/dist/src/torch/torch.d.ts.map +0 -1
  72. package/dist/src/torch/torch.js +0 -440
  73. package/dist/src/torch/torch.js.map +0 -1
  74. package/dist/src/types.d.ts +0 -43
  75. package/dist/src/types.d.ts.map +0 -1
  76. package/dist/src/types.js +0 -44
  77. package/dist/src/types.js.map +0 -1
  78. package/dist/src/xgboost/xgboost.d.ts +0 -1424
  79. package/dist/src/xgboost/xgboost.d.ts.map +0 -1
  80. package/dist/src/xgboost/xgboost.js +0 -432
  81. package/dist/src/xgboost/xgboost.js.map +0 -1
@@ -1,575 +0,0 @@
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
- * LightGBM platform functions for East.
7
- *
8
- * Provides fast gradient boosting for regression and classification.
9
- * Uses cloudpickle for model serialization.
10
- *
11
- * @packageDocumentation
12
- */
13
- import { StructType, VariantType, OptionType, IntegerType, FloatType, BlobType } from "@elaraai/east";
14
- import { VectorType, MatrixType } from "../types.js";
15
- export { VectorType, MatrixType } from "../types.js";
16
- /**
17
- * Configuration for LightGBM models.
18
- */
19
- export declare const LightGBMConfigType: StructType<{
20
- /** Number of boosting rounds (default 100) */
21
- readonly n_estimators: OptionType<IntegerType>;
22
- /** Maximum tree depth, -1 for unlimited (default -1) */
23
- readonly max_depth: OptionType<IntegerType>;
24
- /** Learning rate / step size shrinkage (default 0.1) */
25
- readonly learning_rate: OptionType<FloatType>;
26
- /** Maximum number of leaves in one tree (default 31) */
27
- readonly num_leaves: OptionType<IntegerType>;
28
- /** Minimum number of samples required in a leaf (default 20) */
29
- readonly min_child_samples: OptionType<IntegerType>;
30
- /** Subsample ratio of training instances (default 1.0) */
31
- readonly subsample: OptionType<FloatType>;
32
- /** Subsample ratio of columns when constructing trees (default 1.0) */
33
- readonly colsample_bytree: OptionType<FloatType>;
34
- /** L1 regularization term (default 0) */
35
- readonly reg_alpha: OptionType<FloatType>;
36
- /** L2 regularization term (default 0) */
37
- readonly reg_lambda: OptionType<FloatType>;
38
- /** Random seed for reproducibility */
39
- readonly random_state: OptionType<IntegerType>;
40
- /** Number of parallel threads (default -1 for all cores) */
41
- readonly n_jobs: OptionType<IntegerType>;
42
- }>;
43
- /**
44
- * Model blob type for serialized LightGBM models.
45
- *
46
- * Each model type has its own variant case containing cloudpickle bytes and metadata.
47
- */
48
- export declare const LightGBMModelBlobType: VariantType<{
49
- /** LightGBM regressor model */
50
- readonly lightgbm_regressor: StructType<{
51
- /** Cloudpickle serialized model */
52
- readonly data: BlobType;
53
- /** Number of input features */
54
- readonly n_features: IntegerType;
55
- }>;
56
- /** LightGBM classifier model */
57
- readonly lightgbm_classifier: StructType<{
58
- /** Cloudpickle serialized model */
59
- readonly data: BlobType;
60
- /** Number of input features */
61
- readonly n_features: IntegerType;
62
- /** Number of classes */
63
- readonly n_classes: IntegerType;
64
- }>;
65
- }>;
66
- /**
67
- * Train a LightGBM regression model.
68
- *
69
- * @param X - Feature matrix
70
- * @param y - Target vector
71
- * @param config - LightGBM configuration
72
- * @returns Model blob containing trained regressor
73
- */
74
- export declare const lightgbm_train_regressor: import("@elaraai/east").PlatformDefinition<[MatrixType<FloatType>, VectorType<FloatType>, StructType<{
75
- /** Number of boosting rounds (default 100) */
76
- readonly n_estimators: OptionType<IntegerType>;
77
- /** Maximum tree depth, -1 for unlimited (default -1) */
78
- readonly max_depth: OptionType<IntegerType>;
79
- /** Learning rate / step size shrinkage (default 0.1) */
80
- readonly learning_rate: OptionType<FloatType>;
81
- /** Maximum number of leaves in one tree (default 31) */
82
- readonly num_leaves: OptionType<IntegerType>;
83
- /** Minimum number of samples required in a leaf (default 20) */
84
- readonly min_child_samples: OptionType<IntegerType>;
85
- /** Subsample ratio of training instances (default 1.0) */
86
- readonly subsample: OptionType<FloatType>;
87
- /** Subsample ratio of columns when constructing trees (default 1.0) */
88
- readonly colsample_bytree: OptionType<FloatType>;
89
- /** L1 regularization term (default 0) */
90
- readonly reg_alpha: OptionType<FloatType>;
91
- /** L2 regularization term (default 0) */
92
- readonly reg_lambda: OptionType<FloatType>;
93
- /** Random seed for reproducibility */
94
- readonly random_state: OptionType<IntegerType>;
95
- /** Number of parallel threads (default -1 for all cores) */
96
- readonly n_jobs: OptionType<IntegerType>;
97
- }>], VariantType<{
98
- /** LightGBM regressor model */
99
- readonly lightgbm_regressor: StructType<{
100
- /** Cloudpickle serialized model */
101
- readonly data: BlobType;
102
- /** Number of input features */
103
- readonly n_features: IntegerType;
104
- }>;
105
- /** LightGBM classifier model */
106
- readonly lightgbm_classifier: StructType<{
107
- /** Cloudpickle serialized model */
108
- readonly data: BlobType;
109
- /** Number of input features */
110
- readonly n_features: IntegerType;
111
- /** Number of classes */
112
- readonly n_classes: IntegerType;
113
- }>;
114
- }>>;
115
- /**
116
- * Train a LightGBM classification model.
117
- *
118
- * @param X - Feature matrix
119
- * @param y - Label vector (integer class labels)
120
- * @param config - LightGBM configuration
121
- * @returns Model blob containing trained classifier
122
- */
123
- export declare const lightgbm_train_classifier: import("@elaraai/east").PlatformDefinition<[MatrixType<FloatType>, VectorType<IntegerType>, StructType<{
124
- /** Number of boosting rounds (default 100) */
125
- readonly n_estimators: OptionType<IntegerType>;
126
- /** Maximum tree depth, -1 for unlimited (default -1) */
127
- readonly max_depth: OptionType<IntegerType>;
128
- /** Learning rate / step size shrinkage (default 0.1) */
129
- readonly learning_rate: OptionType<FloatType>;
130
- /** Maximum number of leaves in one tree (default 31) */
131
- readonly num_leaves: OptionType<IntegerType>;
132
- /** Minimum number of samples required in a leaf (default 20) */
133
- readonly min_child_samples: OptionType<IntegerType>;
134
- /** Subsample ratio of training instances (default 1.0) */
135
- readonly subsample: OptionType<FloatType>;
136
- /** Subsample ratio of columns when constructing trees (default 1.0) */
137
- readonly colsample_bytree: OptionType<FloatType>;
138
- /** L1 regularization term (default 0) */
139
- readonly reg_alpha: OptionType<FloatType>;
140
- /** L2 regularization term (default 0) */
141
- readonly reg_lambda: OptionType<FloatType>;
142
- /** Random seed for reproducibility */
143
- readonly random_state: OptionType<IntegerType>;
144
- /** Number of parallel threads (default -1 for all cores) */
145
- readonly n_jobs: OptionType<IntegerType>;
146
- }>], VariantType<{
147
- /** LightGBM regressor model */
148
- readonly lightgbm_regressor: StructType<{
149
- /** Cloudpickle serialized model */
150
- readonly data: BlobType;
151
- /** Number of input features */
152
- readonly n_features: IntegerType;
153
- }>;
154
- /** LightGBM classifier model */
155
- readonly lightgbm_classifier: StructType<{
156
- /** Cloudpickle serialized model */
157
- readonly data: BlobType;
158
- /** Number of input features */
159
- readonly n_features: IntegerType;
160
- /** Number of classes */
161
- readonly n_classes: IntegerType;
162
- }>;
163
- }>>;
164
- /**
165
- * Make predictions with a trained LightGBM regressor.
166
- *
167
- * @param model - Trained regressor model blob
168
- * @param X - Feature matrix
169
- * @returns Predicted values
170
- */
171
- export declare const lightgbm_predict: import("@elaraai/east").PlatformDefinition<[VariantType<{
172
- /** LightGBM regressor model */
173
- readonly lightgbm_regressor: StructType<{
174
- /** Cloudpickle serialized model */
175
- readonly data: BlobType;
176
- /** Number of input features */
177
- readonly n_features: IntegerType;
178
- }>;
179
- /** LightGBM classifier model */
180
- readonly lightgbm_classifier: StructType<{
181
- /** Cloudpickle serialized model */
182
- readonly data: BlobType;
183
- /** Number of input features */
184
- readonly n_features: IntegerType;
185
- /** Number of classes */
186
- readonly n_classes: IntegerType;
187
- }>;
188
- }>, MatrixType<FloatType>], VectorType<FloatType>>;
189
- /**
190
- * Predict class labels with a trained LightGBM classifier.
191
- *
192
- * @param model - Trained classifier model blob
193
- * @param X - Feature matrix
194
- * @returns Predicted class labels
195
- */
196
- export declare const lightgbm_predict_class: import("@elaraai/east").PlatformDefinition<[VariantType<{
197
- /** LightGBM regressor model */
198
- readonly lightgbm_regressor: StructType<{
199
- /** Cloudpickle serialized model */
200
- readonly data: BlobType;
201
- /** Number of input features */
202
- readonly n_features: IntegerType;
203
- }>;
204
- /** LightGBM classifier model */
205
- readonly lightgbm_classifier: StructType<{
206
- /** Cloudpickle serialized model */
207
- readonly data: BlobType;
208
- /** Number of input features */
209
- readonly n_features: IntegerType;
210
- /** Number of classes */
211
- readonly n_classes: IntegerType;
212
- }>;
213
- }>, MatrixType<FloatType>], VectorType<IntegerType>>;
214
- /**
215
- * Get class probabilities from a trained LightGBM classifier.
216
- *
217
- * @param model - Trained classifier model blob
218
- * @param X - Feature matrix
219
- * @returns Probability matrix (n_samples x n_classes)
220
- */
221
- export declare const lightgbm_predict_proba: import("@elaraai/east").PlatformDefinition<[VariantType<{
222
- /** LightGBM regressor model */
223
- readonly lightgbm_regressor: StructType<{
224
- /** Cloudpickle serialized model */
225
- readonly data: BlobType;
226
- /** Number of input features */
227
- readonly n_features: IntegerType;
228
- }>;
229
- /** LightGBM classifier model */
230
- readonly lightgbm_classifier: StructType<{
231
- /** Cloudpickle serialized model */
232
- readonly data: BlobType;
233
- /** Number of input features */
234
- readonly n_features: IntegerType;
235
- /** Number of classes */
236
- readonly n_classes: IntegerType;
237
- }>;
238
- }>, MatrixType<FloatType>], MatrixType<FloatType>>;
239
- /**
240
- * Type definitions for LightGBM functions.
241
- */
242
- export declare const LightGBMTypes: {
243
- /** LightGBM configuration type */
244
- readonly LightGBMConfigType: StructType<{
245
- /** Number of boosting rounds (default 100) */
246
- readonly n_estimators: OptionType<IntegerType>;
247
- /** Maximum tree depth, -1 for unlimited (default -1) */
248
- readonly max_depth: OptionType<IntegerType>;
249
- /** Learning rate / step size shrinkage (default 0.1) */
250
- readonly learning_rate: OptionType<FloatType>;
251
- /** Maximum number of leaves in one tree (default 31) */
252
- readonly num_leaves: OptionType<IntegerType>;
253
- /** Minimum number of samples required in a leaf (default 20) */
254
- readonly min_child_samples: OptionType<IntegerType>;
255
- /** Subsample ratio of training instances (default 1.0) */
256
- readonly subsample: OptionType<FloatType>;
257
- /** Subsample ratio of columns when constructing trees (default 1.0) */
258
- readonly colsample_bytree: OptionType<FloatType>;
259
- /** L1 regularization term (default 0) */
260
- readonly reg_alpha: OptionType<FloatType>;
261
- /** L2 regularization term (default 0) */
262
- readonly reg_lambda: OptionType<FloatType>;
263
- /** Random seed for reproducibility */
264
- readonly random_state: OptionType<IntegerType>;
265
- /** Number of parallel threads (default -1 for all cores) */
266
- readonly n_jobs: OptionType<IntegerType>;
267
- }>;
268
- /** Model blob type for LightGBM models */
269
- readonly ModelBlobType: VariantType<{
270
- /** LightGBM regressor model */
271
- readonly lightgbm_regressor: StructType<{
272
- /** Cloudpickle serialized model */
273
- readonly data: BlobType;
274
- /** Number of input features */
275
- readonly n_features: IntegerType;
276
- }>;
277
- /** LightGBM classifier model */
278
- readonly lightgbm_classifier: StructType<{
279
- /** Cloudpickle serialized model */
280
- readonly data: BlobType;
281
- /** Number of input features */
282
- readonly n_features: IntegerType;
283
- /** Number of classes */
284
- readonly n_classes: IntegerType;
285
- }>;
286
- }>;
287
- };
288
- /**
289
- * LightGBM gradient boosting.
290
- *
291
- * Provides fast regression and classification with gradient boosted decision trees.
292
- */
293
- export declare const LightGBM: {
294
- /**
295
- * Train a LightGBM regression model.
296
- *
297
- * @example
298
- * ```ts
299
- * import { East, FloatType, MatrixType, VectorType, variant } from "@elaraai/east";
300
- * import { LightGBM, LightGBMConfigType } from "@elaraai/east-py-datascience";
301
- *
302
- * const train = East.function([], LightGBM.Types.ModelBlobType, ($) => {
303
- * const X = $.let([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0], [7.0, 8.0]]);
304
- * const y = $.let(new Float64Array([1.0, 2.0, 3.0, 4.0]));
305
- * const config = $.let({
306
- * n_estimators: variant("some", 100n), max_depth: variant("some", 3n),
307
- * learning_rate: variant("some", 0.1), num_leaves: variant("none", null),
308
- * min_child_samples: variant("none", null), subsample: variant("none", null),
309
- * colsample_bytree: variant("none", null), reg_alpha: variant("none", null),
310
- * reg_lambda: variant("none", null), random_state: variant("some", 42n),
311
- * n_jobs: variant("none", null),
312
- * }, LightGBMConfigType);
313
- * return $.return(LightGBM.trainRegressor(X, y, config));
314
- * });
315
- * ```
316
- */
317
- readonly trainRegressor: import("@elaraai/east").PlatformDefinition<[MatrixType<FloatType>, VectorType<FloatType>, StructType<{
318
- /** Number of boosting rounds (default 100) */
319
- readonly n_estimators: OptionType<IntegerType>;
320
- /** Maximum tree depth, -1 for unlimited (default -1) */
321
- readonly max_depth: OptionType<IntegerType>;
322
- /** Learning rate / step size shrinkage (default 0.1) */
323
- readonly learning_rate: OptionType<FloatType>;
324
- /** Maximum number of leaves in one tree (default 31) */
325
- readonly num_leaves: OptionType<IntegerType>;
326
- /** Minimum number of samples required in a leaf (default 20) */
327
- readonly min_child_samples: OptionType<IntegerType>;
328
- /** Subsample ratio of training instances (default 1.0) */
329
- readonly subsample: OptionType<FloatType>;
330
- /** Subsample ratio of columns when constructing trees (default 1.0) */
331
- readonly colsample_bytree: OptionType<FloatType>;
332
- /** L1 regularization term (default 0) */
333
- readonly reg_alpha: OptionType<FloatType>;
334
- /** L2 regularization term (default 0) */
335
- readonly reg_lambda: OptionType<FloatType>;
336
- /** Random seed for reproducibility */
337
- readonly random_state: OptionType<IntegerType>;
338
- /** Number of parallel threads (default -1 for all cores) */
339
- readonly n_jobs: OptionType<IntegerType>;
340
- }>], VariantType<{
341
- /** LightGBM regressor model */
342
- readonly lightgbm_regressor: StructType<{
343
- /** Cloudpickle serialized model */
344
- readonly data: BlobType;
345
- /** Number of input features */
346
- readonly n_features: IntegerType;
347
- }>;
348
- /** LightGBM classifier model */
349
- readonly lightgbm_classifier: StructType<{
350
- /** Cloudpickle serialized model */
351
- readonly data: BlobType;
352
- /** Number of input features */
353
- readonly n_features: IntegerType;
354
- /** Number of classes */
355
- readonly n_classes: IntegerType;
356
- }>;
357
- }>>;
358
- /**
359
- * Train a LightGBM classification model.
360
- *
361
- * @example
362
- * ```ts
363
- * import { East, FloatType, IntegerType, MatrixType, VectorType, variant } from "@elaraai/east";
364
- * import { LightGBM, LightGBMConfigType } from "@elaraai/east-py-datascience";
365
- *
366
- * const train = East.function([], LightGBM.Types.ModelBlobType, ($) => {
367
- * const X = $.let([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0], [7.0, 8.0]]);
368
- * const y = $.let(new BigInt64Array([0n, 1n, 0n, 1n]));
369
- * const config = $.let({
370
- * n_estimators: variant("some", 50n), max_depth: variant("some", 3n),
371
- * learning_rate: variant("some", 0.1), num_leaves: variant("none", null),
372
- * min_child_samples: variant("none", null), subsample: variant("none", null),
373
- * colsample_bytree: variant("none", null), reg_alpha: variant("none", null),
374
- * reg_lambda: variant("none", null), random_state: variant("some", 42n),
375
- * n_jobs: variant("none", null),
376
- * }, LightGBMConfigType);
377
- * return $.return(LightGBM.trainClassifier(X, y, config));
378
- * });
379
- * ```
380
- */
381
- readonly trainClassifier: import("@elaraai/east").PlatformDefinition<[MatrixType<FloatType>, VectorType<IntegerType>, StructType<{
382
- /** Number of boosting rounds (default 100) */
383
- readonly n_estimators: OptionType<IntegerType>;
384
- /** Maximum tree depth, -1 for unlimited (default -1) */
385
- readonly max_depth: OptionType<IntegerType>;
386
- /** Learning rate / step size shrinkage (default 0.1) */
387
- readonly learning_rate: OptionType<FloatType>;
388
- /** Maximum number of leaves in one tree (default 31) */
389
- readonly num_leaves: OptionType<IntegerType>;
390
- /** Minimum number of samples required in a leaf (default 20) */
391
- readonly min_child_samples: OptionType<IntegerType>;
392
- /** Subsample ratio of training instances (default 1.0) */
393
- readonly subsample: OptionType<FloatType>;
394
- /** Subsample ratio of columns when constructing trees (default 1.0) */
395
- readonly colsample_bytree: OptionType<FloatType>;
396
- /** L1 regularization term (default 0) */
397
- readonly reg_alpha: OptionType<FloatType>;
398
- /** L2 regularization term (default 0) */
399
- readonly reg_lambda: OptionType<FloatType>;
400
- /** Random seed for reproducibility */
401
- readonly random_state: OptionType<IntegerType>;
402
- /** Number of parallel threads (default -1 for all cores) */
403
- readonly n_jobs: OptionType<IntegerType>;
404
- }>], VariantType<{
405
- /** LightGBM regressor model */
406
- readonly lightgbm_regressor: StructType<{
407
- /** Cloudpickle serialized model */
408
- readonly data: BlobType;
409
- /** Number of input features */
410
- readonly n_features: IntegerType;
411
- }>;
412
- /** LightGBM classifier model */
413
- readonly lightgbm_classifier: StructType<{
414
- /** Cloudpickle serialized model */
415
- readonly data: BlobType;
416
- /** Number of input features */
417
- readonly n_features: IntegerType;
418
- /** Number of classes */
419
- readonly n_classes: IntegerType;
420
- }>;
421
- }>>;
422
- /**
423
- * Make predictions with a trained LightGBM regressor.
424
- *
425
- * @example
426
- * ```ts
427
- * import { East, FloatType, MatrixType, VectorType } from "@elaraai/east";
428
- * import { LightGBM } from "@elaraai/east-py-datascience";
429
- *
430
- * const predictFn = East.function(
431
- * [LightGBM.Types.ModelBlobType, MatrixType(FloatType)],
432
- * VectorType(FloatType),
433
- * ($, model, X) => {
434
- * return $.return(LightGBM.predict(model, X));
435
- * }
436
- * );
437
- * ```
438
- */
439
- readonly predict: import("@elaraai/east").PlatformDefinition<[VariantType<{
440
- /** LightGBM regressor model */
441
- readonly lightgbm_regressor: StructType<{
442
- /** Cloudpickle serialized model */
443
- readonly data: BlobType;
444
- /** Number of input features */
445
- readonly n_features: IntegerType;
446
- }>;
447
- /** LightGBM classifier model */
448
- readonly lightgbm_classifier: StructType<{
449
- /** Cloudpickle serialized model */
450
- readonly data: BlobType;
451
- /** Number of input features */
452
- readonly n_features: IntegerType;
453
- /** Number of classes */
454
- readonly n_classes: IntegerType;
455
- }>;
456
- }>, MatrixType<FloatType>], VectorType<FloatType>>;
457
- /**
458
- * Predict class labels with a trained LightGBM classifier.
459
- *
460
- * @example
461
- * ```ts
462
- * import { East, FloatType, IntegerType, MatrixType, VectorType } from "@elaraai/east";
463
- * import { LightGBM } from "@elaraai/east-py-datascience";
464
- *
465
- * const predictFn = East.function(
466
- * [LightGBM.Types.ModelBlobType, MatrixType(FloatType)],
467
- * VectorType(IntegerType),
468
- * ($, model, X) => {
469
- * return $.return(LightGBM.predictClass(model, X));
470
- * }
471
- * );
472
- * ```
473
- */
474
- readonly predictClass: import("@elaraai/east").PlatformDefinition<[VariantType<{
475
- /** LightGBM regressor model */
476
- readonly lightgbm_regressor: StructType<{
477
- /** Cloudpickle serialized model */
478
- readonly data: BlobType;
479
- /** Number of input features */
480
- readonly n_features: IntegerType;
481
- }>;
482
- /** LightGBM classifier model */
483
- readonly lightgbm_classifier: StructType<{
484
- /** Cloudpickle serialized model */
485
- readonly data: BlobType;
486
- /** Number of input features */
487
- readonly n_features: IntegerType;
488
- /** Number of classes */
489
- readonly n_classes: IntegerType;
490
- }>;
491
- }>, MatrixType<FloatType>], VectorType<IntegerType>>;
492
- /**
493
- * Get class probabilities from a trained LightGBM classifier.
494
- *
495
- * @example
496
- * ```ts
497
- * import { East, FloatType, MatrixType } from "@elaraai/east";
498
- * import { LightGBM } from "@elaraai/east-py-datascience";
499
- *
500
- * const predictFn = East.function(
501
- * [LightGBM.Types.ModelBlobType, MatrixType(FloatType)],
502
- * MatrixType(FloatType),
503
- * ($, model, X) => {
504
- * return $.return(LightGBM.predictProba(model, X));
505
- * }
506
- * );
507
- * ```
508
- */
509
- readonly predictProba: import("@elaraai/east").PlatformDefinition<[VariantType<{
510
- /** LightGBM regressor model */
511
- readonly lightgbm_regressor: StructType<{
512
- /** Cloudpickle serialized model */
513
- readonly data: BlobType;
514
- /** Number of input features */
515
- readonly n_features: IntegerType;
516
- }>;
517
- /** LightGBM classifier model */
518
- readonly lightgbm_classifier: StructType<{
519
- /** Cloudpickle serialized model */
520
- readonly data: BlobType;
521
- /** Number of input features */
522
- readonly n_features: IntegerType;
523
- /** Number of classes */
524
- readonly n_classes: IntegerType;
525
- }>;
526
- }>, MatrixType<FloatType>], MatrixType<FloatType>>;
527
- /** Type definitions */
528
- readonly Types: {
529
- /** LightGBM configuration type */
530
- readonly LightGBMConfigType: StructType<{
531
- /** Number of boosting rounds (default 100) */
532
- readonly n_estimators: OptionType<IntegerType>;
533
- /** Maximum tree depth, -1 for unlimited (default -1) */
534
- readonly max_depth: OptionType<IntegerType>;
535
- /** Learning rate / step size shrinkage (default 0.1) */
536
- readonly learning_rate: OptionType<FloatType>;
537
- /** Maximum number of leaves in one tree (default 31) */
538
- readonly num_leaves: OptionType<IntegerType>;
539
- /** Minimum number of samples required in a leaf (default 20) */
540
- readonly min_child_samples: OptionType<IntegerType>;
541
- /** Subsample ratio of training instances (default 1.0) */
542
- readonly subsample: OptionType<FloatType>;
543
- /** Subsample ratio of columns when constructing trees (default 1.0) */
544
- readonly colsample_bytree: OptionType<FloatType>;
545
- /** L1 regularization term (default 0) */
546
- readonly reg_alpha: OptionType<FloatType>;
547
- /** L2 regularization term (default 0) */
548
- readonly reg_lambda: OptionType<FloatType>;
549
- /** Random seed for reproducibility */
550
- readonly random_state: OptionType<IntegerType>;
551
- /** Number of parallel threads (default -1 for all cores) */
552
- readonly n_jobs: OptionType<IntegerType>;
553
- }>;
554
- /** Model blob type for LightGBM models */
555
- readonly ModelBlobType: VariantType<{
556
- /** LightGBM regressor model */
557
- readonly lightgbm_regressor: StructType<{
558
- /** Cloudpickle serialized model */
559
- readonly data: BlobType;
560
- /** Number of input features */
561
- readonly n_features: IntegerType;
562
- }>;
563
- /** LightGBM classifier model */
564
- readonly lightgbm_classifier: StructType<{
565
- /** Cloudpickle serialized model */
566
- readonly data: BlobType;
567
- /** Number of input features */
568
- readonly n_features: IntegerType;
569
- /** Number of classes */
570
- readonly n_classes: IntegerType;
571
- }>;
572
- }>;
573
- };
574
- };
575
- //# sourceMappingURL=lightgbm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lightgbm.d.ts","sourceRoot":"","sources":["../../../src/lightgbm/lightgbm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAEH,OAAO,EAEH,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMrD;;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