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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/alns/alns.d.ts +528 -0
  2. package/dist/alns/alns.d.ts.map +1 -0
  3. package/dist/alns/alns.js +238 -0
  4. package/dist/alns/alns.js.map +1 -0
  5. package/dist/gp/gp.d.ts +120 -120
  6. package/dist/gp/gp.d.ts.map +1 -1
  7. package/dist/gp/gp.js +7 -7
  8. package/dist/gp/gp.js.map +1 -1
  9. package/dist/index.d.ts +5 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +8 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/lightgbm/lightgbm.d.ts +168 -168
  14. package/dist/lightning/lightning.d.ts +1501 -0
  15. package/dist/lightning/lightning.d.ts.map +1 -0
  16. package/dist/lightning/lightning.js +376 -0
  17. package/dist/lightning/lightning.js.map +1 -0
  18. package/dist/mads/mads.d.ts +103 -103
  19. package/dist/mads/mads.d.ts.map +1 -1
  20. package/dist/mads/mads.js +5 -5
  21. package/dist/mads/mads.js.map +1 -1
  22. package/dist/mapie/mapie.d.ts +2058 -0
  23. package/dist/mapie/mapie.d.ts.map +1 -0
  24. package/dist/mapie/mapie.js +411 -0
  25. package/dist/mapie/mapie.js.map +1 -0
  26. package/dist/ngboost/ngboost.d.ts +126 -126
  27. package/dist/ngboost/ngboost.d.ts.map +1 -1
  28. package/dist/ngboost/ngboost.js +3 -3
  29. package/dist/ngboost/ngboost.js.map +1 -1
  30. package/dist/optuna/optuna.d.ts +314 -314
  31. package/dist/scipy/scipy.d.ts +535 -429
  32. package/dist/scipy/scipy.d.ts.map +1 -1
  33. package/dist/scipy/scipy.js +56 -3
  34. package/dist/scipy/scipy.js.map +1 -1
  35. package/dist/shap/shap.d.ts +1152 -358
  36. package/dist/shap/shap.d.ts.map +1 -1
  37. package/dist/shap/shap.js +189 -16
  38. package/dist/shap/shap.js.map +1 -1
  39. package/dist/simanneal/simanneal.d.ts +148 -148
  40. package/dist/sklearn/sklearn.d.ts +3104 -1316
  41. package/dist/sklearn/sklearn.d.ts.map +1 -1
  42. package/dist/sklearn/sklearn.js +325 -64
  43. package/dist/sklearn/sklearn.js.map +1 -1
  44. package/dist/torch/torch.d.ts +503 -350
  45. package/dist/torch/torch.d.ts.map +1 -1
  46. package/dist/torch/torch.js +39 -17
  47. package/dist/torch/torch.js.map +1 -1
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/dist/xgboost/xgboost.d.ts +803 -178
  50. package/dist/xgboost/xgboost.d.ts.map +1 -1
  51. package/dist/xgboost/xgboost.js +102 -1
  52. package/dist/xgboost/xgboost.js.map +1 -1
  53. package/package.json +4 -4
@@ -10,136 +10,169 @@
10
10
  *
11
11
  * @packageDocumentation
12
12
  */
13
- import { StructType, VariantType, OptionType, IntegerType, FloatType, BlobType, ArrayType } from "@elaraai/east";
13
+ import { StructType, VariantType, OptionType, IntegerType, FloatType, BlobType, ArrayType, NullType } from "@elaraai/east";
14
14
  export { VectorType, MatrixType } from "../types.js";
15
15
  /**
16
- * Activation function type for neural networks.
16
+ * Activation function type for hidden layers.
17
17
  */
18
18
  export declare const TorchActivationType: VariantType<{
19
19
  /** Rectified Linear Unit */
20
- relu: StructType<{}>;
20
+ readonly relu: NullType;
21
21
  /** Hyperbolic tangent */
22
- tanh: StructType<{}>;
22
+ readonly tanh: NullType;
23
23
  /** Sigmoid function */
24
- sigmoid: StructType<{}>;
24
+ readonly sigmoid: NullType;
25
25
  /** Leaky ReLU */
26
- leaky_relu: StructType<{}>;
26
+ readonly leaky_relu: NullType;
27
27
  }>;
28
28
  /**
29
29
  * Loss function type for training.
30
30
  */
31
31
  export declare const TorchLossType: VariantType<{
32
32
  /** Mean Squared Error (regression) */
33
- mse: StructType<{}>;
33
+ readonly mse: NullType;
34
34
  /** Mean Absolute Error (regression) */
35
- mae: StructType<{}>;
36
- /** Cross Entropy (classification) */
37
- cross_entropy: StructType<{}>;
35
+ readonly mae: NullType;
36
+ /** Cross Entropy (multi-class classification with integer targets) */
37
+ readonly cross_entropy: NullType;
38
+ /** KL Divergence (distribution matching, use with softmax output) */
39
+ readonly kl_div: NullType;
40
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
41
+ readonly bce: NullType;
42
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
43
+ readonly bce_with_logits: NullType;
38
44
  }>;
39
45
  /**
40
46
  * Optimizer type for training.
41
47
  */
42
48
  export declare const TorchOptimizerType: VariantType<{
43
49
  /** Adam optimizer */
44
- adam: StructType<{}>;
50
+ readonly adam: NullType;
45
51
  /** Stochastic Gradient Descent */
46
- sgd: StructType<{}>;
52
+ readonly sgd: NullType;
47
53
  /** AdamW with weight decay */
48
- adamw: StructType<{}>;
54
+ readonly adamw: NullType;
49
55
  /** RMSprop optimizer */
50
- rmsprop: StructType<{}>;
56
+ readonly rmsprop: NullType;
57
+ }>;
58
+ /**
59
+ * Output activation function type for the final layer.
60
+ * Applied only to the output layer, not hidden layers.
61
+ */
62
+ export declare const TorchOutputActivationType: VariantType<{
63
+ /** No activation (linear output) - default */
64
+ readonly none: NullType;
65
+ /** Softmax (outputs sum to 1, for probability distributions) */
66
+ readonly softmax: NullType;
67
+ /** Sigmoid (each output independently in [0,1]) */
68
+ readonly sigmoid: NullType;
51
69
  }>;
52
70
  /**
53
71
  * Configuration for MLP architecture.
54
72
  */
55
73
  export declare const TorchMLPConfigType: StructType<{
56
74
  /** Hidden layer sizes, e.g., [64, 32] */
57
- hidden_layers: ArrayType<IntegerType>;
58
- /** Activation function (default relu) */
59
- activation: OptionType<VariantType<{
75
+ readonly hidden_layers: ArrayType<IntegerType>;
76
+ /** Activation function for hidden layers (default relu) */
77
+ readonly activation: OptionType<VariantType<{
60
78
  /** Rectified Linear Unit */
61
- relu: StructType<{}>;
79
+ readonly relu: NullType;
62
80
  /** Hyperbolic tangent */
63
- tanh: StructType<{}>;
81
+ readonly tanh: NullType;
64
82
  /** Sigmoid function */
65
- sigmoid: StructType<{}>;
83
+ readonly sigmoid: NullType;
66
84
  /** Leaky ReLU */
67
- leaky_relu: StructType<{}>;
85
+ readonly leaky_relu: NullType;
86
+ }>>;
87
+ /** Output activation function (default none/linear). Ignored if output_constraints is set. */
88
+ readonly output_activation: OptionType<VariantType<{
89
+ /** No activation (linear output) - default */
90
+ readonly none: NullType;
91
+ /** Softmax (outputs sum to 1, for probability distributions) */
92
+ readonly softmax: NullType;
93
+ /** Sigmoid (each output independently in [0,1]) */
94
+ readonly sigmoid: NullType;
68
95
  }>>;
69
96
  /** Dropout rate (default 0.0) */
70
- dropout: OptionType<FloatType>;
97
+ readonly dropout: OptionType<FloatType>;
71
98
  /** Output dimension (default 1) */
72
- output_dim: OptionType<IntegerType>;
99
+ readonly output_dim: OptionType<IntegerType>;
73
100
  }>;
74
101
  /**
75
102
  * Configuration for training.
76
103
  */
77
104
  export declare const TorchTrainConfigType: StructType<{
78
105
  /** Number of epochs (default 100) */
79
- epochs: OptionType<IntegerType>;
106
+ readonly epochs: OptionType<IntegerType>;
80
107
  /** Batch size (default 32) */
81
- batch_size: OptionType<IntegerType>;
108
+ readonly batch_size: OptionType<IntegerType>;
82
109
  /** Learning rate (default 0.001) */
83
- learning_rate: OptionType<FloatType>;
110
+ readonly learning_rate: OptionType<FloatType>;
84
111
  /** Loss function (default mse) */
85
- loss: OptionType<VariantType<{
112
+ readonly loss: OptionType<VariantType<{
86
113
  /** Mean Squared Error (regression) */
87
- mse: StructType<{}>;
114
+ readonly mse: NullType;
88
115
  /** Mean Absolute Error (regression) */
89
- mae: StructType<{}>;
90
- /** Cross Entropy (classification) */
91
- cross_entropy: StructType<{}>;
116
+ readonly mae: NullType;
117
+ /** Cross Entropy (multi-class classification with integer targets) */
118
+ readonly cross_entropy: NullType;
119
+ /** KL Divergence (distribution matching, use with softmax output) */
120
+ readonly kl_div: NullType;
121
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
122
+ readonly bce: NullType;
123
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
124
+ readonly bce_with_logits: NullType;
92
125
  }>>;
93
126
  /** Optimizer (default adam) */
94
- optimizer: OptionType<VariantType<{
127
+ readonly optimizer: OptionType<VariantType<{
95
128
  /** Adam optimizer */
96
- adam: StructType<{}>;
129
+ readonly adam: NullType;
97
130
  /** Stochastic Gradient Descent */
98
- sgd: StructType<{}>;
131
+ readonly sgd: NullType;
99
132
  /** AdamW with weight decay */
100
- adamw: StructType<{}>;
133
+ readonly adamw: NullType;
101
134
  /** RMSprop optimizer */
102
- rmsprop: StructType<{}>;
135
+ readonly rmsprop: NullType;
103
136
  }>>;
104
137
  /** Early stopping patience, 0 = disabled */
105
- early_stopping: OptionType<IntegerType>;
138
+ readonly early_stopping: OptionType<IntegerType>;
106
139
  /** Validation split fraction (default 0.2) */
107
- validation_split: OptionType<FloatType>;
140
+ readonly validation_split: OptionType<FloatType>;
108
141
  /** Random seed for reproducibility */
109
- random_state: OptionType<IntegerType>;
142
+ readonly random_state: OptionType<IntegerType>;
110
143
  }>;
111
144
  /**
112
145
  * Result type for training.
113
146
  */
114
147
  export declare const TorchTrainResultType: StructType<{
115
148
  /** Training loss per epoch */
116
- train_losses: ArrayType<FloatType>;
149
+ readonly train_losses: ArrayType<FloatType>;
117
150
  /** Validation loss per epoch */
118
- val_losses: ArrayType<FloatType>;
151
+ readonly val_losses: ArrayType<FloatType>;
119
152
  /** Best epoch (for early stopping) */
120
- best_epoch: IntegerType;
153
+ readonly best_epoch: IntegerType;
121
154
  }>;
122
155
  /**
123
156
  * Combined result from training (model + metrics).
124
157
  */
125
158
  export declare const TorchTrainOutputType: StructType<{
126
159
  /** Trained model blob */
127
- model: VariantType<{
128
- torch_mlp: StructType<{
129
- data: BlobType;
130
- n_features: IntegerType;
131
- hidden_layers: ArrayType<IntegerType>;
132
- output_dim: IntegerType;
160
+ readonly model: VariantType<{
161
+ readonly torch_mlp: StructType<{
162
+ readonly data: BlobType;
163
+ readonly n_features: IntegerType;
164
+ readonly hidden_layers: ArrayType<IntegerType>;
165
+ readonly output_dim: IntegerType;
133
166
  }>;
134
167
  }>;
135
168
  /** Training result with losses */
136
- result: StructType<{
169
+ readonly result: StructType<{
137
170
  /** Training loss per epoch */
138
- train_losses: ArrayType<FloatType>;
171
+ readonly train_losses: ArrayType<FloatType>;
139
172
  /** Validation loss per epoch */
140
- val_losses: ArrayType<FloatType>;
173
+ readonly val_losses: ArrayType<FloatType>;
141
174
  /** Best epoch (for early stopping) */
142
- best_epoch: IntegerType;
175
+ readonly best_epoch: IntegerType;
143
176
  }>;
144
177
  }>;
145
178
  /**
@@ -147,15 +180,15 @@ export declare const TorchTrainOutputType: StructType<{
147
180
  */
148
181
  export declare const TorchModelBlobType: VariantType<{
149
182
  /** PyTorch MLP model */
150
- torch_mlp: StructType<{
183
+ readonly torch_mlp: StructType<{
151
184
  /** Cloudpickle serialized model */
152
- data: BlobType;
185
+ readonly data: BlobType;
153
186
  /** Number of input features */
154
- n_features: IntegerType;
187
+ readonly n_features: IntegerType;
155
188
  /** Hidden layer sizes */
156
- hidden_layers: ArrayType<IntegerType>;
189
+ readonly hidden_layers: ArrayType<IntegerType>;
157
190
  /** Output dimension */
158
- output_dim: IntegerType;
191
+ readonly output_dim: IntegerType;
159
192
  }>;
160
193
  }>;
161
194
  /**
@@ -169,73 +202,88 @@ export declare const TorchModelBlobType: VariantType<{
169
202
  */
170
203
  export declare const torch_mlp_train: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
171
204
  /** Hidden layer sizes, e.g., [64, 32] */
172
- hidden_layers: ArrayType<IntegerType>;
173
- /** Activation function (default relu) */
174
- activation: OptionType<VariantType<{
205
+ readonly hidden_layers: ArrayType<IntegerType>;
206
+ /** Activation function for hidden layers (default relu) */
207
+ readonly activation: OptionType<VariantType<{
175
208
  /** Rectified Linear Unit */
176
- relu: StructType<{}>;
209
+ readonly relu: NullType;
177
210
  /** Hyperbolic tangent */
178
- tanh: StructType<{}>;
211
+ readonly tanh: NullType;
179
212
  /** Sigmoid function */
180
- sigmoid: StructType<{}>;
213
+ readonly sigmoid: NullType;
181
214
  /** Leaky ReLU */
182
- leaky_relu: StructType<{}>;
215
+ readonly leaky_relu: NullType;
216
+ }>>;
217
+ /** Output activation function (default none/linear). Ignored if output_constraints is set. */
218
+ readonly output_activation: OptionType<VariantType<{
219
+ /** No activation (linear output) - default */
220
+ readonly none: NullType;
221
+ /** Softmax (outputs sum to 1, for probability distributions) */
222
+ readonly softmax: NullType;
223
+ /** Sigmoid (each output independently in [0,1]) */
224
+ readonly sigmoid: NullType;
183
225
  }>>;
184
226
  /** Dropout rate (default 0.0) */
185
- dropout: OptionType<FloatType>;
227
+ readonly dropout: OptionType<FloatType>;
186
228
  /** Output dimension (default 1) */
187
- output_dim: OptionType<IntegerType>;
229
+ readonly output_dim: OptionType<IntegerType>;
188
230
  }>, StructType<{
189
231
  /** Number of epochs (default 100) */
190
- epochs: OptionType<IntegerType>;
232
+ readonly epochs: OptionType<IntegerType>;
191
233
  /** Batch size (default 32) */
192
- batch_size: OptionType<IntegerType>;
234
+ readonly batch_size: OptionType<IntegerType>;
193
235
  /** Learning rate (default 0.001) */
194
- learning_rate: OptionType<FloatType>;
236
+ readonly learning_rate: OptionType<FloatType>;
195
237
  /** Loss function (default mse) */
196
- loss: OptionType<VariantType<{
238
+ readonly loss: OptionType<VariantType<{
197
239
  /** Mean Squared Error (regression) */
198
- mse: StructType<{}>;
240
+ readonly mse: NullType;
199
241
  /** Mean Absolute Error (regression) */
200
- mae: StructType<{}>;
201
- /** Cross Entropy (classification) */
202
- cross_entropy: StructType<{}>;
242
+ readonly mae: NullType;
243
+ /** Cross Entropy (multi-class classification with integer targets) */
244
+ readonly cross_entropy: NullType;
245
+ /** KL Divergence (distribution matching, use with softmax output) */
246
+ readonly kl_div: NullType;
247
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
248
+ readonly bce: NullType;
249
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
250
+ readonly bce_with_logits: NullType;
203
251
  }>>;
204
252
  /** Optimizer (default adam) */
205
- optimizer: OptionType<VariantType<{
253
+ readonly optimizer: OptionType<VariantType<{
206
254
  /** Adam optimizer */
207
- adam: StructType<{}>;
255
+ readonly adam: NullType;
208
256
  /** Stochastic Gradient Descent */
209
- sgd: StructType<{}>;
257
+ readonly sgd: NullType;
210
258
  /** AdamW with weight decay */
211
- adamw: StructType<{}>;
259
+ readonly adamw: NullType;
212
260
  /** RMSprop optimizer */
213
- rmsprop: StructType<{}>;
261
+ readonly rmsprop: NullType;
214
262
  }>>;
215
263
  /** Early stopping patience, 0 = disabled */
216
- early_stopping: OptionType<IntegerType>;
264
+ readonly early_stopping: OptionType<IntegerType>;
217
265
  /** Validation split fraction (default 0.2) */
218
- validation_split: OptionType<FloatType>;
266
+ readonly validation_split: OptionType<FloatType>;
219
267
  /** Random seed for reproducibility */
220
- random_state: OptionType<IntegerType>;
268
+ readonly random_state: OptionType<IntegerType>;
221
269
  }>], StructType<{
222
270
  /** Trained model blob */
223
- model: VariantType<{
224
- torch_mlp: StructType<{
225
- data: BlobType;
226
- n_features: IntegerType;
227
- hidden_layers: ArrayType<IntegerType>;
228
- output_dim: IntegerType;
271
+ readonly model: VariantType<{
272
+ readonly torch_mlp: StructType<{
273
+ readonly data: BlobType;
274
+ readonly n_features: IntegerType;
275
+ readonly hidden_layers: ArrayType<IntegerType>;
276
+ readonly output_dim: IntegerType;
229
277
  }>;
230
278
  }>;
231
279
  /** Training result with losses */
232
- result: StructType<{
280
+ readonly result: StructType<{
233
281
  /** Training loss per epoch */
234
- train_losses: ArrayType<FloatType>;
282
+ readonly train_losses: ArrayType<FloatType>;
235
283
  /** Validation loss per epoch */
236
- val_losses: ArrayType<FloatType>;
284
+ readonly val_losses: ArrayType<FloatType>;
237
285
  /** Best epoch (for early stopping) */
238
- best_epoch: IntegerType;
286
+ readonly best_epoch: IntegerType;
239
287
  }>;
240
288
  }>>;
241
289
  /**
@@ -247,15 +295,15 @@ export declare const torch_mlp_train: import("@elaraai/east").PlatformDefinition
247
295
  */
248
296
  export declare const torch_mlp_predict: import("@elaraai/east").PlatformDefinition<[VariantType<{
249
297
  /** PyTorch MLP model */
250
- torch_mlp: StructType<{
298
+ readonly torch_mlp: StructType<{
251
299
  /** Cloudpickle serialized model */
252
- data: BlobType;
300
+ readonly data: BlobType;
253
301
  /** Number of input features */
254
- n_features: IntegerType;
302
+ readonly n_features: IntegerType;
255
303
  /** Hidden layer sizes */
256
- hidden_layers: ArrayType<IntegerType>;
304
+ readonly hidden_layers: ArrayType<IntegerType>;
257
305
  /** Output dimension */
258
- output_dim: IntegerType;
306
+ readonly output_dim: IntegerType;
259
307
  }>;
260
308
  }>, ArrayType<ArrayType<FloatType>>], ArrayType<FloatType>>;
261
309
  /**
@@ -273,73 +321,88 @@ export declare const torch_mlp_predict: import("@elaraai/east").PlatformDefiniti
273
321
  */
274
322
  export declare const torch_mlp_train_multi: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<ArrayType<FloatType>>, StructType<{
275
323
  /** Hidden layer sizes, e.g., [64, 32] */
276
- hidden_layers: ArrayType<IntegerType>;
277
- /** Activation function (default relu) */
278
- activation: OptionType<VariantType<{
324
+ readonly hidden_layers: ArrayType<IntegerType>;
325
+ /** Activation function for hidden layers (default relu) */
326
+ readonly activation: OptionType<VariantType<{
279
327
  /** Rectified Linear Unit */
280
- relu: StructType<{}>;
328
+ readonly relu: NullType;
281
329
  /** Hyperbolic tangent */
282
- tanh: StructType<{}>;
330
+ readonly tanh: NullType;
283
331
  /** Sigmoid function */
284
- sigmoid: StructType<{}>;
332
+ readonly sigmoid: NullType;
285
333
  /** Leaky ReLU */
286
- leaky_relu: StructType<{}>;
334
+ readonly leaky_relu: NullType;
335
+ }>>;
336
+ /** Output activation function (default none/linear). Ignored if output_constraints is set. */
337
+ readonly output_activation: OptionType<VariantType<{
338
+ /** No activation (linear output) - default */
339
+ readonly none: NullType;
340
+ /** Softmax (outputs sum to 1, for probability distributions) */
341
+ readonly softmax: NullType;
342
+ /** Sigmoid (each output independently in [0,1]) */
343
+ readonly sigmoid: NullType;
287
344
  }>>;
288
345
  /** Dropout rate (default 0.0) */
289
- dropout: OptionType<FloatType>;
346
+ readonly dropout: OptionType<FloatType>;
290
347
  /** Output dimension (default 1) */
291
- output_dim: OptionType<IntegerType>;
348
+ readonly output_dim: OptionType<IntegerType>;
292
349
  }>, StructType<{
293
350
  /** Number of epochs (default 100) */
294
- epochs: OptionType<IntegerType>;
351
+ readonly epochs: OptionType<IntegerType>;
295
352
  /** Batch size (default 32) */
296
- batch_size: OptionType<IntegerType>;
353
+ readonly batch_size: OptionType<IntegerType>;
297
354
  /** Learning rate (default 0.001) */
298
- learning_rate: OptionType<FloatType>;
355
+ readonly learning_rate: OptionType<FloatType>;
299
356
  /** Loss function (default mse) */
300
- loss: OptionType<VariantType<{
357
+ readonly loss: OptionType<VariantType<{
301
358
  /** Mean Squared Error (regression) */
302
- mse: StructType<{}>;
359
+ readonly mse: NullType;
303
360
  /** Mean Absolute Error (regression) */
304
- mae: StructType<{}>;
305
- /** Cross Entropy (classification) */
306
- cross_entropy: StructType<{}>;
361
+ readonly mae: NullType;
362
+ /** Cross Entropy (multi-class classification with integer targets) */
363
+ readonly cross_entropy: NullType;
364
+ /** KL Divergence (distribution matching, use with softmax output) */
365
+ readonly kl_div: NullType;
366
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
367
+ readonly bce: NullType;
368
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
369
+ readonly bce_with_logits: NullType;
307
370
  }>>;
308
371
  /** Optimizer (default adam) */
309
- optimizer: OptionType<VariantType<{
372
+ readonly optimizer: OptionType<VariantType<{
310
373
  /** Adam optimizer */
311
- adam: StructType<{}>;
374
+ readonly adam: NullType;
312
375
  /** Stochastic Gradient Descent */
313
- sgd: StructType<{}>;
376
+ readonly sgd: NullType;
314
377
  /** AdamW with weight decay */
315
- adamw: StructType<{}>;
378
+ readonly adamw: NullType;
316
379
  /** RMSprop optimizer */
317
- rmsprop: StructType<{}>;
380
+ readonly rmsprop: NullType;
318
381
  }>>;
319
382
  /** Early stopping patience, 0 = disabled */
320
- early_stopping: OptionType<IntegerType>;
383
+ readonly early_stopping: OptionType<IntegerType>;
321
384
  /** Validation split fraction (default 0.2) */
322
- validation_split: OptionType<FloatType>;
385
+ readonly validation_split: OptionType<FloatType>;
323
386
  /** Random seed for reproducibility */
324
- random_state: OptionType<IntegerType>;
387
+ readonly random_state: OptionType<IntegerType>;
325
388
  }>], StructType<{
326
389
  /** Trained model blob */
327
- model: VariantType<{
328
- torch_mlp: StructType<{
329
- data: BlobType;
330
- n_features: IntegerType;
331
- hidden_layers: ArrayType<IntegerType>;
332
- output_dim: IntegerType;
390
+ readonly model: VariantType<{
391
+ readonly torch_mlp: StructType<{
392
+ readonly data: BlobType;
393
+ readonly n_features: IntegerType;
394
+ readonly hidden_layers: ArrayType<IntegerType>;
395
+ readonly output_dim: IntegerType;
333
396
  }>;
334
397
  }>;
335
398
  /** Training result with losses */
336
- result: StructType<{
399
+ readonly result: StructType<{
337
400
  /** Training loss per epoch */
338
- train_losses: ArrayType<FloatType>;
401
+ readonly train_losses: ArrayType<FloatType>;
339
402
  /** Validation loss per epoch */
340
- val_losses: ArrayType<FloatType>;
403
+ readonly val_losses: ArrayType<FloatType>;
341
404
  /** Best epoch (for early stopping) */
342
- best_epoch: IntegerType;
405
+ readonly best_epoch: IntegerType;
343
406
  }>;
344
407
  }>>;
345
408
  /**
@@ -353,15 +416,15 @@ export declare const torch_mlp_train_multi: import("@elaraai/east").PlatformDefi
353
416
  */
354
417
  export declare const torch_mlp_predict_multi: import("@elaraai/east").PlatformDefinition<[VariantType<{
355
418
  /** PyTorch MLP model */
356
- torch_mlp: StructType<{
419
+ readonly torch_mlp: StructType<{
357
420
  /** Cloudpickle serialized model */
358
- data: BlobType;
421
+ readonly data: BlobType;
359
422
  /** Number of input features */
360
- n_features: IntegerType;
423
+ readonly n_features: IntegerType;
361
424
  /** Hidden layer sizes */
362
- hidden_layers: ArrayType<IntegerType>;
425
+ readonly hidden_layers: ArrayType<IntegerType>;
363
426
  /** Output dimension */
364
- output_dim: IntegerType;
427
+ readonly output_dim: IntegerType;
365
428
  }>;
366
429
  }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
367
430
  /**
@@ -399,15 +462,15 @@ export declare const torch_mlp_predict_multi: import("@elaraai/east").PlatformDe
399
462
  */
400
463
  export declare const torch_mlp_encode: import("@elaraai/east").PlatformDefinition<[VariantType<{
401
464
  /** PyTorch MLP model */
402
- torch_mlp: StructType<{
465
+ readonly torch_mlp: StructType<{
403
466
  /** Cloudpickle serialized model */
404
- data: BlobType;
467
+ readonly data: BlobType;
405
468
  /** Number of input features */
406
- n_features: IntegerType;
469
+ readonly n_features: IntegerType;
407
470
  /** Hidden layer sizes */
408
- hidden_layers: ArrayType<IntegerType>;
471
+ readonly hidden_layers: ArrayType<IntegerType>;
409
472
  /** Output dimension */
410
- output_dim: IntegerType;
473
+ readonly output_dim: IntegerType;
411
474
  }>;
412
475
  }>, ArrayType<ArrayType<FloatType>>, IntegerType], ArrayType<ArrayType<FloatType>>>;
413
476
  /**
@@ -443,15 +506,15 @@ export declare const torch_mlp_encode: import("@elaraai/east").PlatformDefinitio
443
506
  */
444
507
  export declare const torch_mlp_decode: import("@elaraai/east").PlatformDefinition<[VariantType<{
445
508
  /** PyTorch MLP model */
446
- torch_mlp: StructType<{
509
+ readonly torch_mlp: StructType<{
447
510
  /** Cloudpickle serialized model */
448
- data: BlobType;
511
+ readonly data: BlobType;
449
512
  /** Number of input features */
450
- n_features: IntegerType;
513
+ readonly n_features: IntegerType;
451
514
  /** Hidden layer sizes */
452
- hidden_layers: ArrayType<IntegerType>;
515
+ readonly hidden_layers: ArrayType<IntegerType>;
453
516
  /** Output dimension */
454
- output_dim: IntegerType;
517
+ readonly output_dim: IntegerType;
455
518
  }>;
456
519
  }>, ArrayType<ArrayType<FloatType>>, IntegerType], ArrayType<ArrayType<FloatType>>>;
457
520
  /**
@@ -462,134 +525,164 @@ export declare const TorchTypes: {
462
525
  readonly VectorType: ArrayType<FloatType>;
463
526
  /** Matrix type (2D array of floats) */
464
527
  readonly MatrixType: ArrayType<ArrayType<FloatType>>;
465
- /** Activation function type */
528
+ /** Activation function type for hidden layers */
466
529
  readonly TorchActivationType: VariantType<{
467
530
  /** Rectified Linear Unit */
468
- relu: StructType<{}>;
531
+ readonly relu: NullType;
469
532
  /** Hyperbolic tangent */
470
- tanh: StructType<{}>;
533
+ readonly tanh: NullType;
471
534
  /** Sigmoid function */
472
- sigmoid: StructType<{}>;
535
+ readonly sigmoid: NullType;
473
536
  /** Leaky ReLU */
474
- leaky_relu: StructType<{}>;
537
+ readonly leaky_relu: NullType;
538
+ }>;
539
+ /** Output activation function type */
540
+ readonly TorchOutputActivationType: VariantType<{
541
+ /** No activation (linear output) - default */
542
+ readonly none: NullType;
543
+ /** Softmax (outputs sum to 1, for probability distributions) */
544
+ readonly softmax: NullType;
545
+ /** Sigmoid (each output independently in [0,1]) */
546
+ readonly sigmoid: NullType;
475
547
  }>;
476
548
  /** Loss function type */
477
549
  readonly TorchLossType: VariantType<{
478
550
  /** Mean Squared Error (regression) */
479
- mse: StructType<{}>;
551
+ readonly mse: NullType;
480
552
  /** Mean Absolute Error (regression) */
481
- mae: StructType<{}>;
482
- /** Cross Entropy (classification) */
483
- cross_entropy: StructType<{}>;
553
+ readonly mae: NullType;
554
+ /** Cross Entropy (multi-class classification with integer targets) */
555
+ readonly cross_entropy: NullType;
556
+ /** KL Divergence (distribution matching, use with softmax output) */
557
+ readonly kl_div: NullType;
558
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
559
+ readonly bce: NullType;
560
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
561
+ readonly bce_with_logits: NullType;
484
562
  }>;
485
563
  /** Optimizer type */
486
564
  readonly TorchOptimizerType: VariantType<{
487
565
  /** Adam optimizer */
488
- adam: StructType<{}>;
566
+ readonly adam: NullType;
489
567
  /** Stochastic Gradient Descent */
490
- sgd: StructType<{}>;
568
+ readonly sgd: NullType;
491
569
  /** AdamW with weight decay */
492
- adamw: StructType<{}>;
570
+ readonly adamw: NullType;
493
571
  /** RMSprop optimizer */
494
- rmsprop: StructType<{}>;
572
+ readonly rmsprop: NullType;
495
573
  }>;
496
574
  /** MLP configuration type */
497
575
  readonly TorchMLPConfigType: StructType<{
498
576
  /** Hidden layer sizes, e.g., [64, 32] */
499
- hidden_layers: ArrayType<IntegerType>;
500
- /** Activation function (default relu) */
501
- activation: OptionType<VariantType<{
577
+ readonly hidden_layers: ArrayType<IntegerType>;
578
+ /** Activation function for hidden layers (default relu) */
579
+ readonly activation: OptionType<VariantType<{
502
580
  /** Rectified Linear Unit */
503
- relu: StructType<{}>;
581
+ readonly relu: NullType;
504
582
  /** Hyperbolic tangent */
505
- tanh: StructType<{}>;
583
+ readonly tanh: NullType;
506
584
  /** Sigmoid function */
507
- sigmoid: StructType<{}>;
585
+ readonly sigmoid: NullType;
508
586
  /** Leaky ReLU */
509
- leaky_relu: StructType<{}>;
587
+ readonly leaky_relu: NullType;
588
+ }>>;
589
+ /** Output activation function (default none/linear). Ignored if output_constraints is set. */
590
+ readonly output_activation: OptionType<VariantType<{
591
+ /** No activation (linear output) - default */
592
+ readonly none: NullType;
593
+ /** Softmax (outputs sum to 1, for probability distributions) */
594
+ readonly softmax: NullType;
595
+ /** Sigmoid (each output independently in [0,1]) */
596
+ readonly sigmoid: NullType;
510
597
  }>>;
511
598
  /** Dropout rate (default 0.0) */
512
- dropout: OptionType<FloatType>;
599
+ readonly dropout: OptionType<FloatType>;
513
600
  /** Output dimension (default 1) */
514
- output_dim: OptionType<IntegerType>;
601
+ readonly output_dim: OptionType<IntegerType>;
515
602
  }>;
516
603
  /** Training configuration type */
517
604
  readonly TorchTrainConfigType: StructType<{
518
605
  /** Number of epochs (default 100) */
519
- epochs: OptionType<IntegerType>;
606
+ readonly epochs: OptionType<IntegerType>;
520
607
  /** Batch size (default 32) */
521
- batch_size: OptionType<IntegerType>;
608
+ readonly batch_size: OptionType<IntegerType>;
522
609
  /** Learning rate (default 0.001) */
523
- learning_rate: OptionType<FloatType>;
610
+ readonly learning_rate: OptionType<FloatType>;
524
611
  /** Loss function (default mse) */
525
- loss: OptionType<VariantType<{
612
+ readonly loss: OptionType<VariantType<{
526
613
  /** Mean Squared Error (regression) */
527
- mse: StructType<{}>;
614
+ readonly mse: NullType;
528
615
  /** Mean Absolute Error (regression) */
529
- mae: StructType<{}>;
530
- /** Cross Entropy (classification) */
531
- cross_entropy: StructType<{}>;
616
+ readonly mae: NullType;
617
+ /** Cross Entropy (multi-class classification with integer targets) */
618
+ readonly cross_entropy: NullType;
619
+ /** KL Divergence (distribution matching, use with softmax output) */
620
+ readonly kl_div: NullType;
621
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
622
+ readonly bce: NullType;
623
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
624
+ readonly bce_with_logits: NullType;
532
625
  }>>;
533
626
  /** Optimizer (default adam) */
534
- optimizer: OptionType<VariantType<{
627
+ readonly optimizer: OptionType<VariantType<{
535
628
  /** Adam optimizer */
536
- adam: StructType<{}>;
629
+ readonly adam: NullType;
537
630
  /** Stochastic Gradient Descent */
538
- sgd: StructType<{}>;
631
+ readonly sgd: NullType;
539
632
  /** AdamW with weight decay */
540
- adamw: StructType<{}>;
633
+ readonly adamw: NullType;
541
634
  /** RMSprop optimizer */
542
- rmsprop: StructType<{}>;
635
+ readonly rmsprop: NullType;
543
636
  }>>;
544
637
  /** Early stopping patience, 0 = disabled */
545
- early_stopping: OptionType<IntegerType>;
638
+ readonly early_stopping: OptionType<IntegerType>;
546
639
  /** Validation split fraction (default 0.2) */
547
- validation_split: OptionType<FloatType>;
640
+ readonly validation_split: OptionType<FloatType>;
548
641
  /** Random seed for reproducibility */
549
- random_state: OptionType<IntegerType>;
642
+ readonly random_state: OptionType<IntegerType>;
550
643
  }>;
551
644
  /** Training result type */
552
645
  readonly TorchTrainResultType: StructType<{
553
646
  /** Training loss per epoch */
554
- train_losses: ArrayType<FloatType>;
647
+ readonly train_losses: ArrayType<FloatType>;
555
648
  /** Validation loss per epoch */
556
- val_losses: ArrayType<FloatType>;
649
+ readonly val_losses: ArrayType<FloatType>;
557
650
  /** Best epoch (for early stopping) */
558
- best_epoch: IntegerType;
651
+ readonly best_epoch: IntegerType;
559
652
  }>;
560
653
  /** Training output type (model + result) */
561
654
  readonly TorchTrainOutputType: StructType<{
562
655
  /** Trained model blob */
563
- model: VariantType<{
564
- torch_mlp: StructType<{
565
- data: BlobType;
566
- n_features: IntegerType;
567
- hidden_layers: ArrayType<IntegerType>;
568
- output_dim: IntegerType;
656
+ readonly model: VariantType<{
657
+ readonly torch_mlp: StructType<{
658
+ readonly data: BlobType;
659
+ readonly n_features: IntegerType;
660
+ readonly hidden_layers: ArrayType<IntegerType>;
661
+ readonly output_dim: IntegerType;
569
662
  }>;
570
663
  }>;
571
664
  /** Training result with losses */
572
- result: StructType<{
665
+ readonly result: StructType<{
573
666
  /** Training loss per epoch */
574
- train_losses: ArrayType<FloatType>;
667
+ readonly train_losses: ArrayType<FloatType>;
575
668
  /** Validation loss per epoch */
576
- val_losses: ArrayType<FloatType>;
669
+ readonly val_losses: ArrayType<FloatType>;
577
670
  /** Best epoch (for early stopping) */
578
- best_epoch: IntegerType;
671
+ readonly best_epoch: IntegerType;
579
672
  }>;
580
673
  }>;
581
674
  /** Model blob type for PyTorch models */
582
675
  readonly ModelBlobType: VariantType<{
583
676
  /** PyTorch MLP model */
584
- torch_mlp: StructType<{
677
+ readonly torch_mlp: StructType<{
585
678
  /** Cloudpickle serialized model */
586
- data: BlobType;
679
+ readonly data: BlobType;
587
680
  /** Number of input features */
588
- n_features: IntegerType;
681
+ readonly n_features: IntegerType;
589
682
  /** Hidden layer sizes */
590
- hidden_layers: ArrayType<IntegerType>;
683
+ readonly hidden_layers: ArrayType<IntegerType>;
591
684
  /** Output dimension */
592
- output_dim: IntegerType;
685
+ readonly output_dim: IntegerType;
593
686
  }>;
594
687
  }>;
595
688
  };
@@ -630,201 +723,231 @@ export declare const Torch: {
630
723
  /** Train MLP model (single output) */
631
724
  readonly mlpTrain: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<FloatType>, StructType<{
632
725
  /** Hidden layer sizes, e.g., [64, 32] */
633
- hidden_layers: ArrayType<IntegerType>;
634
- /** Activation function (default relu) */
635
- activation: OptionType<VariantType<{
726
+ readonly hidden_layers: ArrayType<IntegerType>;
727
+ /** Activation function for hidden layers (default relu) */
728
+ readonly activation: OptionType<VariantType<{
636
729
  /** Rectified Linear Unit */
637
- relu: StructType<{}>;
730
+ readonly relu: NullType;
638
731
  /** Hyperbolic tangent */
639
- tanh: StructType<{}>;
732
+ readonly tanh: NullType;
640
733
  /** Sigmoid function */
641
- sigmoid: StructType<{}>;
734
+ readonly sigmoid: NullType;
642
735
  /** Leaky ReLU */
643
- leaky_relu: StructType<{}>;
736
+ readonly leaky_relu: NullType;
737
+ }>>;
738
+ /** Output activation function (default none/linear). Ignored if output_constraints is set. */
739
+ readonly output_activation: OptionType<VariantType<{
740
+ /** No activation (linear output) - default */
741
+ readonly none: NullType;
742
+ /** Softmax (outputs sum to 1, for probability distributions) */
743
+ readonly softmax: NullType;
744
+ /** Sigmoid (each output independently in [0,1]) */
745
+ readonly sigmoid: NullType;
644
746
  }>>;
645
747
  /** Dropout rate (default 0.0) */
646
- dropout: OptionType<FloatType>;
748
+ readonly dropout: OptionType<FloatType>;
647
749
  /** Output dimension (default 1) */
648
- output_dim: OptionType<IntegerType>;
750
+ readonly output_dim: OptionType<IntegerType>;
649
751
  }>, StructType<{
650
752
  /** Number of epochs (default 100) */
651
- epochs: OptionType<IntegerType>;
753
+ readonly epochs: OptionType<IntegerType>;
652
754
  /** Batch size (default 32) */
653
- batch_size: OptionType<IntegerType>;
755
+ readonly batch_size: OptionType<IntegerType>;
654
756
  /** Learning rate (default 0.001) */
655
- learning_rate: OptionType<FloatType>;
757
+ readonly learning_rate: OptionType<FloatType>;
656
758
  /** Loss function (default mse) */
657
- loss: OptionType<VariantType<{
759
+ readonly loss: OptionType<VariantType<{
658
760
  /** Mean Squared Error (regression) */
659
- mse: StructType<{}>;
761
+ readonly mse: NullType;
660
762
  /** Mean Absolute Error (regression) */
661
- mae: StructType<{}>;
662
- /** Cross Entropy (classification) */
663
- cross_entropy: StructType<{}>;
763
+ readonly mae: NullType;
764
+ /** Cross Entropy (multi-class classification with integer targets) */
765
+ readonly cross_entropy: NullType;
766
+ /** KL Divergence (distribution matching, use with softmax output) */
767
+ readonly kl_div: NullType;
768
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
769
+ readonly bce: NullType;
770
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
771
+ readonly bce_with_logits: NullType;
664
772
  }>>;
665
773
  /** Optimizer (default adam) */
666
- optimizer: OptionType<VariantType<{
774
+ readonly optimizer: OptionType<VariantType<{
667
775
  /** Adam optimizer */
668
- adam: StructType<{}>;
776
+ readonly adam: NullType;
669
777
  /** Stochastic Gradient Descent */
670
- sgd: StructType<{}>;
778
+ readonly sgd: NullType;
671
779
  /** AdamW with weight decay */
672
- adamw: StructType<{}>;
780
+ readonly adamw: NullType;
673
781
  /** RMSprop optimizer */
674
- rmsprop: StructType<{}>;
782
+ readonly rmsprop: NullType;
675
783
  }>>;
676
784
  /** Early stopping patience, 0 = disabled */
677
- early_stopping: OptionType<IntegerType>;
785
+ readonly early_stopping: OptionType<IntegerType>;
678
786
  /** Validation split fraction (default 0.2) */
679
- validation_split: OptionType<FloatType>;
787
+ readonly validation_split: OptionType<FloatType>;
680
788
  /** Random seed for reproducibility */
681
- random_state: OptionType<IntegerType>;
789
+ readonly random_state: OptionType<IntegerType>;
682
790
  }>], StructType<{
683
791
  /** Trained model blob */
684
- model: VariantType<{
685
- torch_mlp: StructType<{
686
- data: BlobType;
687
- n_features: IntegerType;
688
- hidden_layers: ArrayType<IntegerType>;
689
- output_dim: IntegerType;
792
+ readonly model: VariantType<{
793
+ readonly torch_mlp: StructType<{
794
+ readonly data: BlobType;
795
+ readonly n_features: IntegerType;
796
+ readonly hidden_layers: ArrayType<IntegerType>;
797
+ readonly output_dim: IntegerType;
690
798
  }>;
691
799
  }>;
692
800
  /** Training result with losses */
693
- result: StructType<{
801
+ readonly result: StructType<{
694
802
  /** Training loss per epoch */
695
- train_losses: ArrayType<FloatType>;
803
+ readonly train_losses: ArrayType<FloatType>;
696
804
  /** Validation loss per epoch */
697
- val_losses: ArrayType<FloatType>;
805
+ readonly val_losses: ArrayType<FloatType>;
698
806
  /** Best epoch (for early stopping) */
699
- best_epoch: IntegerType;
807
+ readonly best_epoch: IntegerType;
700
808
  }>;
701
809
  }>>;
702
810
  /** Make predictions with MLP (single output) */
703
811
  readonly mlpPredict: import("@elaraai/east").PlatformDefinition<[VariantType<{
704
812
  /** PyTorch MLP model */
705
- torch_mlp: StructType<{
813
+ readonly torch_mlp: StructType<{
706
814
  /** Cloudpickle serialized model */
707
- data: BlobType;
815
+ readonly data: BlobType;
708
816
  /** Number of input features */
709
- n_features: IntegerType;
817
+ readonly n_features: IntegerType;
710
818
  /** Hidden layer sizes */
711
- hidden_layers: ArrayType<IntegerType>;
819
+ readonly hidden_layers: ArrayType<IntegerType>;
712
820
  /** Output dimension */
713
- output_dim: IntegerType;
821
+ readonly output_dim: IntegerType;
714
822
  }>;
715
823
  }>, ArrayType<ArrayType<FloatType>>], ArrayType<FloatType>>;
716
824
  /** Train MLP model (multi-output) */
717
825
  readonly mlpTrainMulti: import("@elaraai/east").PlatformDefinition<[ArrayType<ArrayType<FloatType>>, ArrayType<ArrayType<FloatType>>, StructType<{
718
826
  /** Hidden layer sizes, e.g., [64, 32] */
719
- hidden_layers: ArrayType<IntegerType>;
720
- /** Activation function (default relu) */
721
- activation: OptionType<VariantType<{
827
+ readonly hidden_layers: ArrayType<IntegerType>;
828
+ /** Activation function for hidden layers (default relu) */
829
+ readonly activation: OptionType<VariantType<{
722
830
  /** Rectified Linear Unit */
723
- relu: StructType<{}>;
831
+ readonly relu: NullType;
724
832
  /** Hyperbolic tangent */
725
- tanh: StructType<{}>;
833
+ readonly tanh: NullType;
726
834
  /** Sigmoid function */
727
- sigmoid: StructType<{}>;
835
+ readonly sigmoid: NullType;
728
836
  /** Leaky ReLU */
729
- leaky_relu: StructType<{}>;
837
+ readonly leaky_relu: NullType;
838
+ }>>;
839
+ /** Output activation function (default none/linear). Ignored if output_constraints is set. */
840
+ readonly output_activation: OptionType<VariantType<{
841
+ /** No activation (linear output) - default */
842
+ readonly none: NullType;
843
+ /** Softmax (outputs sum to 1, for probability distributions) */
844
+ readonly softmax: NullType;
845
+ /** Sigmoid (each output independently in [0,1]) */
846
+ readonly sigmoid: NullType;
730
847
  }>>;
731
848
  /** Dropout rate (default 0.0) */
732
- dropout: OptionType<FloatType>;
849
+ readonly dropout: OptionType<FloatType>;
733
850
  /** Output dimension (default 1) */
734
- output_dim: OptionType<IntegerType>;
851
+ readonly output_dim: OptionType<IntegerType>;
735
852
  }>, StructType<{
736
853
  /** Number of epochs (default 100) */
737
- epochs: OptionType<IntegerType>;
854
+ readonly epochs: OptionType<IntegerType>;
738
855
  /** Batch size (default 32) */
739
- batch_size: OptionType<IntegerType>;
856
+ readonly batch_size: OptionType<IntegerType>;
740
857
  /** Learning rate (default 0.001) */
741
- learning_rate: OptionType<FloatType>;
858
+ readonly learning_rate: OptionType<FloatType>;
742
859
  /** Loss function (default mse) */
743
- loss: OptionType<VariantType<{
860
+ readonly loss: OptionType<VariantType<{
744
861
  /** Mean Squared Error (regression) */
745
- mse: StructType<{}>;
862
+ readonly mse: NullType;
746
863
  /** Mean Absolute Error (regression) */
747
- mae: StructType<{}>;
748
- /** Cross Entropy (classification) */
749
- cross_entropy: StructType<{}>;
864
+ readonly mae: NullType;
865
+ /** Cross Entropy (multi-class classification with integer targets) */
866
+ readonly cross_entropy: NullType;
867
+ /** KL Divergence (distribution matching, use with softmax output) */
868
+ readonly kl_div: NullType;
869
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
870
+ readonly bce: NullType;
871
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
872
+ readonly bce_with_logits: NullType;
750
873
  }>>;
751
874
  /** Optimizer (default adam) */
752
- optimizer: OptionType<VariantType<{
875
+ readonly optimizer: OptionType<VariantType<{
753
876
  /** Adam optimizer */
754
- adam: StructType<{}>;
877
+ readonly adam: NullType;
755
878
  /** Stochastic Gradient Descent */
756
- sgd: StructType<{}>;
879
+ readonly sgd: NullType;
757
880
  /** AdamW with weight decay */
758
- adamw: StructType<{}>;
881
+ readonly adamw: NullType;
759
882
  /** RMSprop optimizer */
760
- rmsprop: StructType<{}>;
883
+ readonly rmsprop: NullType;
761
884
  }>>;
762
885
  /** Early stopping patience, 0 = disabled */
763
- early_stopping: OptionType<IntegerType>;
886
+ readonly early_stopping: OptionType<IntegerType>;
764
887
  /** Validation split fraction (default 0.2) */
765
- validation_split: OptionType<FloatType>;
888
+ readonly validation_split: OptionType<FloatType>;
766
889
  /** Random seed for reproducibility */
767
- random_state: OptionType<IntegerType>;
890
+ readonly random_state: OptionType<IntegerType>;
768
891
  }>], StructType<{
769
892
  /** Trained model blob */
770
- model: VariantType<{
771
- torch_mlp: StructType<{
772
- data: BlobType;
773
- n_features: IntegerType;
774
- hidden_layers: ArrayType<IntegerType>;
775
- output_dim: IntegerType;
893
+ readonly model: VariantType<{
894
+ readonly torch_mlp: StructType<{
895
+ readonly data: BlobType;
896
+ readonly n_features: IntegerType;
897
+ readonly hidden_layers: ArrayType<IntegerType>;
898
+ readonly output_dim: IntegerType;
776
899
  }>;
777
900
  }>;
778
901
  /** Training result with losses */
779
- result: StructType<{
902
+ readonly result: StructType<{
780
903
  /** Training loss per epoch */
781
- train_losses: ArrayType<FloatType>;
904
+ readonly train_losses: ArrayType<FloatType>;
782
905
  /** Validation loss per epoch */
783
- val_losses: ArrayType<FloatType>;
906
+ readonly val_losses: ArrayType<FloatType>;
784
907
  /** Best epoch (for early stopping) */
785
- best_epoch: IntegerType;
908
+ readonly best_epoch: IntegerType;
786
909
  }>;
787
910
  }>>;
788
- /** Make predictions with MLP (multi-output) */
911
+ /** Make predictions with MLP (multi-output, with optional sample_masks) */
789
912
  readonly mlpPredictMulti: import("@elaraai/east").PlatformDefinition<[VariantType<{
790
913
  /** PyTorch MLP model */
791
- torch_mlp: StructType<{
914
+ readonly torch_mlp: StructType<{
792
915
  /** Cloudpickle serialized model */
793
- data: BlobType;
916
+ readonly data: BlobType;
794
917
  /** Number of input features */
795
- n_features: IntegerType;
918
+ readonly n_features: IntegerType;
796
919
  /** Hidden layer sizes */
797
- hidden_layers: ArrayType<IntegerType>;
920
+ readonly hidden_layers: ArrayType<IntegerType>;
798
921
  /** Output dimension */
799
- output_dim: IntegerType;
922
+ readonly output_dim: IntegerType;
800
923
  }>;
801
924
  }>, ArrayType<ArrayType<FloatType>>], ArrayType<ArrayType<FloatType>>>;
802
925
  /** Extract intermediate layer activations (embeddings) from MLP */
803
926
  readonly mlpEncode: import("@elaraai/east").PlatformDefinition<[VariantType<{
804
927
  /** PyTorch MLP model */
805
- torch_mlp: StructType<{
928
+ readonly torch_mlp: StructType<{
806
929
  /** Cloudpickle serialized model */
807
- data: BlobType;
930
+ readonly data: BlobType;
808
931
  /** Number of input features */
809
- n_features: IntegerType;
932
+ readonly n_features: IntegerType;
810
933
  /** Hidden layer sizes */
811
- hidden_layers: ArrayType<IntegerType>;
934
+ readonly hidden_layers: ArrayType<IntegerType>;
812
935
  /** Output dimension */
813
- output_dim: IntegerType;
936
+ readonly output_dim: IntegerType;
814
937
  }>;
815
938
  }>, ArrayType<ArrayType<FloatType>>, IntegerType], ArrayType<ArrayType<FloatType>>>;
816
939
  /** Decode embeddings back through decoder portion of MLP */
817
940
  readonly mlpDecode: import("@elaraai/east").PlatformDefinition<[VariantType<{
818
941
  /** PyTorch MLP model */
819
- torch_mlp: StructType<{
942
+ readonly torch_mlp: StructType<{
820
943
  /** Cloudpickle serialized model */
821
- data: BlobType;
944
+ readonly data: BlobType;
822
945
  /** Number of input features */
823
- n_features: IntegerType;
946
+ readonly n_features: IntegerType;
824
947
  /** Hidden layer sizes */
825
- hidden_layers: ArrayType<IntegerType>;
948
+ readonly hidden_layers: ArrayType<IntegerType>;
826
949
  /** Output dimension */
827
- output_dim: IntegerType;
950
+ readonly output_dim: IntegerType;
828
951
  }>;
829
952
  }>, ArrayType<ArrayType<FloatType>>, IntegerType], ArrayType<ArrayType<FloatType>>>;
830
953
  /** Type definitions */
@@ -833,134 +956,164 @@ export declare const Torch: {
833
956
  readonly VectorType: ArrayType<FloatType>;
834
957
  /** Matrix type (2D array of floats) */
835
958
  readonly MatrixType: ArrayType<ArrayType<FloatType>>;
836
- /** Activation function type */
959
+ /** Activation function type for hidden layers */
837
960
  readonly TorchActivationType: VariantType<{
838
961
  /** Rectified Linear Unit */
839
- relu: StructType<{}>;
962
+ readonly relu: NullType;
840
963
  /** Hyperbolic tangent */
841
- tanh: StructType<{}>;
964
+ readonly tanh: NullType;
842
965
  /** Sigmoid function */
843
- sigmoid: StructType<{}>;
966
+ readonly sigmoid: NullType;
844
967
  /** Leaky ReLU */
845
- leaky_relu: StructType<{}>;
968
+ readonly leaky_relu: NullType;
969
+ }>;
970
+ /** Output activation function type */
971
+ readonly TorchOutputActivationType: VariantType<{
972
+ /** No activation (linear output) - default */
973
+ readonly none: NullType;
974
+ /** Softmax (outputs sum to 1, for probability distributions) */
975
+ readonly softmax: NullType;
976
+ /** Sigmoid (each output independently in [0,1]) */
977
+ readonly sigmoid: NullType;
846
978
  }>;
847
979
  /** Loss function type */
848
980
  readonly TorchLossType: VariantType<{
849
981
  /** Mean Squared Error (regression) */
850
- mse: StructType<{}>;
982
+ readonly mse: NullType;
851
983
  /** Mean Absolute Error (regression) */
852
- mae: StructType<{}>;
853
- /** Cross Entropy (classification) */
854
- cross_entropy: StructType<{}>;
984
+ readonly mae: NullType;
985
+ /** Cross Entropy (multi-class classification with integer targets) */
986
+ readonly cross_entropy: NullType;
987
+ /** KL Divergence (distribution matching, use with softmax output) */
988
+ readonly kl_div: NullType;
989
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
990
+ readonly bce: NullType;
991
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
992
+ readonly bce_with_logits: NullType;
855
993
  }>;
856
994
  /** Optimizer type */
857
995
  readonly TorchOptimizerType: VariantType<{
858
996
  /** Adam optimizer */
859
- adam: StructType<{}>;
997
+ readonly adam: NullType;
860
998
  /** Stochastic Gradient Descent */
861
- sgd: StructType<{}>;
999
+ readonly sgd: NullType;
862
1000
  /** AdamW with weight decay */
863
- adamw: StructType<{}>;
1001
+ readonly adamw: NullType;
864
1002
  /** RMSprop optimizer */
865
- rmsprop: StructType<{}>;
1003
+ readonly rmsprop: NullType;
866
1004
  }>;
867
1005
  /** MLP configuration type */
868
1006
  readonly TorchMLPConfigType: StructType<{
869
1007
  /** Hidden layer sizes, e.g., [64, 32] */
870
- hidden_layers: ArrayType<IntegerType>;
871
- /** Activation function (default relu) */
872
- activation: OptionType<VariantType<{
1008
+ readonly hidden_layers: ArrayType<IntegerType>;
1009
+ /** Activation function for hidden layers (default relu) */
1010
+ readonly activation: OptionType<VariantType<{
873
1011
  /** Rectified Linear Unit */
874
- relu: StructType<{}>;
1012
+ readonly relu: NullType;
875
1013
  /** Hyperbolic tangent */
876
- tanh: StructType<{}>;
1014
+ readonly tanh: NullType;
877
1015
  /** Sigmoid function */
878
- sigmoid: StructType<{}>;
1016
+ readonly sigmoid: NullType;
879
1017
  /** Leaky ReLU */
880
- leaky_relu: StructType<{}>;
1018
+ readonly leaky_relu: NullType;
1019
+ }>>;
1020
+ /** Output activation function (default none/linear). Ignored if output_constraints is set. */
1021
+ readonly output_activation: OptionType<VariantType<{
1022
+ /** No activation (linear output) - default */
1023
+ readonly none: NullType;
1024
+ /** Softmax (outputs sum to 1, for probability distributions) */
1025
+ readonly softmax: NullType;
1026
+ /** Sigmoid (each output independently in [0,1]) */
1027
+ readonly sigmoid: NullType;
881
1028
  }>>;
882
1029
  /** Dropout rate (default 0.0) */
883
- dropout: OptionType<FloatType>;
1030
+ readonly dropout: OptionType<FloatType>;
884
1031
  /** Output dimension (default 1) */
885
- output_dim: OptionType<IntegerType>;
1032
+ readonly output_dim: OptionType<IntegerType>;
886
1033
  }>;
887
1034
  /** Training configuration type */
888
1035
  readonly TorchTrainConfigType: StructType<{
889
1036
  /** Number of epochs (default 100) */
890
- epochs: OptionType<IntegerType>;
1037
+ readonly epochs: OptionType<IntegerType>;
891
1038
  /** Batch size (default 32) */
892
- batch_size: OptionType<IntegerType>;
1039
+ readonly batch_size: OptionType<IntegerType>;
893
1040
  /** Learning rate (default 0.001) */
894
- learning_rate: OptionType<FloatType>;
1041
+ readonly learning_rate: OptionType<FloatType>;
895
1042
  /** Loss function (default mse) */
896
- loss: OptionType<VariantType<{
1043
+ readonly loss: OptionType<VariantType<{
897
1044
  /** Mean Squared Error (regression) */
898
- mse: StructType<{}>;
1045
+ readonly mse: NullType;
899
1046
  /** Mean Absolute Error (regression) */
900
- mae: StructType<{}>;
901
- /** Cross Entropy (classification) */
902
- cross_entropy: StructType<{}>;
1047
+ readonly mae: NullType;
1048
+ /** Cross Entropy (multi-class classification with integer targets) */
1049
+ readonly cross_entropy: NullType;
1050
+ /** KL Divergence (distribution matching, use with softmax output) */
1051
+ readonly kl_div: NullType;
1052
+ /** Binary Cross Entropy (multi-label binary, requires sigmoid output) */
1053
+ readonly bce: NullType;
1054
+ /** Binary Cross Entropy with Logits (more stable, applies sigmoid internally - do NOT use with sigmoid output_activation) */
1055
+ readonly bce_with_logits: NullType;
903
1056
  }>>;
904
1057
  /** Optimizer (default adam) */
905
- optimizer: OptionType<VariantType<{
1058
+ readonly optimizer: OptionType<VariantType<{
906
1059
  /** Adam optimizer */
907
- adam: StructType<{}>;
1060
+ readonly adam: NullType;
908
1061
  /** Stochastic Gradient Descent */
909
- sgd: StructType<{}>;
1062
+ readonly sgd: NullType;
910
1063
  /** AdamW with weight decay */
911
- adamw: StructType<{}>;
1064
+ readonly adamw: NullType;
912
1065
  /** RMSprop optimizer */
913
- rmsprop: StructType<{}>;
1066
+ readonly rmsprop: NullType;
914
1067
  }>>;
915
1068
  /** Early stopping patience, 0 = disabled */
916
- early_stopping: OptionType<IntegerType>;
1069
+ readonly early_stopping: OptionType<IntegerType>;
917
1070
  /** Validation split fraction (default 0.2) */
918
- validation_split: OptionType<FloatType>;
1071
+ readonly validation_split: OptionType<FloatType>;
919
1072
  /** Random seed for reproducibility */
920
- random_state: OptionType<IntegerType>;
1073
+ readonly random_state: OptionType<IntegerType>;
921
1074
  }>;
922
1075
  /** Training result type */
923
1076
  readonly TorchTrainResultType: StructType<{
924
1077
  /** Training loss per epoch */
925
- train_losses: ArrayType<FloatType>;
1078
+ readonly train_losses: ArrayType<FloatType>;
926
1079
  /** Validation loss per epoch */
927
- val_losses: ArrayType<FloatType>;
1080
+ readonly val_losses: ArrayType<FloatType>;
928
1081
  /** Best epoch (for early stopping) */
929
- best_epoch: IntegerType;
1082
+ readonly best_epoch: IntegerType;
930
1083
  }>;
931
1084
  /** Training output type (model + result) */
932
1085
  readonly TorchTrainOutputType: StructType<{
933
1086
  /** Trained model blob */
934
- model: VariantType<{
935
- torch_mlp: StructType<{
936
- data: BlobType;
937
- n_features: IntegerType;
938
- hidden_layers: ArrayType<IntegerType>;
939
- output_dim: IntegerType;
1087
+ readonly model: VariantType<{
1088
+ readonly torch_mlp: StructType<{
1089
+ readonly data: BlobType;
1090
+ readonly n_features: IntegerType;
1091
+ readonly hidden_layers: ArrayType<IntegerType>;
1092
+ readonly output_dim: IntegerType;
940
1093
  }>;
941
1094
  }>;
942
1095
  /** Training result with losses */
943
- result: StructType<{
1096
+ readonly result: StructType<{
944
1097
  /** Training loss per epoch */
945
- train_losses: ArrayType<FloatType>;
1098
+ readonly train_losses: ArrayType<FloatType>;
946
1099
  /** Validation loss per epoch */
947
- val_losses: ArrayType<FloatType>;
1100
+ readonly val_losses: ArrayType<FloatType>;
948
1101
  /** Best epoch (for early stopping) */
949
- best_epoch: IntegerType;
1102
+ readonly best_epoch: IntegerType;
950
1103
  }>;
951
1104
  }>;
952
1105
  /** Model blob type for PyTorch models */
953
1106
  readonly ModelBlobType: VariantType<{
954
1107
  /** PyTorch MLP model */
955
- torch_mlp: StructType<{
1108
+ readonly torch_mlp: StructType<{
956
1109
  /** Cloudpickle serialized model */
957
- data: BlobType;
1110
+ readonly data: BlobType;
958
1111
  /** Number of input features */
959
- n_features: IntegerType;
1112
+ readonly n_features: IntegerType;
960
1113
  /** Hidden layer sizes */
961
- hidden_layers: ArrayType<IntegerType>;
1114
+ readonly hidden_layers: ArrayType<IntegerType>;
962
1115
  /** Output dimension */
963
- output_dim: IntegerType;
1116
+ readonly output_dim: IntegerType;
964
1117
  }>;
965
1118
  }>;
966
1119
  };