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