Built-in models catalog
Generated from the manifests of every model plugin installed through the mapi.models
entry point. Read Built-in models for how to use them.
| Model |
Version |
Inference |
Representation |
Score modes |
causal.did |
1.0.0 |
mcmc |
draws |
counterfactual, predict |
causal.impact |
1.0.0 |
mcmc |
draws |
forecast, predict |
causal.synthetic_control |
1.0.0 |
mcmc |
draws |
predict |
choice.multinomial_logit |
1.0.0 |
bootstrap |
draws |
counterfactual, evaluate, forecast, predict |
dl.cnn_classifier |
1.0.0 |
custom |
draws |
evaluate, predict |
dl.finetune_classifier |
1.0.0 |
custom |
draws |
evaluate, predict |
dl.mlp |
1.0.0 |
custom |
draws |
evaluate, predict |
mmm.bayesian |
1.1.0 |
mcmc |
draws |
counterfactual, evaluate, forecast, predict |
mmm.frequentist |
1.0.0 |
bootstrap |
draws |
counterfactual, evaluate, forecast, predict |
mmm.multivariate |
1.0.0 |
mcmc |
draws |
counterfactual, evaluate, forecast, predict |
mmm.nested |
1.0.0 |
mcmc |
draws |
counterfactual, evaluate, forecast, predict |
sci.areal_bym2 |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.circular_regression |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.cmb_field |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.colour_naming |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.fisher_kpp |
1.0.0 |
mcmc |
draws |
evaluate, forecast, predict |
sci.graphical_model |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.heat_plate |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.ibp_features |
1.0.0 |
mcmc |
draws |
evaluate, predict |
sci.lgcp_grid |
1.0.0 |
mcmc |
draws |
evaluate, forecast, predict |
sci.network_latent_space |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.phylo_regression |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.storm_localisation |
1.0.0 |
mcmc |
draws |
evaluate, predict |
sci.strong_lens |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sci.traction_force |
1.0.0 |
mcmc |
draws |
evaluate, predict |
sci.turing_pattern |
1.0.0 |
mcmc |
draws |
evaluate, predict, simulate |
sklearn.multiclass_classifier |
1.0.0 |
point |
point |
evaluate, predict |
sklearn.tabular_bootstrap |
1.0.0 |
bootstrap |
draws |
counterfactual, evaluate, forecast, predict |
sklearn.tabular_classifier |
1.0.0 |
point |
point |
counterfactual, evaluate, forecast, predict |
sklearn.tabular_conformal |
1.0.0 |
custom |
interval |
counterfactual, evaluate, forecast, predict |
sklearn.tabular_quantiles |
1.0.0 |
custom |
quantiles |
counterfactual, evaluate, forecast, predict |
sklearn.tabular_regressor |
1.0.0 |
point |
point |
counterfactual, evaluate, forecast, predict |
tabular.hierarchical_glm |
1.1.0 |
mcmc |
draws |
counterfactual, evaluate, predict |
tabular.image_logistic |
1.1.0 |
mcmc |
draws |
evaluate, predict |
tabular.regressor |
1.0.0 |
custom |
quantiles |
counterfactual, evaluate, forecast, predict |
ts.ardl |
1.0.0 |
point |
quantiles |
evaluate, forecast, predict |
ts.arima |
1.0.0 |
kalman |
quantiles |
evaluate, forecast, predict |
ts.bsts |
1.0.0 |
mcmc |
draws |
evaluate, filter, forecast, predict |
ts.dynamic_factor |
1.0.0 |
kalman |
quantiles |
evaluate, forecast, predict |
ts.ecm |
1.0.0 |
point |
quantiles |
evaluate, forecast, predict |
ts.ets |
1.0.0 |
custom |
quantiles |
evaluate, forecast, predict |
ts.gaussian_hmm |
1.0.0 |
mcmc |
draws |
evaluate, filter, forecast, predict |
ts.hsgp_trend |
1.0.0 |
mcmc |
draws |
evaluate, forecast, predict |
ts.markov_switching |
1.0.0 |
custom |
quantiles |
evaluate, forecast, predict |
ts.sarimax |
1.0.0 |
kalman |
quantiles |
evaluate, forecast, predict |
ts.theta |
1.0.0 |
custom |
quantiles |
evaluate, forecast, predict |
ts.unobserved_components |
1.0.0 |
kalman |
quantiles |
evaluate, forecast, predict |
ts.var |
1.0.0 |
point |
quantiles |
evaluate, forecast, predict |
ts.varmax |
1.0.0 |
kalman |
quantiles |
evaluate, forecast, predict |
ts.vecm |
1.0.0 |
point |
quantiles |
evaluate, forecast, predict |
causal.did
Bayesian difference-in-differences and event study on a panel of units over time: unit and period effects plus one effect per period relative to the adoption of the treatment, compared with units that never got it.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
counterfactual, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
scaling |
| LOO |
valid |
| Default plots |
causal.event_study, causal.impact, causal.pre_fit, core.convergence, core.posterior_forest |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(unit, time) |
of y |
Expected value or predictive draw of y; with the intervention treatment = 0, the outcome without the treatment |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
design |
event_study or did |
event_study |
– |
event_study: one effect per period relative to the adoption; did: one effect for all treated cells (x-ui-level: basic) |
leads |
integer |
4 |
– |
Periods before the adoption with an effect (≥ 0, ≤ 52) |
lags |
integer |
8 |
– |
Periods after the adoption with an effect (≥ 0, ≤ 104) |
bin_endpoints |
boolean |
true |
– |
The first lead and the last lag also take the periods further out |
time_effects |
iid or random_walk |
iid |
– |
iid: independent period effects; random_walk: smooth period effects |
covariates |
list of string |
– |
– |
Control variables over (unit, time) (max items 16) |
likelihood |
normal or student_t |
normal |
– |
|
effect_sigma |
number |
1.0 |
– |
Prior sd of the event effects (> 0, ≤ 10) |
noise_sigma |
number |
0.5 |
– |
Half-normal scale of sigma (> 0, ≤ 10) |
Input data contract (schema template)
{
"params": {
"covariates": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"unit": {
"kind": "categorical",
"policy": "fixed"
},
"time": {
"kind": "time",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"unit",
"time"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
},
"treatment": {
"dims": [
"unit",
"time"
],
"dtype": "float64",
"role": "covariate",
"bounds": [
0.0,
1.0
]
},
"{*covariates as x}": {
"dims": [
"unit",
"time"
],
"dtype": "float64",
"role": "covariate"
}
}
}
}
causal.impact
CausalImpact / interrupted time series: a Bayesian structural time series fitted on the periods before an intervention, with control series as regressors, predicts the series without the intervention; the effect is actual minus that counterfactual.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
scaling |
| LOO |
invalid: the Kalman likelihood is a sum over the whole series; steps depend on each other, so pointwise leave-one-out is not defined |
| Default plots |
causal.impact, causal.pre_fit, core.decomposition, core.convergence, core.posterior_forest |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(time) |
of y |
What y would be without the intervention |
effect |
(time) |
of y |
The effect of the intervention: y minus what y would be without it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
intervention_start |
string |
required |
– |
First period of the intervention: an ISO date (YYYY-MM-DD) or a period number |
intervention_end |
string (optional) |
null |
– |
Last period of the intervention (inclusive); empty: until the end of the data |
trend |
level or local_linear or smooth |
local_linear |
basic |
level: a level that wanders; local_linear: a level and a slope that both wander; smooth: a slope that wanders slowly (a smooth trend) |
seasonality |
list of SeasonSettings |
– |
basic |
Seasonal patterns (at most three) (max items 3) |
level_sigma |
number |
0.1 |
– |
Half-normal scale of level changes (> 0, ≤ 5) |
slope_sigma |
number |
0.02 |
– |
Half-normal scale of slope changes (> 0, ≤ 5) |
obs_sigma |
number |
0.5 |
– |
Half-normal scale of the noise (> 0, ≤ 10) |
initial_sd |
number |
1.0 |
– |
Prior sd of the initial states and seasonal effects (> 0, ≤ 10) |
regression_prior |
normal or horseshoe |
normal |
– |
normal: every driver has an effect; horseshoe: most drivers have none |
regression_sigma |
number |
1.0 |
– |
Prior scale of the driver effects (standardised) (> 0, ≤ 10) |
controls |
list of string |
– |
basic |
Control series that the intervention did not affect (other regions, competitors, search interest); their values are needed for every period (max items 32) |
Nested settings types
SeasonSettings
One seasonal pattern.
| Field |
Type |
Default |
Description |
period |
number |
required |
Length of the cycle in periods of the time dim (12 for monthly data with a yearly cycle, 52.18 for weekly data, 7 for daily data) (> 1, ≤ 1000) |
harmonics |
integer (optional) |
null |
Number of sine/cosine pairs. Empty: one effect per season (needs a whole-number period of at most 24) |
stochastic |
boolean |
false |
Let the seasonal pattern change over time |
sigma |
number |
0.05 |
Half-normal scale of the seasonal changes (standardised) (> 0, ≤ 5) |
Input data contract (schema template)
{
"params": {
"controls": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"time": {
"kind": "time",
"policy": "extend"
}
},
"vars": {
"y": {
"dims": [
"time"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
},
"{*controls as x}": {
"dims": [
"time"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
}
}
causal.synthetic_control
Bayesian synthetic control for geo-lift tests: each treated market is a weighted mix of untreated markets fitted before the test; the mix after the start is the counterfactual, and the difference to the actual sales is the effect.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
scaling |
| LOO |
invalid: the likelihood covers only the pre-period of the treated units, so pointwise leave-one-out does not describe the scored data |
| Default plots |
causal.impact, causal.pre_fit, causal.donor_weights, core.convergence |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(unit, time) |
of y |
The synthetic control: what y of a treated unit would be without the intervention (NaN for donor units) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
intervention_start |
string |
required |
– |
First period of the intervention: an ISO date (YYYY-MM-DD) or a period number |
intervention_end |
string (optional) |
null |
– |
Last period of the intervention (inclusive); empty: until the end of the data |
treated |
list of string |
required |
– |
Labels of the units (markets) that got the intervention; a text 'a, b' is split at the commas (x-ui-level: basic) (min items 1, max items 20) |
donors |
list of string (optional) |
null |
– |
Units to build the synthetic copy from; default: every unit that is not treated |
weights |
simplex or horseshoe |
simplex |
– |
simplex: positive weights that sum to 1 (classic synthetic control); horseshoe: sparse weights of any sign (can extrapolate) |
concentration |
number |
1.0 |
– |
Dirichlet concentration of simplex weights (< 1: sparse) (> 0, ≤ 100) |
intercept |
boolean |
true |
– |
Allow a level shift between a unit and its synthetic copy |
normalize |
mean or none |
mean |
– |
mean: divide each unit by its pre-period mean before the fit |
noise_sigma |
number |
0.5 |
– |
Half-normal scale of sigma (> 0, ≤ 10) |
likelihood |
normal or student_t |
normal |
– |
|
Input data contract (schema template)
{
"template": {
"dims": {
"unit": {
"kind": "categorical",
"policy": "fixed"
},
"time": {
"kind": "time",
"policy": "extend"
}
},
"vars": {
"y": {
"dims": [
"unit",
"time"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
}
}
choice.multinomial_logit
Which product customers choose on each shopping trip: a conditional (multinomial) logit over alternative-specific covariates such as price and promotion, with household-specific product preferences. Uncertainty comes from the Bayesian bootstrap over households; new households draw their preferences from the fitted spread.
|
|
| Version |
1.0.0 |
| Inference |
bootstrap |
| Representation |
draws |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: bootstrap draws have no pointwise log-likelihood |
| Default plots |
core.data_overview, core.posterior_forest |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(hh, trip, product) |
probability |
Choice probability of each product per household and trip (predictive: one sampled choice, one-hot) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
covariates |
list of string (optional) |
null |
advanced |
Alternative-specific variables along product (default: every numeric variable with the product dim) |
random_effects |
list of hh |
["hh"] |
advanced |
Household-specific product intercepts ([hh]) or none ([]) (max items 1) |
effect_sd |
number |
1.0 |
advanced |
Prior sd of the household effects (smaller pools households more) (> 0, ≤ 10) |
coef_sd |
number |
10.0 |
advanced |
Prior sd of the product intercepts and coefficients (weak) (> 0, ≤ 1000) |
reference |
string (optional) |
null |
advanced |
Product whose intercept is fixed at 0 (default: the first label) |
max_iter |
integer |
500 |
advanced |
≥ 10, ≤ 10000 |
Input data contract (schema template)
{
"params": {
"covariates": {
"type": "string_list",
"path": "covariates",
"default": []
}
},
"template": {
"dims": {
"hh": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "hyperprior"
},
"trip": {
"kind": "index",
"policy": "extend"
},
"product": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"hh",
"trip"
],
"dtype": "str",
"role": "target",
"missing": "allow"
},
"{*covariates as v}": {
"dims": [
"hh",
"trip",
"product"
],
"dtype": "float64",
"role": "covariate",
"missing": "allow"
}
}
}
}
dl.cnn_classifier
A small residual convolutional network trained on labelled images. It streams large image collections in batches, logs training and validation curves, and gives probability draws by a last-layer Laplace approximation or MC dropout.
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
draws |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: a network trained by gradient descent has no pointwise log likelihood |
| Default plots |
ml.training_curves, ml.confusion_epochs, ml.misclassified, core.roc_pr, core.confusion |
| Resources |
class M (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(class) |
1 |
Probability of each class per image (sums to 1 over class) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
pixels |
string |
pixels |
– |
The image variable (image, y, x, channel) |
target |
string |
label |
– |
The class label of each image |
image_dim |
string |
image |
– |
The dim that lists the images |
image_size |
list of any (optional) |
null |
– |
Height and width the images are resized to (default: their size) |
mode |
auto or gray or rgb |
auto |
– |
Channels of the input |
normalize |
unit or standardize |
unit |
– |
unit: pixels / 255; standardize: per-channel training mean and sd |
augment |
Augment |
– |
– |
Training augmentation |
train |
TrainConfig |
– |
– |
|
uncertainty |
UncertaintyConfig |
– |
– |
|
class_order |
list of string (optional) |
null |
– |
Classes in order (default: sorted) |
widths |
list of integer |
[16, 32, 64] |
– |
Channels of each stage (min items 1, max items 8) |
blocks |
list of integer |
[1, 1, 1] |
– |
Residual blocks per stage (min items 1, max items 8) |
groups |
integer |
8 |
– |
GroupNorm groups (at most) (≥ 1, ≤ 64) |
stem_stride |
integer |
1 |
– |
Stride of the first convolution (≥ 1, ≤ 2) |
dropout |
number |
0.1 |
– |
Dropout before the head (≥ 0, < 1) |
Nested settings types
Augment
Random per-image transforms a loader applies to training batches. Flips and 90-degree turns (only half turns for non-square images) keep the pixels; crop_pad pads by n pixels (edge values) and crops back to the size at a random offset; brightness/contrast add or scale by a random amount up to the value (in units of the 0..255 range); noise adds Gaussian noise with that standard deviation.
| Field |
Type |
Default |
Description |
flip_x |
boolean |
false |
Mirror left-right with probability 0.5 |
flip_y |
boolean |
false |
Mirror top-bottom with probability 0.5 |
rotate90 |
boolean |
false |
Turn by a random multiple of 90 degrees |
crop_pad |
integer |
0 |
Pad by n pixels, then crop at random (≥ 0, ≤ 64) |
brightness |
number |
0 |
Largest brightness change (≥ 0, ≤ 1) |
contrast |
number |
0 |
Largest relative contrast change (≥ 0, ≤ 1) |
noise |
number |
0 |
Gaussian noise sd (0..1 units) (≥ 0, ≤ 0.5) |
EarlyStopping
Stop when the monitored validation metric has not improved for patience evaluations.
| Field |
Type |
Default |
Description |
monitor |
val_loss or val_accuracy or val_rmse |
val_loss |
The validation metric to watch |
patience |
integer |
5 |
Evaluations without improvement (≥ 1, ≤ 1000) |
min_delta |
number |
0.0 |
The smallest change that counts as better (≥ 0) |
restore_best |
boolean |
true |
Keep the weights of the best evaluation |
TrainConfig
How a network is trained (optimizer, schedule, validation, logging).
| Field |
Type |
Default |
Description |
epochs |
integer |
20 |
Passes over the training rows (≥ 1, ≤ 10000) |
batch_size |
integer |
64 |
Rows per gradient step (≥ 1, ≤ 8192) |
optimizer |
adamw or adam or sgd |
adamw |
|
learning_rate |
number |
0.001 |
Peak learning rate (> 0, ≤ 10) |
weight_decay |
number |
0.0001 |
Decoupled weight decay (adamw) (≥ 0, ≤ 1) |
momentum |
number |
0.9 |
Momentum (sgd) (≥ 0, < 1) |
schedule |
constant or cosine or warmup_cosine |
warmup_cosine |
|
warmup_epochs |
number |
1.0 |
Linear warm-up (warmup_cosine) (≥ 0, ≤ 100) |
grad_clip |
number (optional) |
1.0 |
Clip the global gradient norm |
label_smoothing |
number |
0.0 |
Classification only (≥ 0, < 1) |
val_fraction |
number |
0.1 |
Stratified share of the training rows for validation (≥ 0, < 0.9) |
val_split_value |
string (optional) |
val |
Rows whose split coord equals this value are the validation set |
early_stopping |
EarlyStopping (optional) |
– |
|
log_every_steps |
integer (optional) |
null |
Steps between logged training metrics (default: <= 1000 points) |
eval_every_epochs |
integer |
1 |
Epochs between validation passes (≥ 1) |
media_every_epochs |
integer (optional) |
null |
Epochs between logged images (default: at most 20 times) |
max_steps |
integer (optional) |
null |
Stop after this many gradient steps |
UncertaintyConfig
How a trained network gives draws (chain=1, draw).
| Field |
Type |
Default |
Description |
method |
laplace or mc_dropout or none |
laplace |
laplace: last-layer Laplace; mc_dropout: dropout at score; none: one draw |
draws |
integer (optional) |
null |
Draws per prediction (default: fit draws, else 100) |
hessian |
auto or full or diag |
auto |
auto: full when (features + 1) x outputs <= 2048 |
max_rows |
integer |
20000 |
Training rows used for the Laplace Hessian (≥ 10) |
prior_precision |
number (optional) |
null |
None: maximise the Laplace evidence on a grid 1e-4..1e4 |
Input data contract (schema template)
{
"params": {
"pixels": {
"type": "string",
"default": "pixels"
},
"target": {
"type": "string",
"default": "label"
},
"image_dim": {
"type": "string",
"default": "image"
}
},
"template": {
"dims": {
"{image_dim}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "pooled"
},
"y": {
"kind": "integer",
"policy": "fixed"
},
"x": {
"kind": "integer",
"policy": "fixed"
},
"channel": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"{pixels}": {
"dims": [
"{image_dim}",
"y",
"x",
"channel"
],
"dtype": "uint8",
"role": "covariate"
},
"{target}": {
"dims": [
"{image_dim}"
],
"dtype": "str",
"role": "target",
"missing": "allow"
}
}
}
}
dl.finetune_classifier
A pretrained residual network (weights from a dataset version) with a new classifier head, trained on labelled images. The backbone can stay frozen. No download: the weights are a pinned side table.
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
draws |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: a network trained by gradient descent has no pointwise log likelihood |
| Default plots |
ml.training_curves, ml.confusion_epochs, ml.misclassified, core.roc_pr, core.confusion |
| Resources |
class M (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(class) |
1 |
Probability of each class per image (sums to 1 over class) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
pixels |
string |
pixels |
– |
The image variable (image, y, x, channel) |
target |
string |
label |
– |
The class label of each image |
image_dim |
string |
image |
– |
The dim that lists the images |
image_size |
list of any (optional) |
null |
– |
Height and width the images are resized to (default: their size) |
mode |
auto or gray or rgb |
auto |
– |
Channels of the input |
normalize |
unit or standardize |
unit |
– |
unit: pixels / 255; standardize: per-channel training mean and sd |
augment |
Augment |
– |
– |
Training augmentation |
train |
TrainConfig |
– |
– |
|
uncertainty |
UncertaintyConfig |
– |
– |
|
class_order |
list of string (optional) |
null |
– |
Classes in order (default: sorted) |
pretrained |
string |
pretrained |
– |
The data.side_tables entry with the pretrained weights |
freeze |
none or backbone |
none |
– |
backbone: train the head only |
head_epochs |
integer |
1 |
– |
Epochs that train the head only before the rest (≥ 0, ≤ 10000) |
backbone_lr_scale |
number |
0.1 |
– |
Learning rate of the backbone relative to the head (> 0, ≤ 1) |
dropout |
number (optional) |
null |
– |
Dropout before the head (default: the weights' value) |
Nested settings types
Augment
Random per-image transforms a loader applies to training batches. Flips and 90-degree turns (only half turns for non-square images) keep the pixels; crop_pad pads by n pixels (edge values) and crops back to the size at a random offset; brightness/contrast add or scale by a random amount up to the value (in units of the 0..255 range); noise adds Gaussian noise with that standard deviation.
| Field |
Type |
Default |
Description |
flip_x |
boolean |
false |
Mirror left-right with probability 0.5 |
flip_y |
boolean |
false |
Mirror top-bottom with probability 0.5 |
rotate90 |
boolean |
false |
Turn by a random multiple of 90 degrees |
crop_pad |
integer |
0 |
Pad by n pixels, then crop at random (≥ 0, ≤ 64) |
brightness |
number |
0 |
Largest brightness change (≥ 0, ≤ 1) |
contrast |
number |
0 |
Largest relative contrast change (≥ 0, ≤ 1) |
noise |
number |
0 |
Gaussian noise sd (0..1 units) (≥ 0, ≤ 0.5) |
EarlyStopping
Stop when the monitored validation metric has not improved for patience evaluations.
| Field |
Type |
Default |
Description |
monitor |
val_loss or val_accuracy or val_rmse |
val_loss |
The validation metric to watch |
patience |
integer |
5 |
Evaluations without improvement (≥ 1, ≤ 1000) |
min_delta |
number |
0.0 |
The smallest change that counts as better (≥ 0) |
restore_best |
boolean |
true |
Keep the weights of the best evaluation |
TrainConfig
How a network is trained (optimizer, schedule, validation, logging).
| Field |
Type |
Default |
Description |
epochs |
integer |
20 |
Passes over the training rows (≥ 1, ≤ 10000) |
batch_size |
integer |
64 |
Rows per gradient step (≥ 1, ≤ 8192) |
optimizer |
adamw or adam or sgd |
adamw |
|
learning_rate |
number |
0.001 |
Peak learning rate (> 0, ≤ 10) |
weight_decay |
number |
0.0001 |
Decoupled weight decay (adamw) (≥ 0, ≤ 1) |
momentum |
number |
0.9 |
Momentum (sgd) (≥ 0, < 1) |
schedule |
constant or cosine or warmup_cosine |
warmup_cosine |
|
warmup_epochs |
number |
1.0 |
Linear warm-up (warmup_cosine) (≥ 0, ≤ 100) |
grad_clip |
number (optional) |
1.0 |
Clip the global gradient norm |
label_smoothing |
number |
0.0 |
Classification only (≥ 0, < 1) |
val_fraction |
number |
0.1 |
Stratified share of the training rows for validation (≥ 0, < 0.9) |
val_split_value |
string (optional) |
val |
Rows whose split coord equals this value are the validation set |
early_stopping |
EarlyStopping (optional) |
– |
|
log_every_steps |
integer (optional) |
null |
Steps between logged training metrics (default: <= 1000 points) |
eval_every_epochs |
integer |
1 |
Epochs between validation passes (≥ 1) |
media_every_epochs |
integer (optional) |
null |
Epochs between logged images (default: at most 20 times) |
max_steps |
integer (optional) |
null |
Stop after this many gradient steps |
UncertaintyConfig
How a trained network gives draws (chain=1, draw).
| Field |
Type |
Default |
Description |
method |
laplace or mc_dropout or none |
laplace |
laplace: last-layer Laplace; mc_dropout: dropout at score; none: one draw |
draws |
integer (optional) |
null |
Draws per prediction (default: fit draws, else 100) |
hessian |
auto or full or diag |
auto |
auto: full when (features + 1) x outputs <= 2048 |
max_rows |
integer |
20000 |
Training rows used for the Laplace Hessian (≥ 10) |
prior_precision |
number (optional) |
null |
None: maximise the Laplace evidence on a grid 1e-4..1e4 |
Input data contract (schema template)
{
"params": {
"pixels": {
"type": "string",
"default": "pixels"
},
"target": {
"type": "string",
"default": "label"
},
"image_dim": {
"type": "string",
"default": "image"
}
},
"template": {
"dims": {
"{image_dim}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "pooled"
},
"y": {
"kind": "integer",
"policy": "fixed"
},
"x": {
"kind": "integer",
"policy": "fixed"
},
"channel": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"{pixels}": {
"dims": [
"{image_dim}",
"y",
"x",
"channel"
],
"dtype": "uint8",
"role": "covariate"
},
"{target}": {
"dims": [
"{image_dim}"
],
"dtype": "str",
"role": "target",
"missing": "allow"
}
}
}
}
dl.mlp
A multilayer perceptron for a table: numeric features predict a number or a class. It logs training and validation curves and gives draws by a last-layer Laplace approximation or MC dropout.
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
draws |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: a network trained by gradient descent has no pointwise log likelihood |
| Default plots |
ml.training_curves |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
() |
– |
Prediction per row; a classification adds a class dim (the probability of each class, summing to 1 over class) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
target |
string |
y |
– |
The target variable |
rows |
list of string |
required |
– |
The dims of a row (min items 1, max items 8) |
target_dtype |
float64 or str or int64 |
float64 |
– |
dtype of the target: numbers, text labels or integer labels |
features |
list of string (optional) |
null |
– |
Feature variables (default: every numeric one) |
task |
auto or regression or classification |
auto |
– |
auto: classification for text or integer labels |
new_levels |
pooled or zero or error |
pooled |
– |
Unseen row levels at score |
hidden |
list of integer |
[64, 64] |
– |
Hidden layer widths (max items 16) |
dropout |
number |
0.1 |
– |
Dropout between and after the layers (≥ 0, < 1) |
train |
TrainConfig |
– |
– |
|
uncertainty |
UncertaintyConfig |
– |
– |
|
class_order |
list of string (optional) |
null |
– |
|
Nested settings types
EarlyStopping
Stop when the monitored validation metric has not improved for patience evaluations.
| Field |
Type |
Default |
Description |
monitor |
val_loss or val_accuracy or val_rmse |
val_loss |
The validation metric to watch |
patience |
integer |
5 |
Evaluations without improvement (≥ 1, ≤ 1000) |
min_delta |
number |
0.0 |
The smallest change that counts as better (≥ 0) |
restore_best |
boolean |
true |
Keep the weights of the best evaluation |
TrainConfig
How a network is trained (optimizer, schedule, validation, logging).
| Field |
Type |
Default |
Description |
epochs |
integer |
20 |
Passes over the training rows (≥ 1, ≤ 10000) |
batch_size |
integer |
64 |
Rows per gradient step (≥ 1, ≤ 8192) |
optimizer |
adamw or adam or sgd |
adamw |
|
learning_rate |
number |
0.001 |
Peak learning rate (> 0, ≤ 10) |
weight_decay |
number |
0.0001 |
Decoupled weight decay (adamw) (≥ 0, ≤ 1) |
momentum |
number |
0.9 |
Momentum (sgd) (≥ 0, < 1) |
schedule |
constant or cosine or warmup_cosine |
warmup_cosine |
|
warmup_epochs |
number |
1.0 |
Linear warm-up (warmup_cosine) (≥ 0, ≤ 100) |
grad_clip |
number (optional) |
1.0 |
Clip the global gradient norm |
label_smoothing |
number |
0.0 |
Classification only (≥ 0, < 1) |
val_fraction |
number |
0.1 |
Stratified share of the training rows for validation (≥ 0, < 0.9) |
val_split_value |
string (optional) |
val |
Rows whose split coord equals this value are the validation set |
early_stopping |
EarlyStopping (optional) |
– |
|
log_every_steps |
integer (optional) |
null |
Steps between logged training metrics (default: <= 1000 points) |
eval_every_epochs |
integer |
1 |
Epochs between validation passes (≥ 1) |
media_every_epochs |
integer (optional) |
null |
Epochs between logged images (default: at most 20 times) |
max_steps |
integer (optional) |
null |
Stop after this many gradient steps |
UncertaintyConfig
How a trained network gives draws (chain=1, draw).
| Field |
Type |
Default |
Description |
method |
laplace or mc_dropout or none |
laplace |
laplace: last-layer Laplace; mc_dropout: dropout at score; none: one draw |
draws |
integer (optional) |
null |
Draws per prediction (default: fit draws, else 100) |
hessian |
auto or full or diag |
auto |
auto: full when (features + 1) x outputs <= 2048 |
max_rows |
integer |
20000 |
Training rows used for the Laplace Hessian (≥ 10) |
prior_precision |
number (optional) |
null |
None: maximise the Laplace evidence on a grid 1e-4..1e4 |
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"target_dtype": {
"type": "string",
"enum": [
"float64",
"str",
"int64"
],
"default": "float64"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "{target_dtype}",
"role": "target",
"missing": "allow"
}
}
}
}
mmm.bayesian
mmm-framework's Bayesian marketing-mix model: adstock and saturation per channel, trend and seasonality, national or hierarchical over geos and products, channel effects stated as returns on spend, business priors and lift tests as calibration, budget optimisation with mmm-framework planning.
|
|
| Version |
1.1.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
additive |
| Decision objective |
yes |
| Fast scoring |
– |
| Owns |
carryover, inverse_units, scaling |
| LOO |
valid |
| Default plots |
core.ppc_fan, core.convergence, core.energy, core.posterior_forest, core.prior_posterior, mmm.decomposition, mmm.waterfall, mmm.response_curves, mmm.marginal_cost, mmm.roi, mmm.spend_effect, mmm.adstock, mmm.lift_tests, mmm.effectiveness |
| Resources |
class M (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(time) |
of y |
Expected (or predictive) KPI over the panel dims and time |
contributions |
(component, time) |
of y |
Every channel, the baseline, trend, seasonality and each control; they sum to y_hat |
Derived quantities (outputs.derived)
| Name |
Dims |
Units |
Cached |
Description |
contributions |
(sample, channel, time) |
target |
fit |
Channel, baseline, trend, seasonality and control contributions over the fit window per thinned draw (panel dims included) |
response_curves |
(sample, channel, multiplier) |
target |
fit |
Total contribution per spend multiplier and channel (and geo) per thinned draw (Guided-mode slider grids, budget optimisation) |
marginal_cost |
(sample, channel) |
spend per target |
fit |
Extra spend per extra unit of the KPI at current spend |
adstock |
(sample, channel, lag) |
share |
fit |
Share of a unit of spend's total effect that lands each number of periods after the spend, per thinned draw (carry-over shape) |
effectiveness |
(sample, channel, time) |
target per spend |
fit |
KPI per unit of spend at the average spend level with the channel effect of each period (changes over time only for time-varying channels) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
adstock |
AdstockSettings |
{"kind": "geometric", "l_max": 8, "normalize": true} |
basic |
|
saturation |
SaturationSettings |
{"kind": "logistic"} |
basic |
|
channels |
map of ChannelSettings |
– |
advanced |
Per-channel adstock/saturation overrides (channel label -> settings) |
trend |
TrendSettings |
{"kind": "linear", "n_changepoints": 10, "changepoint_range… |
basic |
|
seasonality |
SeasonalitySettings |
{"yearly_order": 2, "monthly_order": null, "weekly_order": … |
basic |
|
hierarchy |
HierarchySettings |
{"pool_over": [], "media_by_geo": false, "media_geo_sigma":… |
basic |
|
controls |
list of string (optional) |
null |
advanced |
Control variables (default: every other numeric variable over time) |
frequency |
W or D or M (optional) |
null |
advanced |
Data frequency: W (weekly), D (daily) or M (monthly); default: read from the time labels |
new_levels |
pooled or hyperprior or zero or error |
pooled |
advanced |
How a geo or product unseen at fit is scored: pooled (the overall level and average channel effects), hyperprior (a level drawn from the fitted spread, so its range is wider), zero (no channel effects) or error (refuse) |
grid |
GridSettings |
{"max_multiplier": 2.5, "points": 26, "marginal_step": 0.01} |
advanced |
|
media_prior |
roi or coefficient |
roi |
advanced |
Parameterise channel effects by their return on spend (priors are stated in ROI, comparable across channels) or by a standardised coefficient |
priors |
PriorSettings |
{"roi": {}, "roi_default": null, "intercept": null} |
advanced |
Prior overrides (written by business-prior translation) |
likelihood |
normal or student_t or poisson or negative_binomial or beta |
normal |
advanced |
Observation model of the KPI: normal, student_t (heavy-tailed outliers), poisson or negative_binomial (counts, log link) or beta (shares between 0 and 1, logit link) |
media_effect_sigma |
number |
0.5 |
advanced |
Count and share likelihoods only: prior scale (half-normal) of a channel's largest effect on the link scale (> 0, ≤ 5) |
time_varying |
TimeVaryingSettings |
{"channels": [], "innovation_sigma": 0.15, "forecast": "ran… |
advanced |
Channels whose effect changes over time |
Nested settings types
AdstockSettings
Carry-over of spend into later periods (mmm-framework AdstockConfig).
| Field |
Type |
Default |
Description |
kind |
geometric or delayed or weibull or none |
geometric |
geometric: decays from the spend period; delayed: peaks a few periods later; weibull: a flexible shape; none: no carry-over |
l_max |
integer |
8 |
How many periods an effect can last (the kernel length) (≥ 1, ≤ 52) |
normalize |
boolean |
true |
Normalise the lag weights to sum to one (the effect size stays in the channel coefficient) |
ChannelSettings
Per-channel overrides of the shared adstock and saturation settings.
GridSettings
Response-curve grids cached per thinned draw (Guided-mode sliders, optimisation).
| Field |
Type |
Default |
Description |
max_multiplier |
number |
2.5 |
Largest spend multiplier on the grid (1 = spend over the fit window, which the grid always holds) (≥ 1, ≤ 20) |
points |
integer |
26 |
Grid points from 0 to max_multiplier (plus 1, today's spend, when the spacing skips it) (≥ 3, ≤ 201) |
marginal_step |
number |
0.01 |
Relative spend change used for marginal cost (central difference) (> 0, ≤ 0.25) |
HierarchySettings
Panel structure: the dims the KPI varies over besides time. pool_over lists the panel dims of the data (geo and/or product). Every level gets its own baseline, partially pooled towards the overall level (HierarchicalConfig.pool_across_geo/product); with media_by_geo each geo also gets its own channel effects, partially pooled across geos.
| Field |
Type |
Default |
Description |
pool_over |
list of geo or product |
– |
Panel dims of the data (geo, product); empty for one national series (max items 2) |
media_by_geo |
boolean |
false |
Let channel effects differ by geo (partially pooled) |
media_geo_sigma |
number |
0.3 |
Prior sd of the geo deviations of log channel effects (> 0, ≤ 5) |
NormalPrior
Normal(mu, sigma) on the standardised KPI scale (KPI standard deviations).
| Field |
Type |
Default |
Description |
mu |
number |
required |
≥ -50, ≤ 50 |
sigma |
number |
required |
> 0, ≤ 50 |
PriorSettings
Prior overrides; business-prior translation (translate_priors) writes them. * roi - per channel, a log-normal prior on the return on spend (mmm-framework's ROI-parameterised channel effect, roi_prior_mu/roi_prior_sigma); * roi_default - the log-normal ROI prior of channels not listed (default LogNormal(0, 1): median break-even); * intercept - the baseline level in KPI standard deviations from the mean.
| Field |
Type |
Default |
Description |
roi |
map of RoiPrior |
– |
Per-channel log-normal ROI priors (channel label -> {mu, sigma}) |
roi_default |
RoiPrior (optional) |
null |
|
intercept |
NormalPrior (optional) |
null |
|
RoiPrior
A log-normal prior on a channel's return on spend (KPI per unit of spend over the fit window): roi ~ LogNormal(mu, sigma), so exp(mu) is the median ROI.
| Field |
Type |
Default |
Description |
mu |
number |
required |
Log of the median ROI (≥ -20, ≤ 20) |
sigma |
number |
required |
Spread on the log scale (> 0, ≤ 10) |
SaturationSettings
Diminishing returns of (carried-over) spend (mmm-framework SaturationConfig).
| Field |
Type |
Default |
Description |
kind |
logistic or hill or michaelis_menten or tanh or root or none |
logistic |
logistic (default, most stable), hill (S-shaped), michaelis_menten, tanh, root (power curve) or none (a straight line) |
SeasonalitySettings
Fourier seasonality (mmm-framework SeasonalityConfig).
| Field |
Type |
Default |
Description |
yearly_order |
integer (optional) |
2 |
Fourier pairs of the yearly cycle (0 or null: none) |
monthly_order |
integer (optional) |
null |
|
weekly_order |
integer (optional) |
null |
Daily data only |
prior_sigma |
number |
0.3 |
Prior sd of each Fourier coefficient, in KPI standard deviations (raise it for strongly seasonal categories) (> 0, ≤ 5) |
TimeVaryingSettings
Channels whose effect drifts over time (mmm-framework's time-varying coefficient: a random walk on the log of the channel coefficient, one step per period).
| Field |
Type |
Default |
Description |
channels |
list of string |
– |
Channels whose effect may change over time (creative wear-out, changes in the market) (max items 64) |
innovation_sigma |
number |
0.15 |
Prior scale of the change in the log effect from one period to the next (smaller: closer to a constant effect) (> 0, ≤ 2) |
forecast |
random_walk or hold_last or mean |
random_walk |
The effect after the fit window: random_walk (continue the random walk, so the range widens with the horizon), hold_last (the last fitted value) or mean (the average over the fit window) |
TrendSettings
The slow-moving baseline (mmm-framework TrendConfig).
| Field |
Type |
Default |
Description |
kind |
none or linear or piecewise or spline or gp |
linear |
none, linear (default), piecewise (Prophet-style changepoints), spline or gp (a smooth Gaussian-process curve). Forecasts hold flexible trends at their last fitted level; a linear trend is extrapolated. |
n_changepoints |
integer |
10 |
≥ 1, ≤ 50 |
changepoint_range |
number |
0.8 |
> 0, ≤ 1 |
n_knots |
integer |
10 |
≥ 3, ≤ 50 |
growth_prior_sigma |
number |
0.5 |
Prior sd of the linear slope, in KPI standard deviations over the whole history (> 0, ≤ 10) |
Input data contract (schema template)
{
"params": {
"panel": {
"type": "string_list",
"path": "hierarchy.pool_over",
"default": []
},
"strategy": {
"type": "string",
"path": "new_levels",
"enum": [
"pooled",
"hyperprior",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"time": {
"kind": "time",
"policy": "extend"
},
"channel": {
"kind": "categorical",
"policy": "fixed"
},
"{*panel as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{strategy}"
}
},
"vars": {
"y": {
"dims": [
"{*panel}",
"time"
],
"dtype": "float64",
"role": "target"
},
"spend": {
"dims": [
"{*panel}",
"channel",
"time"
],
"dtype": "float64",
"role": "spend",
"future_required": true
}
}
},
"cases": [
{
"when": {
"strategy": "error"
},
"merge": {
"dims": {
"{*panel as d}": {
"policy": "fixed"
}
}
}
}
]
}
mmm.frequentist
mmm-framework's fast frequentist marketing-mix model: adstock and saturation chosen by an out-of-sample search, a ridge solve with non-negative channel effects and bootstrap intervals; seconds instead of minutes.
|
|
| Version |
1.0.0 |
| Inference |
bootstrap |
| Representation |
draws |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
additive |
| Decision objective |
yes |
| Fast scoring |
– |
| Owns |
carryover, inverse_units, scaling |
| LOO |
invalid: bootstrap replicates are not posterior draws |
| Default plots |
core.ppc_fan, mmm.decomposition, mmm.response_curves, mmm.marginal_cost |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(time) |
of y |
Expected (or predictive) KPI over the panel dims and time |
contributions |
(component, time) |
of y |
Every channel, the baseline, trend, seasonality and each control; they sum to y_hat |
Derived quantities (outputs.derived)
| Name |
Dims |
Units |
Cached |
Description |
contributions |
(sample, channel, time) |
target |
fit |
Channel, baseline, trend, seasonality and control contributions over the fit window per thinned draw (panel dims included) |
response_curves |
(sample, channel, multiplier) |
target |
fit |
Total contribution per spend multiplier and channel (and geo) per thinned draw (Guided-mode slider grids, budget optimisation) |
marginal_cost |
(sample, channel) |
spend per target |
fit |
Extra spend per extra unit of the KPI at current spend |
adstock |
(sample, channel, lag) |
share |
fit |
Share of a unit of spend's total effect that lands each number of periods after the spend, per thinned draw (carry-over shape) |
effectiveness |
(sample, channel, time) |
target per spend |
fit |
KPI per unit of spend at the average spend level with the channel effect of each period (changes over time only for time-varying channels) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
adstock |
AdstockSettings |
{"kind": "geometric", "l_max": 8, "normalize": true} |
basic |
|
saturation |
SaturationSettings |
{"kind": "logistic"} |
basic |
|
channels |
map of ChannelSettings |
– |
advanced |
Per-channel adstock/saturation overrides (channel label -> settings) |
trend |
TrendSettings |
{"kind": "linear", "n_changepoints": 10, "changepoint_range… |
basic |
|
seasonality |
SeasonalitySettings |
{"yearly_order": 2, "monthly_order": null, "weekly_order": … |
basic |
|
hierarchy |
HierarchySettings |
{"pool_over": [], "media_by_geo": false, "media_geo_sigma":… |
basic |
|
controls |
list of string (optional) |
null |
advanced |
Control variables (default: every other numeric variable over time) |
frequency |
W or D or M (optional) |
null |
advanced |
Data frequency: W (weekly), D (daily) or M (monthly); default: read from the time labels |
new_levels |
pooled or hyperprior or zero or error |
pooled |
advanced |
How a geo or product unseen at fit is scored: pooled (the overall level and average channel effects), hyperprior (a level drawn from the fitted spread, so its range is wider), zero (no channel effects) or error (refuse) |
grid |
GridSettings |
{"max_multiplier": 2.5, "points": 26, "marginal_step": 0.01} |
advanced |
|
estimator |
ridge or constrained |
ridge |
advanced |
ridge (closed form, non-negative channel effects) or constrained (a convex program; needs the optional cvxpy dependency) |
bootstrap |
integer |
200 |
basic |
Bootstrap replicates (the 'draws' of every output) (≥ 20, ≤ 5000) |
search_budget |
integer |
200 |
advanced |
Adstock/saturation candidates evaluated by the transform search (≥ 10, ≤ 5000) |
ridge_alpha |
number |
1.0 |
advanced |
Fallback L2 penalty on the standardised design (> 0, ≤ 1000000.0) |
Nested settings types
AdstockSettings
Carry-over of spend into later periods (mmm-framework AdstockConfig).
| Field |
Type |
Default |
Description |
kind |
geometric or delayed or weibull or none |
geometric |
geometric: decays from the spend period; delayed: peaks a few periods later; weibull: a flexible shape; none: no carry-over |
l_max |
integer |
8 |
How many periods an effect can last (the kernel length) (≥ 1, ≤ 52) |
normalize |
boolean |
true |
Normalise the lag weights to sum to one (the effect size stays in the channel coefficient) |
ChannelSettings
Per-channel overrides of the shared adstock and saturation settings.
GridSettings
Response-curve grids cached per thinned draw (Guided-mode sliders, optimisation).
| Field |
Type |
Default |
Description |
max_multiplier |
number |
2.5 |
Largest spend multiplier on the grid (1 = spend over the fit window, which the grid always holds) (≥ 1, ≤ 20) |
points |
integer |
26 |
Grid points from 0 to max_multiplier (plus 1, today's spend, when the spacing skips it) (≥ 3, ≤ 201) |
marginal_step |
number |
0.01 |
Relative spend change used for marginal cost (central difference) (> 0, ≤ 0.25) |
HierarchySettings
Panel structure: the dims the KPI varies over besides time. pool_over lists the panel dims of the data (geo and/or product). Every level gets its own baseline, partially pooled towards the overall level (HierarchicalConfig.pool_across_geo/product); with media_by_geo each geo also gets its own channel effects, partially pooled across geos.
| Field |
Type |
Default |
Description |
pool_over |
list of geo or product |
– |
Panel dims of the data (geo, product); empty for one national series (max items 2) |
media_by_geo |
boolean |
false |
Let channel effects differ by geo (partially pooled) |
media_geo_sigma |
number |
0.3 |
Prior sd of the geo deviations of log channel effects (> 0, ≤ 5) |
SaturationSettings
Diminishing returns of (carried-over) spend (mmm-framework SaturationConfig).
| Field |
Type |
Default |
Description |
kind |
logistic or hill or michaelis_menten or tanh or root or none |
logistic |
logistic (default, most stable), hill (S-shaped), michaelis_menten, tanh, root (power curve) or none (a straight line) |
SeasonalitySettings
Fourier seasonality (mmm-framework SeasonalityConfig).
| Field |
Type |
Default |
Description |
yearly_order |
integer (optional) |
2 |
Fourier pairs of the yearly cycle (0 or null: none) |
monthly_order |
integer (optional) |
null |
|
weekly_order |
integer (optional) |
null |
Daily data only |
prior_sigma |
number |
0.3 |
Prior sd of each Fourier coefficient, in KPI standard deviations (raise it for strongly seasonal categories) (> 0, ≤ 5) |
TrendSettings
The slow-moving baseline (mmm-framework TrendConfig).
| Field |
Type |
Default |
Description |
kind |
none or linear or piecewise or spline or gp |
linear |
none, linear (default), piecewise (Prophet-style changepoints), spline or gp (a smooth Gaussian-process curve). Forecasts hold flexible trends at their last fitted level; a linear trend is extrapolated. |
n_changepoints |
integer |
10 |
≥ 1, ≤ 50 |
changepoint_range |
number |
0.8 |
> 0, ≤ 1 |
n_knots |
integer |
10 |
≥ 3, ≤ 50 |
growth_prior_sigma |
number |
0.5 |
Prior sd of the linear slope, in KPI standard deviations over the whole history (> 0, ≤ 10) |
Input data contract (schema template)
{
"params": {
"panel": {
"type": "string_list",
"path": "hierarchy.pool_over",
"default": []
},
"strategy": {
"type": "string",
"path": "new_levels",
"enum": [
"pooled",
"hyperprior",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"time": {
"kind": "time",
"policy": "extend"
},
"channel": {
"kind": "categorical",
"policy": "fixed"
},
"{*panel as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{strategy}"
}
},
"vars": {
"y": {
"dims": [
"{*panel}",
"time"
],
"dtype": "float64",
"role": "target"
},
"spend": {
"dims": [
"{*panel}",
"channel",
"time"
],
"dtype": "float64",
"role": "spend",
"future_required": true
}
}
},
"cases": [
{
"when": {
"strategy": "error"
},
"merge": {
"dims": {
"{*panel as d}": {
"policy": "fixed"
}
}
}
}
]
}
mmm.multivariate
mmm-framework's multivariate marketing-mix model: one national spend series per channel drives two or more outcomes, with correlated residuals and cross-effects between outcomes (cannibalization, halo); budgets are optimised on the weighted total of the outcomes.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
additive |
| Decision objective |
yes |
| Fast scoring |
– |
| Owns |
carryover, inverse_units, scaling |
| LOO |
valid |
| Default plots |
core.ppc_fan, core.convergence, core.energy, core.prior_posterior, mmm.decomposition, mmm.waterfall, mmm.response_curves, mmm.roi, mmm.spend_effect, mmm.adstock, mmm.cross_effects |
| Resources |
class M (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(time) |
of y |
Expected (or predictive) value of every outcome over time |
contributions |
(component, time) |
of y |
Every channel, the baseline, trend and seasonality per outcome, with cross-effects passed through; they sum to y_hat |
Derived quantities (outputs.derived)
| Name |
Dims |
Units |
Cached |
Description |
contributions |
(sample, channel, outcome, time) |
target |
fit |
Channel, baseline, trend and seasonality contributions per outcome over the fit window per thinned draw |
response_curves |
(sample, channel, multiplier) |
target |
fit |
Weighted total of the outcomes per spend multiplier and channel per thinned draw, plus the curves per outcome |
marginal_cost |
(sample, channel) |
spend per target |
fit |
Extra spend per extra unit of the weighted outcome total at current spend |
adstock |
(sample, channel, lag) |
– |
fit |
Share of a unit of spend's effect that lands each period later |
cross_effects |
(sample, pair) |
target per target |
fit |
Effect of one outcome on another (target units per unit of source) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
trend |
TrendSettings |
{"kind": "linear", "n_changepoints": 10, "changepoint_range… |
basic |
|
seasonality |
SeasonalitySettings |
{"yearly_order": 2, "monthly_order": null, "weekly_order": … |
basic |
|
frequency |
W or D or M (optional) |
null |
advanced |
Data frequency: W (weekly), D (daily) or M (monthly); default: read from the time labels |
grid |
GridSettings |
{"max_multiplier": 2.5, "points": 26, "marginal_step": 0.01} |
advanced |
|
likelihood |
normal or student_t |
normal |
advanced |
Observation noise: normal, or student_t for heavy-tailed outliers |
outcomes |
list of OutcomeSettings |
– |
basic |
Settings per outcome; empty: every outcome of the data, with defaults (max items 8) |
primary_outcome |
string (optional) |
null |
basic |
The outcome reports show first (default: the first outcome) |
cross_effects |
list of CrossEffectSettings |
– |
basic |
Effects of one outcome on another (max items 28) |
lkj_eta |
number |
2.0 |
advanced |
LKJ concentration of the residual correlation (larger: closer to none) (> 0, ≤ 50) |
share_adstock |
boolean |
true |
advanced |
One carry-over rate for every channel |
share_trend |
boolean |
false |
advanced |
One trend for every outcome |
share_seasonality |
boolean |
true |
advanced |
One seasonal pattern for every outcome |
Nested settings types
CrossEffectSettings
An effect of one outcome on another (mmm-framework CrossEffectConfig).
| Field |
Type |
Default |
Description |
source |
string |
required |
|
target |
string |
required |
|
kind |
unconstrained or cannibalization or halo |
unconstrained |
unconstrained (the data picks the sign), cannibalization (the source takes sales from the target) or halo (the source adds sales to the target) |
prior_sigma |
number |
0.3 |
Prior sd of the effect (target units per unit of source) (> 0, ≤ 5) |
GridSettings
Response-curve grids cached per thinned draw (Guided-mode sliders, optimisation).
| Field |
Type |
Default |
Description |
max_multiplier |
number |
2.5 |
Largest spend multiplier on the grid (1 = spend over the fit window, which the grid always holds) (≥ 1, ≤ 20) |
points |
integer |
26 |
Grid points from 0 to max_multiplier (plus 1, today's spend, when the spacing skips it) (≥ 3, ≤ 201) |
marginal_step |
number |
0.01 |
Relative spend change used for marginal cost (central difference) (> 0, ≤ 0.25) |
OutcomeSettings
One outcome (a label of the data's outcome dim) and its priors.
| Field |
Type |
Default |
Description |
name |
string |
required |
A label of the data's outcome dim |
weight |
number |
1.0 |
Value of one unit of this outcome in the budget objective (the plans and response curves use the weighted total of the outcomes) (≥ 0, ≤ 1000000.0) |
include_trend |
boolean |
true |
|
include_seasonality |
boolean |
true |
|
intercept_sigma |
number |
2.0 |
Prior sd of the baseline level, in outcome standard deviations (> 0, ≤ 20) |
media_sigma |
number |
0.5 |
Prior sd of each channel effect, in outcome standard deviations (> 0, ≤ 10) |
SeasonalitySettings
Fourier seasonality (mmm-framework SeasonalityConfig).
| Field |
Type |
Default |
Description |
yearly_order |
integer (optional) |
2 |
Fourier pairs of the yearly cycle (0 or null: none) |
monthly_order |
integer (optional) |
null |
|
weekly_order |
integer (optional) |
null |
Daily data only |
prior_sigma |
number |
0.3 |
Prior sd of each Fourier coefficient, in KPI standard deviations (raise it for strongly seasonal categories) (> 0, ≤ 5) |
TrendSettings
The slow-moving baseline (mmm-framework TrendConfig).
| Field |
Type |
Default |
Description |
kind |
none or linear or piecewise or spline or gp |
linear |
none, linear (default), piecewise (Prophet-style changepoints), spline or gp (a smooth Gaussian-process curve). Forecasts hold flexible trends at their last fitted level; a linear trend is extrapolated. |
n_changepoints |
integer |
10 |
≥ 1, ≤ 50 |
changepoint_range |
number |
0.8 |
> 0, ≤ 1 |
n_knots |
integer |
10 |
≥ 3, ≤ 50 |
growth_prior_sigma |
number |
0.5 |
Prior sd of the linear slope, in KPI standard deviations over the whole history (> 0, ≤ 10) |
Input data contract (schema template)
{
"template": {
"dims": {
"time": {
"kind": "time",
"policy": "extend"
},
"channel": {
"kind": "categorical",
"policy": "fixed"
},
"outcome": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"outcome",
"time"
],
"dtype": "float64",
"role": "target"
},
"spend": {
"dims": [
"channel",
"time"
],
"dtype": "float64",
"role": "spend",
"future_required": true
}
}
}
}
mmm.nested
mmm-framework's nested marketing-mix model: channels move mediators (visits, awareness, measured in some periods or latent) that move the KPI, plus direct channel effects; one national series, trend and seasonality, lift tests as calibration, budget optimisation.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
additive |
| Decision objective |
yes |
| Fast scoring |
– |
| Owns |
carryover, inverse_units, scaling |
| LOO |
valid |
| Default plots |
core.ppc_fan, core.convergence, core.energy, core.prior_posterior, mmm.decomposition, mmm.waterfall, mmm.response_curves, mmm.roi, mmm.spend_effect, mmm.adstock, mmm.mediation, mmm.lift_tests |
| Resources |
class M (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(time) |
of y |
Expected (or predictive) KPI over time |
contributions |
(component, time) |
of y |
Every channel's total effect (through the mediators and direct), the baseline, trend and seasonality; they sum to y_hat |
mediator_hat |
(mediator, time) |
of mediators |
Expected mediators (latent mediators in standard units) |
Derived quantities (outputs.derived)
| Name |
Dims |
Units |
Cached |
Description |
contributions |
(sample, channel, time) |
target |
fit |
Channel, baseline, trend and seasonality contributions over the fit window per thinned draw |
response_curves |
(sample, channel, multiplier) |
target |
fit |
Total contribution per spend multiplier and channel per thinned draw (Guided-mode slider grids, budget optimisation) |
marginal_cost |
(sample, channel) |
spend per target |
fit |
Extra spend per extra unit of the KPI at current spend |
adstock |
(sample, channel, lag) |
– |
fit |
Share of a unit of spend's effect that lands each period later |
mediation |
(sample, channel, mediator) |
target |
fit |
Direct and indirect (through each mediator) effect of each channel over the fit window |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
trend |
TrendSettings |
{"kind": "linear", "n_changepoints": 10, "changepoint_range… |
basic |
|
seasonality |
SeasonalitySettings |
{"yearly_order": 2, "monthly_order": null, "weekly_order": … |
basic |
|
frequency |
W or D or M (optional) |
null |
advanced |
Data frequency: W (weekly), D (daily) or M (monthly); default: read from the time labels |
grid |
GridSettings |
{"max_multiplier": 2.5, "points": 26, "marginal_step": 0.01} |
advanced |
|
likelihood |
normal or student_t |
normal |
advanced |
Observation noise: normal, or student_t for heavy-tailed outliers |
mediators |
list of MediatorSettings |
– |
– |
The mediators (default: every label of the mediator dim, measured, moved by every channel, with direct effects) (max items 8) |
Nested settings types
GridSettings
Response-curve grids cached per thinned draw (Guided-mode sliders, optimisation).
| Field |
Type |
Default |
Description |
max_multiplier |
number |
2.5 |
Largest spend multiplier on the grid (1 = spend over the fit window, which the grid always holds) (≥ 1, ≤ 20) |
points |
integer |
26 |
Grid points from 0 to max_multiplier (plus 1, today's spend, when the spacing skips it) (≥ 3, ≤ 201) |
marginal_step |
number |
0.01 |
Relative spend change used for marginal cost (central difference) (> 0, ≤ 0.25) |
One mediator: a measured (or latent) result that channels move and that moves the KPI (mmm-framework MediatorConfig).
| Field |
Type |
Default |
Description |
name |
string |
required |
A mediator label |
channels |
list of string (optional) |
null |
Channels that move this mediator (default: every channel) |
direct_effect |
boolean |
true |
The channels of this mediator also act on the KPI directly |
latent |
boolean |
false |
The mediator is not measured: its series is ignored (it can be empty) |
media_sign |
positive or none |
positive |
Sign of the channel effects on the mediator |
outcome_sign |
none or positive or negative |
none |
Sign of the mediator's effect on the KPI |
observation_sigma |
number |
0.1 |
Prior scale of the measurement noise, in mediator standard deviations (> 0, ≤ 5) |
SeasonalitySettings
Fourier seasonality (mmm-framework SeasonalityConfig).
| Field |
Type |
Default |
Description |
yearly_order |
integer (optional) |
2 |
Fourier pairs of the yearly cycle (0 or null: none) |
monthly_order |
integer (optional) |
null |
|
weekly_order |
integer (optional) |
null |
Daily data only |
prior_sigma |
number |
0.3 |
Prior sd of each Fourier coefficient, in KPI standard deviations (raise it for strongly seasonal categories) (> 0, ≤ 5) |
TrendSettings
The slow-moving baseline (mmm-framework TrendConfig).
| Field |
Type |
Default |
Description |
kind |
none or linear or piecewise or spline or gp |
linear |
none, linear (default), piecewise (Prophet-style changepoints), spline or gp (a smooth Gaussian-process curve). Forecasts hold flexible trends at their last fitted level; a linear trend is extrapolated. |
n_changepoints |
integer |
10 |
≥ 1, ≤ 50 |
changepoint_range |
number |
0.8 |
> 0, ≤ 1 |
n_knots |
integer |
10 |
≥ 3, ≤ 50 |
growth_prior_sigma |
number |
0.5 |
Prior sd of the linear slope, in KPI standard deviations over the whole history (> 0, ≤ 10) |
Input data contract (schema template)
{
"template": {
"dims": {
"time": {
"kind": "time",
"policy": "extend"
},
"channel": {
"kind": "categorical",
"policy": "fixed"
},
"mediator": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"time"
],
"dtype": "float64",
"role": "target"
},
"spend": {
"dims": [
"channel",
"time"
],
"dtype": "float64",
"role": "spend",
"future_required": true
},
"mediators": {
"dims": [
"mediator",
"time"
],
"dtype": "float64",
"role": "covariate",
"missing": "allow"
}
}
}
}
sci.areal_bym2
Counts of a disease in areas (districts, counties) against their expected counts, with a covariate and area effects that borrow strength from neighbouring areas: an ICAR, a proper CAR, BYM2 (a scaled ICAR mixed with independent noise) or iid effects. Outputs the smoothed relative risk of each area, the probability that it is above 1, and the expected counts. The polygons and the graph go into the bundle for the maps.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, sci.area_map, net.graph, core.ridge |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
cases |
(area) |
of cases |
Cases in each area: the expected count expected * rr, or a Poisson draw |
rr |
(area) |
1 |
Relative risk of each area (1 = the reference rate) |
p_exceed |
(area) |
probability |
1 when rr is above exceed_threshold in a draw, else 0: the mean over draws is the probability P(rr > threshold) |
effect |
(area) |
1 |
The area effect u on the log relative risk (what the covariate does not explain) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
kind |
poisson or iid or icar or car or bym2 |
bym2 |
– |
Prior of the area effects: poisson (none), iid, icar, car (proper CAR) or bym2 (ICAR plus iid with a mixing share rho) (x-ui-level: basic) |
islands |
link_nearest or isolate or error |
link_nearest |
– |
Areas without neighbours: link_nearest links each to the area with the closest boundary; isolate keeps them alone (iid and icar only); error stops (x-ui-level: basic) |
covariate_scale |
number |
10.0 |
– |
Divide the centred covariate by this (b1 is the effect of one unit) (> 0) |
center_covariate |
boolean |
true |
– |
Subtract the mean of the covariate |
intercept_sd |
number |
1.0 |
– |
Prior sd of the intercept b0 (> 0) |
slope_sd |
number |
1.0 |
– |
Prior sd of the covariate effect b1 (> 0) |
sigma_scale |
number |
1.0 |
– |
Half-normal scale of sigma, the sd of the area effects (> 0) |
rho_alpha |
number |
1.0 |
– |
Beta prior of rho (bym2): first shape (> 0) |
rho_beta |
number |
1.0 |
– |
Beta prior of rho (bym2): second shape (> 0) |
exceed_threshold |
number |
1.0 |
– |
p_exceed is the probability that rr is above this value (> 0) |
Input data contract (schema template)
{
"template": {
"dims": {
"area": {
"kind": "categorical",
"policy": "fixed",
"description": "The areas (districts, counties): the nodes of the graph"
},
"area_": {
"kind": "categorical",
"policy": "fixed",
"description": "The same areas, as the second axis of the adjacency matrix"
},
"vertex": {
"kind": "integer",
"policy": "fixed",
"description": "Vertices of the polygon outlines (NaN padded)"
}
},
"vars": {
"cases": {
"dims": [
"area"
],
"dtype": "float64",
"role": "target",
"units": "cases",
"missing": "allow",
"bounds": [
0,
null
]
},
"expected": {
"dims": [
"area"
],
"dtype": "float64",
"role": "exposure",
"units": "cases",
"bounds": [
0,
null
]
},
"covariate": {
"dims": [
"area"
],
"dtype": "float64",
"role": "covariate"
},
"adjacency": {
"dims": [
"area",
"area_"
],
"dtype": "int64",
"role": "constant",
"bounds": [
0,
1
]
},
"ring_x": {
"dims": [
"area",
"vertex"
],
"dtype": "float64",
"role": "constant",
"missing": "allow"
},
"ring_y": {
"dims": [
"area",
"vertex"
],
"dtype": "float64",
"role": "constant",
"missing": "allow"
}
}
}
}
sci.circular_regression
Angles (wind directions, times of day) on the circle. Regression kinds put the hour of day and the day of year into harmonic features and use a von Mises with a canonical link (or a projected normal, or a mixture of two regimes with a gate); kind activity fits a log-Fourier density per group (camera-trap times) with activity levels and overlaps. Outputs are mean directions, resultant lengths and predictive densities by block of the day or by group.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, sci.rose, sci.profile_bands, sci.field_map |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
direction_hat |
(obs) |
of direction |
Mean direction of the row's predictive distribution (expected), or a simulated angle (predictive), from 0 to one turn |
resultant |
(obs) |
1 |
Mean resultant length of the row's predictive distribution (1: one direction, 0: no preferred direction) |
density |
(frame, angle) |
1/unit |
Predictive density per unit of the direction on a grid of angles, for each block of the day (regression) or group (activity) |
mean_direction |
(frame) |
of direction |
Direction of the mean resultant vector of each frame |
resultant_length |
(frame) |
1 |
Length of the mean resultant vector of each frame |
activity_level |
(frame) |
1 |
kind activity: fraction of the day the group is active, 1 / (2 pi max f) |
overlap |
(frame, frame_) |
1 |
kind activity: coefficient of overlap of the activity densities of two groups |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
kind |
von_mises or projected_normal or regime_mixture or activity |
von_mises |
– |
von_mises (canonical link), projected_normal, regime_mixture (two von Mises regimes with a gate), or activity (a log-Fourier density per group) (x-ui-level: basic) |
units |
degrees or radians or hours |
degrees |
– |
Units of the direction: degrees, radians or hours (a time of day) (x-ui-level: basic) |
group_dim |
string |
group |
– |
kind activity: the dim of the groups (species); the index variable is _idx |
daily_harmonics |
integer |
3 |
– |
Harmonics of the hour of day (≥ 0, ≤ 8) |
annual_harmonics |
integer |
2 |
– |
Harmonics of the day of year (≥ 0, ≤ 6) |
interaction_harmonics |
integer |
2 |
– |
Daily harmonics multiplied by the first annual harmonic (the daily cycle changes with the season) (≥ 0, ≤ 8) |
intercept_sd |
number |
2.0 |
– |
Prior sd of the intercepts (not used by regime_mixture) (> 0) |
coef_sd |
number |
1.0 |
– |
Prior sd of the other coefficients (> 0) |
regime_directions_deg |
list of number |
– |
– |
regime_mixture: prior mean direction of each regime (degrees, in the units' own orientation) (min items 2, max items 2) |
regime_names |
list of string |
– |
– |
regime_mixture: names of the two regimes (min items 2, max items 2) |
regime_strength |
number |
2.0 |
– |
regime_mixture: prior mean concentration of each regime (> 0) |
regime_daily_harmonics |
integer |
2 |
– |
≥ 0, ≤ 8 |
regime_annual_harmonics |
integer |
1 |
– |
≥ 0, ≤ 6 |
gate_intercept_sd |
number |
1.5 |
– |
Prior sd of the gate intercept (> 0) |
harmonics |
integer |
16 |
– |
activity: Fourier harmonics (≥ 1, ≤ 64) |
tau_sd |
number |
2.0 |
– |
activity: half-normal scale of tau (> 0) |
grid_points |
integer |
256 |
– |
activity: angles of the normalising sum (≥ 32, ≤ 4096) |
frames |
integer |
8 |
– |
Regression kinds: blocks of the day for density and mean_direction (8: three hours each) (≥ 1, ≤ 48) |
angle_points |
integer |
72 |
– |
Angles of the density output (≥ 8, ≤ 720) |
rows_per_frame |
integer |
200 |
– |
Scored rows averaged per frame for the density (≥ 1, ≤ 20000) |
score_draws |
integer |
400 |
– |
Posterior draws kept per score (evenly spaced) (≥ 1, ≤ 20000) |
Input data contract (schema template)
{
"params": {
"kind": {
"type": "string",
"enum": [
"von_mises",
"projected_normal",
"regime_mixture",
"activity"
],
"default": "von_mises"
},
"group_dim": {
"type": "string",
"default": "group"
}
},
"template": {
"layout": "long",
"dims": {
"obs": {
"kind": "integer",
"policy": "extend",
"description": "One row per report or record"
}
},
"vars": {
"direction": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "target"
}
}
},
"cases": [
{
"when": {
"kind": "projected_normal"
},
"merge": {
"vars": {
"hour": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "covariate",
"units": "h",
"bounds": [
0,
24
]
},
"day": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "covariate",
"units": "d",
"bounds": [
0,
367
]
}
}
}
},
{
"when": {
"kind": "regime_mixture"
},
"merge": {
"vars": {
"hour": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "covariate",
"units": "h",
"bounds": [
0,
24
]
},
"day": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "covariate",
"units": "d",
"bounds": [
0,
367
]
}
}
}
},
{
"when": {
"kind": "von_mises"
},
"merge": {
"vars": {
"hour": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "covariate",
"units": "h",
"bounds": [
0,
24
]
},
"day": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "covariate",
"units": "d",
"bounds": [
0,
367
]
}
}
}
},
{
"when": {
"kind": "activity"
},
"merge": {
"dims": {
"{group_dim}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"{group_dim}_idx": {
"dims": [
"obs"
],
"dtype": "int64",
"role": "index",
"index_of": "{group_dim}"
}
}
}
}
]
}
sci.cmb_field
Field-level inference of a masked CMB temperature map: every pixel of the sky on a periodic flat patch is sampled jointly with the bandpowers by a Wandelt-Eriksen Gibbs sampler (constrained realisations by preconditioned conjugate gradients, an inverse-gamma bandpower step and a rescaling move). Gives the Wiener-filtered map, sky draws behind the mask, a per-pixel sd and the bandpowers.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: every pixel depends on one latent sky field with tens of thousands of parameters, so pointwise leave-one-out is not defined; compare variants by their bandpowers, amplitude and tilt |
| Default plots |
core.convergence, sci.power_spectrum, sci.field_map, sci.image_residuals, sci.ppc_image_grid |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
sky |
(row, col) |
uK |
Posterior draws of the beamed sky (constrained realisations; unconstrained skies with the posterior spectrum for simulate) |
temperature_hat |
(row, col) |
of temperature |
The sky draw (expected), plus noise with noise_sd (predictive) |
bandpower |
(bin) |
uK^2 |
Bandpower D_ell of each bin |
bandpower_ratio |
(bin) |
1 |
Bandpower over the reference bandpower, exp(q) |
log_amplitude |
() |
1 |
Log amplitude of the bandpowers relative to the reference |
tilt |
() |
1 |
Tilt of the bandpowers relative to the reference, at tilt_pivot |
Derived quantities (outputs.derived)
| Name |
Dims |
Units |
Cached |
Description |
sky_moments |
(stat, row, col) |
uK |
fit |
Posterior mean (the Wiener filter averaged over the spectrum) and sd of each pixel over every kept Gibbs draw |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
pixel_arcmin |
number |
7.5 |
– |
Side of a map pixel (arcmin) (x-ui-level: basic) (> 0, ≤ 600) |
beam_fwhm_arcmin |
number |
5.0 |
– |
FWHM of the Gaussian beam of the map (arcmin) (≥ 0, ≤ 600) |
pixel_subsamples |
integer |
8 |
– |
Point samples per pixel side that the map pixels average (box window; 1 = none) (≥ 1, ≤ 64) |
pixel_window |
boolean |
false |
– |
The data has a pixel_window(multipole) variable (for example the HEALPix window of the source map) |
bin_edges |
list of number |
– |
– |
Multipole edges of the bandpower bins (x-ui-level: basic) (min items 2, max items 101) |
projection |
gnomonic or flat |
gnomonic |
– |
gnomonic: correct the multipoles for the mean stretch of a tangent-plane projection; flat: no correction (x-ui-level: basic) |
border |
integer |
8 |
– |
Unobserved pixels around the raster on the periodic torus (≥ 0, ≤ 128) |
ell_dense |
number |
300.0 |
– |
Modes below this multipole get the dense CG preconditioner (≥ 0) |
n_alias |
integer |
3 |
– |
Aliased replicas folded into the prior power (≥ 0, ≤ 6) |
mean_prior_sd |
number |
100.0 |
– |
Prior sd of the patch mean (uK) (> 0) |
cg_tol |
number |
1e-05 |
– |
Relative residual that stops CG (> 0, ≤ 0.1) |
cg_max_iter |
integer |
5000 |
– |
Most CG iterations per solve (≥ 10, ≤ 100000) |
rescale |
boolean |
true |
– |
Use the non-centred rescaling move |
q_init_sd |
number |
0.3 |
– |
Sd of the dispersed chain starts (≥ 0, ≤ 3) |
tilt_pivot |
number |
500.0 |
– |
Pivot multipole of the tilt (> 0) |
tilt_max_ell |
number |
1450.0 |
– |
Bins with a centre at or above this are left out of the tilt (> 0) |
tilt_prior_sd |
number |
0.5 |
– |
Prior sd of log amplitude and tilt (> 0) |
field_draws |
integer |
40 |
– |
Sky maps drawn per score (over all chains) (≥ 1, ≤ 1000) |
Input data contract (schema template)
{
"params": {
"pixel_window": {
"type": "boolean",
"default": false
}
},
"template": {
"dims": {
"row": {
"kind": "integer",
"policy": "fixed",
"description": "Map rows (bottom up)"
},
"col": {
"kind": "integer",
"policy": "fixed",
"description": "Map columns"
},
"multipole": {
"kind": "integer",
"policy": "fixed",
"description": "Multipole ell = 0, 1, 2, ... of the reference spectrum"
}
},
"vars": {
"temperature": {
"dims": [
"row",
"col"
],
"dtype": "float64",
"role": "target",
"missing": "allow",
"description": "CMB temperature of each pixel (uK); NaN where masked"
},
"noise_sd": {
"dims": [
"row",
"col"
],
"dtype": "float64",
"role": "weight",
"description": "Noise sd of each pixel (uK)"
},
"reference_dl": {
"dims": [
"multipole"
],
"dtype": "float64",
"role": "constant",
"description": "Reference spectrum D_ell = ell (ell + 1) C_ell / 2 pi (uK^2)"
}
}
},
"cases": [
{
"when": {
"pixel_window": true
},
"merge": {
"vars": {
"pixel_window": {
"dims": [
"multipole"
],
"dtype": "float64",
"role": "constant",
"description": "Pixel window of the source map at each multipole"
}
}
}
}
]
}
sci.colour_naming
Colour naming in one language (World Color Survey): the probability that a speaker gives each term to each colour chip, as a softmax over quadratic CIELAB logits with zero-sum weights, pooled or with speaker-level intercepts and linear weights. Predicts new speakers and maps each term's share of speakers on the chip palette.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, sci.swatches, sci.field_map |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
p_name |
(speaker, chip, term) |
probability |
Probability that the speaker gives the term to the chip (new speakers: fresh effects per draw); predictive: one sampled term per draw |
p_term |
(term, lightness, hue) |
probability |
Share of the language's speakers who give the term to the chip, on the palette grid (cells without a chip: empty in the posterior, 0 in scores) |
mode_term_rgb |
(chip, rgb) |
sRGB |
Each chip in the display colour of its most probable term in the draw (the posterised map) |
p_top |
(chip) |
probability |
Share of speakers who give the chip the term that is most probable on average |
k_eff_speaker |
() |
categories |
Effective number of categories of one speaker |
k_eff_language |
() |
categories |
Effective number of categories of the language (all speakers) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
kind |
hierarchical or pooled |
hierarchical |
– |
hierarchical: every speaker has their own intercept and linear weights around the language's; pooled: all speakers share one naming (x-ui-level: basic) |
features |
cielab or grid_line or grid_circle |
cielab |
– |
cielab: a quadratic surface in CIELAB; grid_line / grid_circle: on the printed palette, with the hue column as a line or as a circle (x-ui-level: basic) |
w_sd |
number |
3.0 |
– |
Prior sd of the zero-sum weights (> 0, ≤ 20) |
sd_scale |
number |
1.0 |
– |
Half-normal scale of the between-speaker sds (> 0, ≤ 10) |
n_random |
integer |
4 |
– |
Leading features with speaker effects (4: the intercept and L, a, b) (≥ 1, ≤ 10) |
hue_columns |
integer (optional) |
null |
– |
Hue columns around the circle (default: the largest grid_col; grid_circle only) |
new_speakers |
integer |
20 |
– |
Simulated new speakers per draw for the language-level shares (≥ 1, ≤ 200) |
score_draws |
integer |
200 |
– |
Posterior draws used by one score request (≥ 10, ≤ 4000) |
Input data contract (schema template)
{
"template": {
"dims": {
"speaker": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "hyperprior"
},
"chip": {
"kind": "integer",
"policy": "fixed"
}
},
"vars": {
"naming": {
"dims": [
"speaker",
"chip"
],
"dtype": "str",
"role": "target",
"missing": "allow",
"description": "The term each speaker gave each chip ('' = no answer)"
},
"lab_l": {
"dims": [
"chip"
],
"dtype": "float64",
"role": "covariate",
"description": "CIELAB L* of the chip"
},
"lab_a": {
"dims": [
"chip"
],
"dtype": "float64",
"role": "covariate",
"description": "CIELAB a* of the chip"
},
"lab_b": {
"dims": [
"chip"
],
"dtype": "float64",
"role": "covariate",
"description": "CIELAB b* of the chip"
},
"grid_row": {
"dims": [
"chip"
],
"dtype": "int64",
"role": "covariate",
"description": "Row of the chip on the palette (WCS: A-J as 0-9)"
},
"grid_col": {
"dims": [
"chip"
],
"dtype": "int64",
"role": "covariate",
"description": "Hue column of the chip on the palette (0 = greys)"
}
}
}
}
sci.fisher_kpp
Cell counts across a closing wound (a scratch assay) as a Fisher-KPP reaction-diffusion equation: cells move with diffusivity D, divide logistically at rate lam up to a capacity K, optionally after a start-up delay. The PDE runs inside the model from the counts at the first time; outputs are the expected density field (a kymograph over time and position) and the front speed 2 sqrt(D lam).
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, sci.profile_bands, sci.field_map |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
density |
(t, x) |
of count |
Cells per column: the expected count K u(x, t), or a Poisson draw |
wave_speed |
() |
um/h |
Speed of the travelling invasion front, 2 sqrt(D lam) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
steps_per_hour |
integer |
10 |
– |
Explicit Euler steps per hour; more steps are slower but stable for a larger diffusivity (x-ui-level: basic) (≥ 1, ≤ 1000) |
delay |
boolean |
true |
– |
Multiply movement and growth by tanh(beta t): the cells start slowly after the scratch (x-ui-level: basic) |
max_extension |
integer |
4 |
– |
Observation periods a forecast may reach past the last fitted time (≥ 0, ≤ 1000) |
diffusivity_median |
number |
1000.0 |
– |
Prior median of D (um^2/h) (> 0) |
diffusivity_log_sd |
number |
1.0 |
– |
Log-scale sd of the prior of D (> 0) |
growth_median |
number |
0.05 |
– |
Prior median of lam (1/h) (> 0) |
growth_log_sd |
number |
1.0 |
– |
Log-scale sd of the prior of lam (> 0) |
capacity_mu |
number |
122.0 |
– |
Prior mean of K (cells per column) (> 0) |
capacity_sigma |
number |
15.0 |
– |
Prior sd of K (> 0) |
delay_rate_median |
number |
0.1 |
– |
Prior median of beta (1/h) (> 0) |
delay_rate_log_sd |
number |
1.0 |
– |
Log-scale sd of the prior of beta (> 0) |
initial_floor |
number |
0.1 |
– |
Smallest initial count, so an empty column can still fill (> 0) |
cfl_quantile |
number |
0.99 |
– |
Quantile of the prior of D that must satisfy D dt / dx^2 <= 1/2 (> 0.5, < 1.0) |
Input data contract (schema template)
{
"params": {
"max_extension": {
"type": "integer",
"default": 4
}
},
"template": {
"dims": {
"t": {
"kind": "integer",
"policy": "extend",
"max_extension": "{max_extension}",
"description": "Hours since the start of the assay"
},
"x": {
"kind": "float",
"policy": "fixed",
"description": "Centre of each column across the wound (um, equal spacing)"
}
},
"vars": {
"count": {
"dims": [
"t",
"x"
],
"dtype": "int64",
"role": "target",
"units": "cells",
"bounds": [
0,
null
]
}
}
}
}
sci.graphical_model
Learns which variables are directly linked: partial correlations (the correlation of two variables given all the others) and the probability of an edge, P(|rho| > threshold). kind dense is a multivariate normal with an LKJ prior on the correlations (it also predicts and simulates new samples); kind neighbourhood is a sparse horseshoe regression of each variable on the others with AND/OR symmetrisation.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, net.graph, sci.field_map |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
pcor |
(var, var_) |
1 |
Partial correlation of each pair of variables given all the others (unit diagonal) |
edge_prob |
(var, var_) |
1 |
Edge indicator per draw (|partial correlation| > threshold); its mean over the draws is the edge probability |
value |
(cell, var) |
of value |
dense only: the values of each cell (a draw from the model with kind predictive or mode simulate) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
kind |
dense or neighbourhood |
dense |
– |
dense: one multivariate normal with an LKJ prior (predicts and simulates cells); neighbourhood: sparse horseshoe regressions of each variable on the others (x-ui-level: basic) |
threshold |
number |
0.1 |
– |
Relevance threshold delta: an edge is |partial correlation| > delta (x-ui-level: basic) (> 0, < 1) |
standardise |
boolean |
true |
– |
Centre and scale each variable with the mean and sd of the fit data |
reference |
boolean |
false |
– |
The data has a known network reference(var, var_) (1 = edge) that the plots compare with (x-ui-level: basic) |
log_likelihood |
auto or joint or conditional |
auto |
– |
Pointwise log-likelihood kept for elpd_loo: joint (dense only) or conditional (each variable given the others; both kinds). auto: joint for dense, conditional for neighbourhood |
lkj_eta |
number |
2.0 |
– |
dense: LKJ shape of the correlation prior (> 0) |
sd_rate |
number |
1.0 |
– |
dense: rate of the Exponential prior of the standardised sds (> 0) |
mean_sd |
number |
1.0 |
– |
dense: sd of the Normal prior of the means (> 0) |
expected_neighbours |
number |
2.0 |
– |
neighbourhood: prior guess p0 of the neighbours of each variable (sets the global horseshoe scale) (> 0) |
slab_alpha |
number |
2.0 |
– |
neighbourhood: c^2 ~ InvGamma(alpha, beta) (> 0) |
slab_beta |
number |
2.0 |
– |
neighbourhood: c^2 ~ InvGamma(alpha, beta) (> 0) |
edge_rule |
and or or or rho |
and |
– |
neighbourhood: an edge when both coefficients pass the threshold (and), either one (or), or their symmetric combination (rho) |
Input data contract (schema template)
{
"params": {
"reference": {
"type": "boolean",
"default": false
}
},
"template": {
"dims": {
"cell": {
"kind": "integer",
"policy": "new_levels",
"new_level_strategy": "pooled",
"description": "Exchangeable samples (cells); new ones may be scored"
},
"var": {
"kind": "categorical",
"policy": "fixed",
"description": "The measured variables: the nodes of the graph"
}
},
"vars": {
"value": {
"dims": [
"cell",
"var"
],
"dtype": "float64",
"role": "target",
"description": "The measured value of each variable in each cell"
}
}
},
"cases": [
{
"when": {
"reference": true
},
"merge": {
"dims": {
"var_": {
"kind": "categorical",
"policy": "fixed",
"description": "The variables again (the second node of a pair)"
}
},
"vars": {
"reference": {
"dims": [
"var",
"var_"
],
"dtype": "int64",
"role": "constant",
"description": "A known network to compare with (1 = edge)"
}
}
}
}
]
}
sci.heat_plate
Thermocouple readings of a heated plate as the 2-D steady heat equation: conduction k, face loss h, edge loss h_edge and heater efficiency eta, with a finite-volume linear system solved inside the model for each run. Outputs are the temperature field of each run (or of any new heater layout) and the heat-spreading length sqrt(k delta / 2h).
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, core.pair, sci.field_map, sci.image_residuals |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
field |
(run, y, x) |
of temperature |
Temperature of each cell (degC): the steady field, or a simulated thermocouple reading |
spread_length |
() |
cm |
Heat-spreading length sqrt(k delta / 2h) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
thickness_mm |
number |
5.0 |
– |
Thickness of the plate in mm (x-ui-level: basic) (> 0, ≤ 1000) |
room_temperature |
number |
20.0 |
– |
Temperature of the room in degC: the plate without heat (x-ui-level: basic) (≥ -100, ≤ 1000) |
use_insulation |
boolean |
false |
– |
The data has a bool insulation(y, x): True where the back face is insulated (x-ui-level: basic) |
insulated_back_loss |
number |
0.1 |
– |
Back-face loss under insulation as a fraction of the bare loss (≥ 0, ≤ 1) |
k_median |
number |
50.0 |
– |
Prior median of the conductivity k (> 0) |
k_log_sd |
number |
0.5 |
– |
Log-scale sd of the prior of k (> 0) |
h_median |
number |
10.0 |
– |
Prior median of the face coefficient h (> 0) |
h_log_sd |
number |
0.5 |
– |
Log-scale sd of the prior of h (> 0) |
h_edge_median |
number |
10.0 |
– |
Prior median of the edge coefficient (> 0) |
h_edge_log_sd |
number |
0.7 |
– |
Log-scale sd of the prior of h_edge (> 0) |
eta_alpha |
number |
40.0 |
– |
Beta prior of the heater efficiency: alpha (> 0) |
eta_beta |
number |
4.0 |
– |
Beta prior of the heater efficiency: beta (> 0) |
sigma_scale |
number |
0.5 |
– |
Half-normal scale of the thermocouple noise sd (degC) (> 0) |
Input data contract (schema template)
{
"params": {
"use_insulation": {
"type": "boolean",
"default": false
}
},
"template": {
"dims": {
"run": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "pooled",
"description": "One run of the plate with one heater layout (score new runs to predict new layouts)"
},
"y": {
"kind": "float",
"policy": "fixed",
"description": "Centre of each row of cells (cm, equal steps)"
},
"x": {
"kind": "float",
"policy": "fixed",
"description": "Centre of each column of cells (cm, the same step as y)"
}
},
"vars": {
"heater_power": {
"dims": [
"run",
"y",
"x"
],
"dtype": "float64",
"role": "covariate",
"units": "W",
"bounds": [
0,
null
],
"description": "Electrical power put into each cell by the heaters"
},
"temperature": {
"dims": [
"run",
"y",
"x"
],
"dtype": "float64",
"role": "target",
"units": "degC",
"missing": "allow",
"description": "Thermocouple reading of each cell (NaN where there is none)"
}
}
},
"cases": [
{
"when": {
"use_insulation": true
},
"merge": {
"vars": {
"insulation": {
"dims": [
"y",
"x"
],
"dtype": "bool",
"role": "covariate",
"description": "True where the back face of the cell is insulated"
}
}
}
}
]
}
sci.ibp_features
Latent binary features of small images (handwritten digits): every image is the average image plus the features it owns. A stick-breaking Indian buffet process truncated at K features, with every image's binary pattern summed out over 2^K patterns, so NUTS samples the feature images and their probabilities. Outputs are the feature images, which images own them, and completions of unseen pixels.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, sci.field_map, sci.ppc_image_grid, sci.image_residuals |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
ink_hat |
(digit, y, x) |
of ink |
Expected image given the seen pixels (completion where unseen), or a draw of pattern and noise |
features |
(feature, y, x) |
ink |
Feature images: the ink a feature adds to (or removes from) the average image |
feature_prob |
(feature) |
1 |
Probability pi_k that an image owns feature k |
owns |
(digit, feature) |
1 |
Probability that each image owns each feature, given its seen pixels |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
n_features |
integer |
8 |
– |
Truncation K: the largest number of features. Each image sums over 2^K patterns, so each extra feature doubles the cost (x-ui-level: basic) (≥ 1, ≤ 10) |
kind |
fixed_noise or free_noise |
fixed_noise |
– |
fixed_noise keeps the pixel noise at noise_sd (the notebook); free_noise learns it (x-ui-level: basic) |
noise_sd |
number |
0.25 |
– |
Pixel noise sigma_X (ink units). It sets the resolution: a smaller value makes more features worth keeping (x-ui-level: basic) (> 0) |
alpha_shape |
number |
1.0 |
– |
Gamma shape of the IBP mass alpha (> 0) |
alpha_rate |
number |
1.0 |
– |
Gamma rate of the IBP mass alpha (> 0) |
feature_scale_sd |
number |
1.0 |
– |
HalfNormal scale of sigma_A (> 0) |
start |
digits or default |
digits |
– |
digits: every chain starts at half of K random images with nu = 0.8 and no jitter (avoids the 'no features' trap); default: the jittered platform start |
score_draws |
integer |
200 |
– |
Posterior draws (spread over the chains) per score (≥ 1, ≤ 4000) |
shown_mask |
boolean |
false |
– |
The data has a shown(digit, y, x) mask: pixels where it is False are hidden from the fit (held-out halves) |
truncation_warn |
number |
0.05 |
– |
Warn when the posterior mean of the last feature probability is above this (> 0, < 1) |
Input data contract (schema template)
{
"params": {
"shown_mask": {
"type": "boolean",
"default": false
}
},
"template": {
"dims": {
"digit": {
"kind": "categorical",
"policy": "fixed",
"description": "One small image (a digit) per level"
},
"y": {
"kind": "integer",
"policy": "fixed",
"description": "Pixel row (top = 0)"
},
"x": {
"kind": "integer",
"policy": "fixed",
"description": "Pixel column"
}
},
"vars": {
"ink": {
"dims": [
"digit",
"y",
"x"
],
"dtype": "float64",
"role": "target",
"units": "ink",
"missing": "allow",
"description": "Ink of each pixel (0 blank, 1 full); empty = not seen"
}
}
},
"cases": [
{
"when": {
"shown_mask": true
},
"merge": {
"vars": {
"shown": {
"dims": [
"digit",
"y",
"x"
],
"dtype": "bool",
"role": "mask",
"description": "False hides the pixel from the fit (held out)"
}
}
}
}
]
}
sci.lgcp_grid
A log-Gaussian Cox process for event counts on a regular space-time grid: a random-walk total per period times a smooth 2-D map (Matérn-5/2 HSGP) that can change from era to era, with negative-binomial counts. Forecasts reach at most max_extension periods past the fit.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, core.ppc_fan, sci.field_map, sci.ensemble |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
rate |
(period, row, col) |
of count |
Events per cell and period: the expected intensity, or a predictive count draw |
total |
(period) |
of count |
Expected events per period in the whole grid |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
max_extension |
integer |
8 |
– |
Periods a forecast may reach past the fitted range without a refit (x-ui-level: basic) (≥ 1, ≤ 400) |
era_periods |
integer |
4 |
– |
Periods in one era: the spatial field changes from era to era (4 quarters = one map per year) (≥ 1, ≤ 1000) |
field |
era_walk or static |
era_walk |
– |
era_walk: a new map each era (a random walk of maps); static: one map for all periods (the separable model) |
anchor |
busiest or first or last |
busiest |
– |
The era whose map gets the marginal prior; the other eras walk away from it (busiest = the fit era with the most events) |
likelihood |
negbin or poisson |
negbin |
– |
|
cell_km |
number |
25.0 |
– |
Width of one grid cell in km (> 0) |
m_row |
integer |
10 |
– |
HSGP basis functions along rows (≥ 2, ≤ 60) |
m_col |
integer |
14 |
– |
HSGP basis functions along columns (≥ 2, ≤ 60) |
c |
number |
1.5 |
– |
HSGP boundary factor (> 1.0, ≤ 5.0) |
ell_lower_km |
number |
15.0 |
– |
5% quantile of the lengthscale prior (> 0) |
ell_upper_km |
number |
100.0 |
– |
95% quantile of the lengthscale prior (> 0) |
alpha_sigma |
number |
1.5 |
– |
Sd of the log total per period (centred on the fit mean) (> 0) |
sigma_g_scale |
number |
0.5 |
– |
Half-normal scale of the RW step (> 0) |
eta0_scale |
number |
2.0 |
– |
Half-normal scale of the anchor map (> 0) |
eta_d_scale |
number |
1.0 |
– |
Half-normal scale of the era increments (> 0) |
inv_phi_rate |
number |
1.0 |
– |
Exponential rate of 1/phi (0 = Poisson) (> 0) |
Input data contract (schema template)
{
"params": {
"max_extension": {
"type": "integer",
"default": 8
}
},
"template": {
"dims": {
"period": {
"kind": "time",
"policy": "extend",
"max_extension": "{max_extension}"
},
"row": {
"kind": "integer",
"policy": "fixed"
},
"col": {
"kind": "integer",
"policy": "fixed"
}
},
"vars": {
"count": {
"dims": [
"period",
"row",
"col"
],
"dtype": "int64",
"role": "target"
}
}
}
}
sci.network_latent_space
An undirected graph (who works with whom) as one Bernoulli tie for each pair of nodes. The log odds add pair covariates (homophily), a sociality effect per node and, for kind latent_space, minus the distance between latent positions. Outputs are the tie probability of every pair, the positions (aligned by Procrustes), the sociality, simulated graphs and their statistics.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, net.graph, sci.field_map |
| Resources |
class M (min S) |
Outputs
| Output |
Dims |
Units |
Description |
tie_prob |
(node, node_) |
probability |
Probability of a tie between the two nodes (0 on the diagonal) |
tie |
(node, node_) |
of tie |
The tie: its probability, or a simulated graph (kind predictive, mode simulate) |
degree |
(node) |
ties |
Ties of each node with the scored nodes (node_ of the score data; all nodes for the degree in the graph): expected, or in a simulated graph |
sociality |
(node) |
log odds |
How much more often the node has ties with anyone (kind sociality or latent_space) |
position |
(node, latent_dim) |
latent units |
Latent position, aligned by Procrustes (kind latent_space) |
graph_stat |
(statistic) |
statistic |
Statistics of each simulated graph of the whole node set (density, sd_degree, max_degree, isolates, triangles, transitivity, esp0, mean_geodesic, unreachable); mode simulate or kind predictive |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
kind |
covariates or sociality or latent_space |
latent_space |
– |
Model of the log odds: covariates only, + a sociality effect per node, + latent positions (x-ui-level: basic) |
covariates |
boolean |
true |
– |
Use the pair covariates dyad_cov(node, node_, cov); false leaves them out (x-ui-level: basic) |
node_groups |
boolean |
false |
– |
The data has node_group(node), a group code kept for the plots |
latent_dims |
integer |
2 |
– |
Dimensions of the latent space (≥ 1, ≤ 3) |
alpha_mu |
number |
-2.0 |
– |
Prior mean of the intercept alpha |
alpha_sigma |
number |
2.0 |
– |
Prior sd of the intercept alpha (> 0) |
beta_sigma |
number |
1.0 |
– |
Prior sd of each covariate effect (> 0) |
sociality_scale |
number |
1.0 |
– |
Scale of the HalfNormal prior of sigma_s (> 0) |
latent_scale |
number |
2.0 |
– |
Scale of the HalfNormal prior of sigma_z (> 0) |
procrustes_iters |
integer |
10 |
– |
Passes of generalised Procrustes alignment (≥ 1, ≤ 100) |
Input data contract (schema template)
{
"params": {
"covariates": {
"type": "boolean",
"default": true
},
"node_groups": {
"type": "boolean",
"default": false
}
},
"template": {
"dims": {
"node": {
"kind": "integer",
"policy": "fixed",
"description": "The nodes (actors)"
},
"node_": {
"kind": "integer",
"policy": "fixed",
"description": "The second node of a pair (the same labels as node)"
}
},
"vars": {
"tie": {
"dims": [
"node",
"node_"
],
"dtype": "float64",
"role": "target",
"missing": "allow",
"bounds": [
0,
1
],
"description": "1 when the two nodes have a tie, 0 when not, missing when not observed (symmetric)"
}
}
},
"cases": [
{
"when": {
"covariates": true
},
"merge": {
"dims": {
"cov": {
"kind": "categorical",
"policy": "fixed",
"description": "The covariates of a pair"
}
},
"vars": {
"dyad_cov": {
"dims": [
"node",
"node_",
"cov"
],
"dtype": "float64",
"description": "Covariates of each pair, for example 1 when the two nodes are in the same group"
}
}
}
},
{
"when": {
"node_groups": true
},
"merge": {
"vars": {
"node_group": {
"dims": [
"node"
],
"dtype": "int64",
"role": "constant",
"description": "A group code of each node, used for colours in plots"
}
}
}
}
]
}
sci.phylo_regression
A regression of one trait of species on other traits whose residuals are correlated by a phylogeny: i.i.d., Brownian motion, Pagel's lambda or Ornstein-Uhlenbeck on the shared branch length of the tree. Predicts a missing trait from relatives and stores the leave-one-out conditional log density for elpd_loo.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, sci.phylogeny |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
trait |
(species) |
of trait |
The trait of each species predicted from its relatives (Gaussian conditioning on the other species; the median when the trait is logged), or a draw with the conditional noise |
slope |
(predictor) |
1 |
Slope of each predictor (sd of the trait per sd of the predictor when standardised) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
kind |
iid or brownian or lambda or ou |
lambda |
– |
Residual correlation: iid (no tree), brownian (Brownian motion on the tree), lambda (Pagel's lambda: tree part plus a species part) or ou (Ornstein-Uhlenbeck) (x-ui-level: basic) |
predictors |
list of string |
– |
– |
Names of the predictor variables on the species dim (x-ui-level: basic) (max items 16) |
log_target |
boolean |
true |
– |
Take the log of the trait (it must be positive) |
log_predictors |
boolean |
true |
– |
Take the log of each predictor (they must be positive) |
standardise |
boolean |
true |
– |
Centre and scale the trait and the predictors by the fitted species (the slopes are then in sd of the trait per sd of the predictor) |
intercept_sd |
number |
1.0 |
– |
Prior sd of the intercept (> 0) |
slope_sd |
number |
0.5 |
– |
Prior sd of each slope (> 0) |
sigma_rate |
number |
1.0 |
– |
Rate of the exponential prior of sigma (> 0) |
lambda_alpha |
number |
1.0 |
– |
Beta prior of lambda: first shape (> 0) |
lambda_beta |
number |
1.0 |
– |
Beta prior of lambda: second shape (> 0) |
ou_parameterisation |
rate or variance |
rate |
– |
ou: put the prior on the Brownian rate eta2*rho (rate, recommended) or on eta2 and rho (variance) |
rate_sd |
number |
1.0 |
– |
ou (rate): HalfNormal sd of eta2*rho (> 0) |
rho_sd |
number |
5.0 |
– |
ou: HalfNormal sd of rho (pull to the optimum) (> 0) |
eta2_sd |
number |
5.0 |
– |
ou (variance): HalfNormal sd of eta2 (> 0) |
jitter |
number |
1e-06 |
– |
ou: added to the diagonal of K (≥ 0, ≤ 0.01) |
Input data contract (schema template)
{
"params": {
"predictors": {
"type": "string_list",
"default": [
"body",
"group_size"
]
}
},
"template": {
"dims": {
"species": {
"kind": "categorical",
"policy": "fixed",
"description": "One level per species; the labels are tip labels of the tree"
},
"node": {
"kind": "integer",
"policy": "fixed",
"description": "Every node of the tree (tips and internal nodes)"
}
},
"vars": {
"trait": {
"dims": [
"species"
],
"dtype": "float64",
"role": "target",
"missing": "allow",
"description": "The trait to explain; missing values are predicted from relatives"
},
"{*predictors as p}": {
"dims": [
"species"
],
"dtype": "float64",
"role": "covariate",
"description": "A predictor of the trait"
},
"parent": {
"dims": [
"node"
],
"dtype": "int64",
"role": "constant",
"description": "Position of the parent node; -1 at the root"
},
"branch_length": {
"dims": [
"node"
],
"dtype": "float64",
"role": "constant",
"description": "Length of the branch above the node (time, e.g. Myr)"
},
"is_tip": {
"dims": [
"node"
],
"dtype": "bool",
"role": "constant",
"description": "True for a tip (a species), false for an internal node"
},
"tip_label": {
"dims": [
"node"
],
"dtype": "str",
"role": "constant",
"description": "The species label of each tip (empty for internal nodes)"
}
}
}
}
sci.storm_localisation
Single-molecule localisation microscopy (STORM/PALM): finds isolated spots in raw EMCCD frames and fits each with a pixel-integrated Gaussian PSF on a background, with Poisson counts after the camera's photon-transfer calibration. Outputs are positions with nm error bars, photons, the PSF width, a super-resolved render and the fitted patches.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, sci.point_pattern, sci.image_residuals, sci.field_map |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
x |
(spot) |
nm |
Column position of each spot |
y |
(spot) |
nm |
Row position of each spot |
photons |
(spot) |
photons |
Photons that each molecule emitted into the frame |
background |
(spot) |
photons/px |
Background at the centre of each patch |
psf_sd |
(spot) |
nm |
PSF sd of each spot |
render |
(render_y, render_x) |
localisations |
Super-resolved image: the spots at the drawn positions, blurred by half a render pixel |
patch_fit |
(spot, py, px) |
counts |
Expected effective counts (photons / 2) of each fitted patch, or Poisson draws |
frames_hat |
(frame, row, col) |
of frames |
Camera image (ADU): the fitted spots on the background |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
pixel_nm |
number |
100.0 |
– |
Size of one camera pixel in the sample (nm) (x-ui-level: basic) (> 0) |
kind |
flat or plane |
flat |
– |
Background in each patch: flat (one value) or plane (a value and a slope in x and y) (x-ui-level: basic) |
offset_adu |
number (optional) |
null |
– |
Camera offset (ADU). Set it with scale_adu; unset, both come from the photon-transfer curve of the frames |
scale_adu |
number (optional) |
null |
– |
ADU per effective count: twice the EM gain (the photon-transfer slope) |
max_spots |
integer |
200 |
– |
Isolated spots fitted, evenly spaced in frame order (x-ui-level: basic) (≥ 1, ≤ 5000) |
threshold_sd |
number |
5.0 |
– |
Detection threshold (robust noise sds) (> 0) |
smooth_px |
number |
1.0 |
– |
Gaussian smoothing before detection (px) (> 0) |
patch_px |
integer |
11 |
– |
Side of each fitted patch (odd, px) (≥ 5, ≤ 31) |
min_blob_px |
integer |
13 |
– |
Fewest pixels of a fitted blob (≥ 1) |
max_blob_px |
integer |
39 |
– |
Most pixels of a fitted blob (≥ 1) |
amplitude_band |
list of any |
[0.0, 1.0] |
– |
Quantile band of blob amplitude that is fitted (0, 1: every isolated blob) (min items 2, max items 2) |
photons_median |
number |
1500.0 |
– |
Prior median of the photons per spot (> 0) |
photons_log_sd |
number |
1.0 |
– |
Log-scale prior sd of the photons (> 0) |
psf_sd_px |
number |
1.0 |
– |
Prior median of the PSF sd (px) (> 0) |
psf_log_sd |
number |
0.2 |
– |
Log-scale prior sd of the PSF sd (> 0) |
position_sd_px |
number |
2.0 |
– |
Prior sd of the position around the blob centre (px) (> 0) |
background_photons |
number (optional) |
null |
– |
Prior median of the background (photons per pixel); unset: twice the median effective count of the movie |
background_log_sd |
number |
0.5 |
– |
Log-scale prior sd of the background (> 0) |
gradient_sd |
number |
0.05 |
– |
Prior sd of the background slopes (log per px; kind plane) (> 0) |
score_draws |
integer |
40 |
– |
Posterior draws in each score (over all chains) (≥ 1, ≤ 1000) |
ppc_draws |
integer |
20 |
– |
Predictive patch draws kept in the bundle (0: none) (≥ 0, ≤ 200) |
render_px_nm |
number |
16.0 |
– |
Pixel size of the super-resolved render (nm; the render of score_draws draws must stay within 50,000,000 values) (≥ 1.0) |
Input data contract (schema template)
{
"template": {
"dims": {
"frame": {
"kind": "integer",
"policy": "fixed",
"description": "Camera frame"
},
"row": {
"kind": "integer",
"policy": "fixed",
"description": "Pixel row"
},
"col": {
"kind": "integer",
"policy": "fixed",
"description": "Pixel column"
}
},
"vars": {
"frames": {
"dims": [
"frame",
"row",
"col"
],
"dtype": "int32",
"role": "target",
"units": "ADU",
"bounds": [
0,
null
],
"description": "Raw camera counts of each frame"
}
}
}
}
sci.strong_lens
A pixel forward model of a galaxy-scale strong gravitational lens: a singular isothermal ellipsoid with external shear traces every pixel to a Sersic source; the lens light, a PSF and correlated noise are modelled; the light amplitudes are integrated out. Gives the Einstein radius, the unlensed source and critical curves. Reads plain or tree datasets (the PSF from a /psf node).
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: the light amplitudes are integrated out over all pixels and the whitened noise couples neighbouring pixels, so pointwise leave-one-out is not defined |
| Default plots |
core.convergence, core.posterior_forest, sci.field_map |
| Resources |
class M (min S) |
Outputs
| Output |
Dims |
Units |
Description |
model_image |
(row, col) |
of image |
Expected image (lens light, lensed source, sky, PSF), or a simulated observation with noise |
source |
(source_row, source_col) |
of image |
The unlensed source (parametric Sersic of each draw) on a source-plane grid |
einstein_radius |
() |
arcsec |
Einstein radius of the isothermal ellipsoid |
einstein_mass |
() |
solar_mass |
Mass inside the Einstein radius (needs z_lens and z_source) |
Derived quantities (outputs.derived)
| Name |
Dims |
Units |
Cached |
Description |
critical_curves |
(sample, curve_point) |
arcsec |
fit |
Tangential critical curve (image plane), its caustic and the cut (source plane) for posterior draws, in arcsec and grid pixel indices |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
pixel_scale |
number |
0.05 |
– |
Pixel size in arcsec (> 0, ≤ 10) |
subsample |
integer |
2 |
– |
Rays per pixel along each axis (sub-pixel sampling) (≥ 1, ≤ 4) |
lens_light_components |
integer |
2 |
– |
Concentric Sersic profiles for the lens galaxy's light (≥ 0, ≤ 2) |
external_shear |
boolean |
true |
– |
Add an external shear to the lens |
noise_correlation |
number |
0.0 |
– |
Lag-one correlation of the noise between neighbouring pixels (separable rows x columns; drizzled images have about 0.2). 0 treats pixels as independent (≥ 0.0, < 0.45) |
fit_noise_scale |
boolean |
true |
– |
Scale the noise map by a free factor |
use_mask |
boolean |
false |
– |
The data has a bool mask(row, col) of pixels |
psf_tolerance |
number |
0.001 |
– |
Relative error allowed in the separable PSF expansion (> 0, < 1) |
psf_max_rank |
integer |
12 |
– |
Most separable PSF terms (≥ 1, ≤ 40) |
psf_source |
auto or tree |
auto |
– |
Where the PSF comes from: 'auto' uses the /psf node of a tree dataset when there is one, else the flat psf variable (which the input then needs); 'tree' reads it only from the /psf node, so the flat input needs no psf |
theta_e_median |
number |
1.0 |
– |
Prior median of the Einstein radius (> 0) |
theta_e_log_sd |
number |
0.5 |
– |
Prior sd of log Einstein radius (> 0) |
mass_center_sd |
number |
0.1 |
– |
Prior sd of the mass centre (> 0) |
light_center_sd |
number |
0.1 |
– |
Prior sd of the light centre (> 0) |
ellipticity_sd |
number |
0.2 |
– |
Prior sd of ellipticity components (> 0) |
shear_sd |
number |
0.05 |
– |
Prior sd of the shear components (> 0) |
light_size_medians |
list of any |
[0.5, 1.5] |
– |
Prior medians of the lens-light half-light radii (min items 2, max items 2) |
source_size_median |
number |
0.2 |
– |
Prior median source radius (> 0) |
source_offset_sd |
number |
0.3 |
– |
Prior sd of the source position (> 0) |
noise_scale_log_sd |
number |
0.2 |
– |
Prior sd of log noise scale (> 0) |
theta_e_start |
number (optional) |
null |
– |
Start the optimisation at this Einstein radius instead of the radius of the ring found in the light-subtracted image |
n_starts |
integer |
5 |
– |
Starts of the full-model optimisation (source positions) (≥ 1, ≤ 9) |
max_iter |
integer |
3000 |
– |
Iterations per optimisation (≥ 10, ≤ 100000) |
source_grid |
integer |
30 |
– |
Source-plane grid side (pixels) (≥ 4, ≤ 128) |
source_half_width |
number |
0.45 |
– |
Half-width of the source-plane grid (arcsec) (> 0) |
curve_points |
integer |
128 |
– |
Points per critical curve (≥ 16, ≤ 2048) |
curve_draws |
integer |
100 |
– |
Posterior draws with cached critical curves (≥ 1, ≤ 2000) |
z_lens |
number (optional) |
null |
– |
Lens redshift (for the mass) |
z_source |
number (optional) |
null |
– |
Source redshift (for the mass) |
h0 |
number |
70.0 |
– |
Hubble constant (km/s/Mpc) (> 0) |
omega_m |
number |
0.3 |
– |
Matter density (flat LCDM) (> 0, < 1) |
Input data contract (schema template)
{
"params": {
"use_mask": {
"type": "boolean",
"default": false
},
"psf_source": {
"type": "string",
"enum": [
"auto",
"tree"
],
"default": "auto"
}
},
"template": {
"dims": {
"row": {
"kind": "integer",
"description": "Image rows (row 0 at the bottom)"
},
"col": {
"kind": "integer",
"description": "Image columns"
}
},
"vars": {
"image": {
"dims": [
"row",
"col"
],
"dtype": "float64",
"role": "target",
"missing": "allow",
"description": "Surface brightness of each pixel (for example electrons/s)"
},
"weight": {
"dims": [
"row",
"col"
],
"dtype": "float64",
"role": "weight",
"description": "Inverse variance of each pixel; 0 leaves the pixel out"
}
}
},
"cases": [
{
"when": {
"psf_source": "auto"
},
"merge": {
"dims": {
"psf_row": {
"kind": "integer",
"description": "Rows of the PSF kernel"
},
"psf_col": {
"kind": "integer",
"description": "Columns of the PSF kernel"
}
},
"vars": {
"psf": {
"dims": [
"psf_row",
"psf_col"
],
"dtype": "float64",
"role": "constant",
"description": "The point-spread function (odd sides, centred)"
}
}
}
},
{
"when": {
"use_mask": true
},
"merge": {
"vars": {
"mask": {
"dims": [
"row",
"col"
],
"dtype": "bool",
"role": "mask",
"description": "True where the pixel is used in the fit"
}
}
}
}
]
}
sci.traction_force
Traction force microscopy: recovers the 2-D traction field under a cell from the displacement field of the gel. A Gaussian prior in Fourier space (white, squared exponential or Matern spectrum); NUTS on the hyperparameters with the field integrated out, then exact posterior draws of the field.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: the likelihood is a potential over Fourier modes of the whole raster; pixels are not conditionally independent, so pointwise leave-one-out is not defined |
| Default plots |
core.convergence, core.posterior_forest, sci.vector_field |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
traction |
(component, row, col) |
Pa |
Joint posterior draws of the traction field |
displacement_hat |
(component, row, col) |
of displacement |
Displacement of each traction draw (expected), plus noise (predictive) |
strain_energy |
() |
fJ |
Elastic energy the cell put into the gel, inside the force mask |
contractility |
() |
uN |
Sum of the forces towards the force epicentre, inside the mask |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
grid_um |
number |
1.0 |
– |
Grid spacing of the displacement raster (um) (> 0) |
young_pa |
number |
10000.0 |
– |
Young's modulus of the gel (Pa) (> 0) |
poisson |
number |
0.49 |
– |
Poisson ratio of the gel (≥ 0, < 0.5) |
young_cv |
number |
0.0 |
– |
Relative uncertainty of Young's modulus (lognormal sd); 0 = known exactly (≥ 0, ≤ 1) |
prior |
white or smooth or matern |
matern |
– |
Prior spectrum of the tractions: white (Tikhonov), smooth (squared exponential) or matern ((1 + k^2 l^2)^-alpha) |
noise_um |
number |
0.01 |
– |
Prior median of the noise sd (um) (> 0) |
traction_pa |
number |
300.0 |
– |
Prior median of the traction scale (Pa) (> 0) |
lengthscale_um |
number |
5.0 |
– |
Prior median of the length scale (um; smooth and matern) (> 0) |
field_draws |
integer |
100 |
– |
Traction fields drawn per score (over all chains) (≥ 1, ≤ 1000) |
force_mask |
boolean |
false |
– |
The data has a force_mask(row, col) variable: strain energy and contractility are summed inside it (else over the whole grid) |
Input data contract (schema template)
{
"params": {
"force_mask": {
"type": "boolean",
"default": false
}
},
"template": {
"dims": {
"component": {
"kind": "categorical",
"policy": "fixed"
},
"row": {
"kind": "integer",
"policy": "fixed"
},
"col": {
"kind": "integer",
"policy": "fixed"
}
},
"vars": {
"displacement": {
"dims": [
"component",
"row",
"col"
],
"dtype": "float64",
"role": "target",
"description": "Displacement of the gel surface (x and y components)"
}
}
},
"cases": [
{
"when": {
"force_mask": true
},
"merge": {
"vars": {
"force_mask": {
"dims": [
"row",
"col"
],
"dtype": "bool",
"role": "mask",
"description": "Region that strain energy and contractility cover"
}
}
}
}
]
}
sci.turing_pattern
Turing patterns: recovers the reaction and diffusion rates of a Schnakenberg activator-substrate system from early images of a growing pattern. The likelihood is exact for the linearised dynamics (independent complex Gaussian Fourier modes, a Woodbury identity per wavenumber). Gives the dispersion relation, the pattern wavelength, P(Turing conditions hold) and simulated patterns from a spectral solver.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict, simulate |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.convergence, core.posterior_forest, sci.field_map, sci.ppc_image_grid, sci.profile_bands |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
pattern |
(t, y, x) |
of activator |
Activator field at the requested times: a draw given the fitted images (predict), or a new pattern from the nonlinear solver (simulate) |
settled |
(y, x) |
of activator |
Simulate only: the pattern of each run at settle_time |
growth |
(wavenumber) |
1/time |
Dispersion relation: growth rate Re lambda(k) of a mode with wavenumber k |
p_turing |
() |
probability |
1 when the Turing conditions hold for the draw (the mean is the probability) |
wavelength |
() |
length |
Wavelength 2 pi / k_m of the fastest-growing mode |
turing_space |
(b_supply, a_supply) |
probability |
1 where the supply rates (a, b) are Turing unstable at the draw's diffusion ratio (the mean is P(Turing)) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
box_length |
number |
100.0 |
– |
Side of the square image in the length unit of the model (the activator diffuses with D = 1 in these units) (x-ui-level: basic) (> 0) |
k2_max |
number |
1.5 |
– |
Use only the Fourier modes with |k|^2 below this value; faster modes have decayed below the camera noise (x-ui-level: basic) (> 0) |
max_extension |
integer |
2 |
– |
Image times a prediction may reach past the last fitted time (the linear theory holds only while the pattern is small) (≥ 0, ≤ 100) |
d_median |
number |
10.0 |
– |
Prior median of the diffusion ratio d (> 0) |
d_log_sd |
number |
1.0 |
– |
Log-scale sd of the prior of d (> 0) |
initial_noise_median |
number |
0.001 |
– |
Prior median of the initial noise sd s0 (> 0) |
camera_noise_median |
number |
0.001 |
– |
Prior median of the camera noise sd sigma (> 0) |
field_draws |
integer |
40 |
– |
Posterior draws per score (over all chains) (≥ 1, ≤ 1000) |
simulate_draws |
integer |
4 |
– |
Nonlinear simulations per simulate score (each one is a full PDE run) (≥ 1, ≤ 200) |
simulate_dt |
number (optional) |
null |
– |
Time step of the spectral solver in simulate (default: min(0.025, 0.1 / (g (1 + s^2)))) |
settle_time |
number |
300.0 |
– |
Time of the settled pattern in simulate (> 0, ≤ 5000.0) |
wavenumber_max |
number |
1.2 |
– |
Largest wavenumber of the dispersion relation output (> 0) |
wavenumber_points |
integer |
120 |
– |
Points of the dispersion relation output (≥ 10, ≤ 2000) |
a_max |
number |
0.6 |
– |
Largest supply rate a of the Turing-space map (> 0) |
b_max |
number |
3.0 |
– |
Largest supply rate b of the Turing-space map (> 0) |
supply_points |
integer |
60 |
– |
Grid points along a and b of the Turing-space map (≥ 5, ≤ 300) |
precondition |
boolean |
true |
– |
Sample a parameterisation whitened at the posterior mode (Laplace approximation); the model is the same. False samples the notebook's parameters directly (needs a long warm-up, for example tune 1500) |
Input data contract (schema template)
{
"params": {
"max_extension": {
"type": "integer",
"default": 2
}
},
"template": {
"dims": {
"t": {
"kind": "float",
"policy": "extend",
"ordered": true,
"max_extension": "{max_extension}",
"description": "Time since the uniform state was perturbed"
},
"y": {
"kind": "integer",
"policy": "fixed",
"description": "Pixel row"
},
"x": {
"kind": "integer",
"policy": "fixed",
"description": "Pixel column"
}
},
"vars": {
"activator": {
"dims": [
"t",
"y",
"x"
],
"dtype": "float64",
"role": "target",
"description": "Activator concentration in each pixel (early, small pattern)"
}
}
}
}
sklearn.multiclass_classifier
Multiclass classification with an allow-listed scikit-learn, xgboost, LightGBM or CatBoost classifier: the probability of each class of a text or integer target.
|
|
| Version |
1.0.0 |
| Inference |
point |
| Representation |
point |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: scikit-learn and xgboost estimators provide no pointwise log-likelihood |
| Default plots |
core.roc_pr, core.confusion, ml.feature_importance |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(class) |
1 |
Probability of each class (sums to 1 over class) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
estimator |
LinearRegressionChoice or RidgeChoice or LassoChoice or ElasticNetChoice or QuantileRegressorChoice or LogisticRegressionChoice or RandomForestRegressorChoice or RandomForestClassifierChoice or GradientBoostingRegressorChoice or HistGradientBoostingRegressorChoice or XGBRegressorChoice or XGBClassifierChoice or HistGradientBoostingClassifierChoice or LGBMClassifierChoice or CatBoostClassifierChoice |
required |
– |
|
target |
string |
y |
– |
|
rows |
list of string |
required |
– |
min items 1, max items 8 |
time_dim |
string |
time |
– |
|
time_kind |
time or integer or index or none |
time |
– |
|
columns |
ColumnsSettings |
– |
– |
|
coord_features |
map of category or onehot or ordinal or numeric |
– |
– |
|
new_levels |
pooled or zero or error |
pooled |
– |
|
pooled_max_levels |
integer |
256 |
– |
≥ 1, ≤ 10000 |
weight |
string (optional) |
null |
– |
|
mask |
string (optional) |
null |
– |
|
forecast_strategy |
direct or recursive |
direct |
– |
|
retransform |
median or smearing |
median |
– |
|
n_jobs |
integer |
1 |
– |
≥ 1, ≤ 64 |
uncertainty |
NoUncertainty |
– |
– |
|
class_order |
list of string (optional) |
null |
– |
|
max_classes |
integer |
50 |
– |
≥ 2, ≤ 200 |
target_dtype |
str or int64 |
str |
– |
|
Nested settings types
CatBoostClassifierChoice
| Field |
Type |
Default |
Description |
kind |
catboost.CatBoostClassifier |
required |
|
params |
CatBoostClassifierParams |
{"iterations": 500, "learning_rate": null, "depth": 6, "l2_… |
|
CatBoostClassifierParams
| Field |
Type |
Default |
Description |
iterations |
integer |
500 |
≥ 1, ≤ 10000 |
learning_rate |
number (optional) |
null |
|
depth |
integer |
6 |
≥ 1, ≤ 16 |
l2_leaf_reg |
number |
3.0 |
≥ 0 |
min_data_in_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
rsm |
number |
1.0 |
> 0, ≤ 1 |
random_strength |
number |
1.0 |
≥ 0 |
border_count |
integer |
254 |
≥ 1, ≤ 65535 |
auto_class_weights |
Balanced or SqrtBalanced (optional) |
null |
|
ColumnsSettings
Which variables become feature columns. vars (explicit list) wins over roles; exclude removes names from either. Variables with dims beyond rows are flattened into one column per label (spend[tv], promo_lag[1]).
| Field |
Type |
Default |
Description |
roles |
list of Role |
– |
max items 16 |
vars |
list of string (optional) |
null |
|
exclude |
list of string |
– |
max items 1024 |
ElasticNetChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.ElasticNet |
required |
|
params |
ElasticNetParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
ElasticNetParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
l1_ratio |
number |
0.5 |
≥ 0, ≤ 1 |
GradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.GradientBoostingRegressor |
required |
|
params |
GradientBoostingRegressorParams |
{"loss": "squared_error", "alpha": 0.9, "learning_rate": 0.… |
|
GradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or huber or quantile |
squared_error |
|
alpha |
number |
0.9 |
> 0, < 1 |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
max_depth |
integer (optional) |
3 |
|
max_features |
sqrt or log2 or number (optional) |
null |
|
n_iter_no_change |
integer (optional) |
null |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
HistGradientBoostingClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingClassifier |
required |
|
params |
HistGradientBoostingClassifierParams |
{"learning_rate": 0.1, "max_iter": 100, "max_leaf_nodes": 3… |
|
HistGradientBoostingClassifierParams
| Field |
Type |
Default |
Description |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
HistGradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingRegressor |
required |
|
params |
HistGradientBoostingRegressorParams |
{"loss": "squared_error", "quantile": null, "learning_rate"… |
|
HistGradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or gamma or poisson or quantile |
squared_error |
|
quantile |
number (optional) |
null |
|
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
LGBMClassifierChoice
| Field |
Type |
Default |
Description |
kind |
lightgbm.LGBMClassifier |
required |
|
params |
LGBMClassifierParams |
{"n_estimators": 100, "learning_rate": 0.1, "num_leaves": 3… |
|
LGBMClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
learning_rate |
number |
0.1 |
> 0, ≤ 1 |
num_leaves |
integer |
31 |
≥ 2, ≤ 131072 |
max_depth |
integer |
-1 |
≥ -1, ≤ 64 |
min_child_samples |
integer |
20 |
≥ 1, ≤ 1000000 |
min_child_weight |
number |
0.001 |
≥ 0 |
min_split_gain |
number |
0.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
subsample_freq |
integer |
0 |
≥ 0, ≤ 1000 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
0.0 |
≥ 0 |
max_bin |
integer |
255 |
≥ 2, ≤ 4096 |
class_weight |
balanced (optional) |
null |
|
LassoChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Lasso |
required |
|
params |
LassoParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
LassoParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
LinearRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LinearRegression |
required |
|
params |
LinearRegressionParams |
{"fit_intercept": true, "positive": false} |
|
LinearRegressionParams
| Field |
Type |
Default |
Description |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
LogisticRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LogisticRegression |
required |
|
params |
LogisticRegressionParams |
{"C": 1.0, "l1_ratio": 0.0, "fit_intercept": true, "solver"… |
|
LogisticRegressionParams
| Field |
Type |
Default |
Description |
C |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
l1_ratio |
number |
0.0 |
≥ 0, ≤ 1 |
fit_intercept |
boolean |
true |
|
solver |
lbfgs or liblinear or newton-cg or newton-cholesky or sag or saga |
lbfgs |
|
max_iter |
integer |
100 |
≥ 1, ≤ 100000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
NoUncertainty
Point predictions (representation point).
| Field |
Type |
Default |
Description |
kind |
none |
none |
|
QuantileRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.QuantileRegressor |
required |
|
params |
QuantileRegressorParams |
{"quantile": 0.5, "alpha": 1.0, "fit_intercept": true, "sol… |
|
QuantileRegressorParams
| Field |
Type |
Default |
Description |
quantile |
number |
0.5 |
> 0, < 1 |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
solver |
highs or highs-ds or highs-ipm |
highs |
|
RandomForestClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestClassifier |
required |
|
params |
RandomForestClassifierParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
gini or entropy or log_loss |
gini |
|
max_features |
sqrt or log2 or number (optional) |
sqrt |
|
class_weight |
balanced or balanced_subsample (optional) |
null |
|
RandomForestRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestRegressor |
required |
|
params |
RandomForestRegressorParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
squared_error or absolute_error or friedman_mse or poisson |
squared_error |
|
max_features |
sqrt or log2 or number (optional) |
1.0 |
|
RidgeChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Ridge |
required |
|
params |
RidgeParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "s… |
|
RidgeParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
solver |
auto or svd or cholesky or lsqr or sparse_cg or sag or saga or lbfgs |
auto |
|
max_iter |
integer (optional) |
null |
|
tol |
number |
0.0001 |
> 0, ≤ 1 |
Role
What a variable means to a model.
One of target, covariate, media, spend, control, index, mask, constant, weight, exposure.
XGBClassifierChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBClassifier |
required |
|
params |
XGBClassifierParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
binary:logistic |
binary:logistic |
|
scale_pos_weight |
number |
1.0 |
> 0 |
XGBRegressorChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBRegressor |
required |
|
params |
XGBRegressorParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
reg:squarederror or reg:squaredlogerror or reg:absoluteerror or reg:pseudohubererror or reg:quantileerror or count:poisson or reg:gamma or reg:tweedie |
reg:squarederror |
|
quantile_alpha |
number (optional) |
null |
|
tweedie_variance_power |
number (optional) |
null |
|
huber_slope |
number (optional) |
null |
|
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"time_dim": {
"type": "string",
"default": "time"
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer",
"index",
"none"
],
"default": "time"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
},
"target_dtype": {
"type": "string",
"enum": [
"str",
"int64"
],
"default": "str"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "{target_dtype}",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "time"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "time",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "integer",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "index"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "index",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
}
]
}
sklearn.tabular_bootstrap
Tabular regression with a bootstrap ensemble: one joint draw per replicate, so any aggregation is valid.
|
|
| Version |
1.0.0 |
| Inference |
bootstrap |
| Representation |
draws |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: scikit-learn and xgboost estimators provide no pointwise log-likelihood |
| Default plots |
core.fit_vs_actual, core.residuals_over_time, ml.feature_importance |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(chain, draw) |
– |
Bootstrap draws of the prediction over the row dims |
contributions |
(chain, draw, component) |
– |
Per-replicate feature contributions, in model space |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
estimator |
LinearRegressionChoice or RidgeChoice or LassoChoice or ElasticNetChoice or QuantileRegressorChoice or LogisticRegressionChoice or RandomForestRegressorChoice or RandomForestClassifierChoice or GradientBoostingRegressorChoice or HistGradientBoostingRegressorChoice or XGBRegressorChoice or XGBClassifierChoice or HistGradientBoostingClassifierChoice or LGBMClassifierChoice or CatBoostClassifierChoice |
required |
– |
|
target |
string |
y |
– |
|
rows |
list of string |
required |
– |
min items 1, max items 8 |
time_dim |
string |
time |
– |
|
time_kind |
time or integer or index or none |
time |
– |
|
columns |
ColumnsSettings |
– |
– |
|
coord_features |
map of category or onehot or ordinal or numeric |
– |
– |
|
new_levels |
pooled or zero or error |
pooled |
– |
|
pooled_max_levels |
integer |
256 |
– |
≥ 1, ≤ 10000 |
weight |
string (optional) |
null |
– |
|
mask |
string (optional) |
null |
– |
|
forecast_strategy |
direct or recursive |
direct |
– |
|
retransform |
median or smearing |
median |
– |
|
n_jobs |
integer |
1 |
– |
≥ 1, ≤ 64 |
uncertainty |
BootstrapUncertainty |
– |
– |
|
contributions |
none or auto or exact or zeroing |
auto |
– |
|
Nested settings types
BootstrapUncertainty
Bootstrap ensemble (representation draws, one draw per replicate). by resamples whole levels of a row dim (cluster bootstrap) instead of rows. expected outputs are the replicate predictions; predictive outputs add a resampled out-of-bag residual to each draw.
| Field |
Type |
Default |
Description |
kind |
bootstrap |
bootstrap |
|
n |
integer |
50 |
≥ 2, ≤ 1000 |
by |
string (optional) |
null |
|
CatBoostClassifierChoice
| Field |
Type |
Default |
Description |
kind |
catboost.CatBoostClassifier |
required |
|
params |
CatBoostClassifierParams |
{"iterations": 500, "learning_rate": null, "depth": 6, "l2_… |
|
CatBoostClassifierParams
| Field |
Type |
Default |
Description |
iterations |
integer |
500 |
≥ 1, ≤ 10000 |
learning_rate |
number (optional) |
null |
|
depth |
integer |
6 |
≥ 1, ≤ 16 |
l2_leaf_reg |
number |
3.0 |
≥ 0 |
min_data_in_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
rsm |
number |
1.0 |
> 0, ≤ 1 |
random_strength |
number |
1.0 |
≥ 0 |
border_count |
integer |
254 |
≥ 1, ≤ 65535 |
auto_class_weights |
Balanced or SqrtBalanced (optional) |
null |
|
ColumnsSettings
Which variables become feature columns. vars (explicit list) wins over roles; exclude removes names from either. Variables with dims beyond rows are flattened into one column per label (spend[tv], promo_lag[1]).
| Field |
Type |
Default |
Description |
roles |
list of Role |
– |
max items 16 |
vars |
list of string (optional) |
null |
|
exclude |
list of string |
– |
max items 1024 |
ElasticNetChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.ElasticNet |
required |
|
params |
ElasticNetParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
ElasticNetParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
l1_ratio |
number |
0.5 |
≥ 0, ≤ 1 |
GradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.GradientBoostingRegressor |
required |
|
params |
GradientBoostingRegressorParams |
{"loss": "squared_error", "alpha": 0.9, "learning_rate": 0.… |
|
GradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or huber or quantile |
squared_error |
|
alpha |
number |
0.9 |
> 0, < 1 |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
max_depth |
integer (optional) |
3 |
|
max_features |
sqrt or log2 or number (optional) |
null |
|
n_iter_no_change |
integer (optional) |
null |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
HistGradientBoostingClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingClassifier |
required |
|
params |
HistGradientBoostingClassifierParams |
{"learning_rate": 0.1, "max_iter": 100, "max_leaf_nodes": 3… |
|
HistGradientBoostingClassifierParams
| Field |
Type |
Default |
Description |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
HistGradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingRegressor |
required |
|
params |
HistGradientBoostingRegressorParams |
{"loss": "squared_error", "quantile": null, "learning_rate"… |
|
HistGradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or gamma or poisson or quantile |
squared_error |
|
quantile |
number (optional) |
null |
|
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
LGBMClassifierChoice
| Field |
Type |
Default |
Description |
kind |
lightgbm.LGBMClassifier |
required |
|
params |
LGBMClassifierParams |
{"n_estimators": 100, "learning_rate": 0.1, "num_leaves": 3… |
|
LGBMClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
learning_rate |
number |
0.1 |
> 0, ≤ 1 |
num_leaves |
integer |
31 |
≥ 2, ≤ 131072 |
max_depth |
integer |
-1 |
≥ -1, ≤ 64 |
min_child_samples |
integer |
20 |
≥ 1, ≤ 1000000 |
min_child_weight |
number |
0.001 |
≥ 0 |
min_split_gain |
number |
0.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
subsample_freq |
integer |
0 |
≥ 0, ≤ 1000 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
0.0 |
≥ 0 |
max_bin |
integer |
255 |
≥ 2, ≤ 4096 |
class_weight |
balanced (optional) |
null |
|
LassoChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Lasso |
required |
|
params |
LassoParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
LassoParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
LinearRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LinearRegression |
required |
|
params |
LinearRegressionParams |
{"fit_intercept": true, "positive": false} |
|
LinearRegressionParams
| Field |
Type |
Default |
Description |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
LogisticRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LogisticRegression |
required |
|
params |
LogisticRegressionParams |
{"C": 1.0, "l1_ratio": 0.0, "fit_intercept": true, "solver"… |
|
LogisticRegressionParams
| Field |
Type |
Default |
Description |
C |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
l1_ratio |
number |
0.0 |
≥ 0, ≤ 1 |
fit_intercept |
boolean |
true |
|
solver |
lbfgs or liblinear or newton-cg or newton-cholesky or sag or saga |
lbfgs |
|
max_iter |
integer |
100 |
≥ 1, ≤ 100000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
QuantileRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.QuantileRegressor |
required |
|
params |
QuantileRegressorParams |
{"quantile": 0.5, "alpha": 1.0, "fit_intercept": true, "sol… |
|
QuantileRegressorParams
| Field |
Type |
Default |
Description |
quantile |
number |
0.5 |
> 0, < 1 |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
solver |
highs or highs-ds or highs-ipm |
highs |
|
RandomForestClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestClassifier |
required |
|
params |
RandomForestClassifierParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
gini or entropy or log_loss |
gini |
|
max_features |
sqrt or log2 or number (optional) |
sqrt |
|
class_weight |
balanced or balanced_subsample (optional) |
null |
|
RandomForestRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestRegressor |
required |
|
params |
RandomForestRegressorParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
squared_error or absolute_error or friedman_mse or poisson |
squared_error |
|
max_features |
sqrt or log2 or number (optional) |
1.0 |
|
RidgeChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Ridge |
required |
|
params |
RidgeParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "s… |
|
RidgeParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
solver |
auto or svd or cholesky or lsqr or sparse_cg or sag or saga or lbfgs |
auto |
|
max_iter |
integer (optional) |
null |
|
tol |
number |
0.0001 |
> 0, ≤ 1 |
Role
What a variable means to a model.
One of target, covariate, media, spend, control, index, mask, constant, weight, exposure.
XGBClassifierChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBClassifier |
required |
|
params |
XGBClassifierParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
binary:logistic |
binary:logistic |
|
scale_pos_weight |
number |
1.0 |
> 0 |
XGBRegressorChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBRegressor |
required |
|
params |
XGBRegressorParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
reg:squarederror or reg:squaredlogerror or reg:absoluteerror or reg:pseudohubererror or reg:quantileerror or count:poisson or reg:gamma or reg:tweedie |
reg:squarederror |
|
quantile_alpha |
number (optional) |
null |
|
tweedie_variance_power |
number (optional) |
null |
|
huber_slope |
number (optional) |
null |
|
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"time_dim": {
"type": "string",
"default": "time"
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer",
"index",
"none"
],
"default": "time"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "time"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "time",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "integer",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "index"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "index",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
}
]
}
sklearn.tabular_classifier
Binary classification: the probability that the target is the positive class (scikit-learn, xgboost, LightGBM or CatBoost classifiers).
|
|
| Version |
1.0.0 |
| Inference |
point |
| Representation |
point |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: scikit-learn and xgboost estimators provide no pointwise log-likelihood |
| Default plots |
core.calibration, core.roc_pr, core.confusion, ml.feature_importance |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
() |
1 |
Probability that the target equals the positive class |
contributions |
(component) |
– |
Counterfactual-zeroing contributions to the probability |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
estimator |
LinearRegressionChoice or RidgeChoice or LassoChoice or ElasticNetChoice or QuantileRegressorChoice or LogisticRegressionChoice or RandomForestRegressorChoice or RandomForestClassifierChoice or GradientBoostingRegressorChoice or HistGradientBoostingRegressorChoice or XGBRegressorChoice or XGBClassifierChoice or HistGradientBoostingClassifierChoice or LGBMClassifierChoice or CatBoostClassifierChoice |
required |
– |
|
target |
string |
y |
– |
|
rows |
list of string |
required |
– |
min items 1, max items 8 |
time_dim |
string |
time |
– |
|
time_kind |
time or integer or index or none |
time |
– |
|
columns |
ColumnsSettings |
– |
– |
|
coord_features |
map of category or onehot or ordinal or numeric |
– |
– |
|
new_levels |
pooled or zero or error |
pooled |
– |
|
pooled_max_levels |
integer |
256 |
– |
≥ 1, ≤ 10000 |
weight |
string (optional) |
null |
– |
|
mask |
string (optional) |
null |
– |
|
forecast_strategy |
direct or recursive |
direct |
– |
|
retransform |
median or smearing |
median |
– |
|
n_jobs |
integer |
1 |
– |
≥ 1, ≤ 64 |
uncertainty |
NoUncertainty |
– |
– |
|
positive_class |
number (optional) |
null |
– |
|
contributions |
none or zeroing |
none |
– |
|
Nested settings types
CatBoostClassifierChoice
| Field |
Type |
Default |
Description |
kind |
catboost.CatBoostClassifier |
required |
|
params |
CatBoostClassifierParams |
{"iterations": 500, "learning_rate": null, "depth": 6, "l2_… |
|
CatBoostClassifierParams
| Field |
Type |
Default |
Description |
iterations |
integer |
500 |
≥ 1, ≤ 10000 |
learning_rate |
number (optional) |
null |
|
depth |
integer |
6 |
≥ 1, ≤ 16 |
l2_leaf_reg |
number |
3.0 |
≥ 0 |
min_data_in_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
rsm |
number |
1.0 |
> 0, ≤ 1 |
random_strength |
number |
1.0 |
≥ 0 |
border_count |
integer |
254 |
≥ 1, ≤ 65535 |
auto_class_weights |
Balanced or SqrtBalanced (optional) |
null |
|
ColumnsSettings
Which variables become feature columns. vars (explicit list) wins over roles; exclude removes names from either. Variables with dims beyond rows are flattened into one column per label (spend[tv], promo_lag[1]).
| Field |
Type |
Default |
Description |
roles |
list of Role |
– |
max items 16 |
vars |
list of string (optional) |
null |
|
exclude |
list of string |
– |
max items 1024 |
ElasticNetChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.ElasticNet |
required |
|
params |
ElasticNetParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
ElasticNetParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
l1_ratio |
number |
0.5 |
≥ 0, ≤ 1 |
GradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.GradientBoostingRegressor |
required |
|
params |
GradientBoostingRegressorParams |
{"loss": "squared_error", "alpha": 0.9, "learning_rate": 0.… |
|
GradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or huber or quantile |
squared_error |
|
alpha |
number |
0.9 |
> 0, < 1 |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
max_depth |
integer (optional) |
3 |
|
max_features |
sqrt or log2 or number (optional) |
null |
|
n_iter_no_change |
integer (optional) |
null |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
HistGradientBoostingClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingClassifier |
required |
|
params |
HistGradientBoostingClassifierParams |
{"learning_rate": 0.1, "max_iter": 100, "max_leaf_nodes": 3… |
|
HistGradientBoostingClassifierParams
| Field |
Type |
Default |
Description |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
HistGradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingRegressor |
required |
|
params |
HistGradientBoostingRegressorParams |
{"loss": "squared_error", "quantile": null, "learning_rate"… |
|
HistGradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or gamma or poisson or quantile |
squared_error |
|
quantile |
number (optional) |
null |
|
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
LGBMClassifierChoice
| Field |
Type |
Default |
Description |
kind |
lightgbm.LGBMClassifier |
required |
|
params |
LGBMClassifierParams |
{"n_estimators": 100, "learning_rate": 0.1, "num_leaves": 3… |
|
LGBMClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
learning_rate |
number |
0.1 |
> 0, ≤ 1 |
num_leaves |
integer |
31 |
≥ 2, ≤ 131072 |
max_depth |
integer |
-1 |
≥ -1, ≤ 64 |
min_child_samples |
integer |
20 |
≥ 1, ≤ 1000000 |
min_child_weight |
number |
0.001 |
≥ 0 |
min_split_gain |
number |
0.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
subsample_freq |
integer |
0 |
≥ 0, ≤ 1000 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
0.0 |
≥ 0 |
max_bin |
integer |
255 |
≥ 2, ≤ 4096 |
class_weight |
balanced (optional) |
null |
|
LassoChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Lasso |
required |
|
params |
LassoParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
LassoParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
LinearRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LinearRegression |
required |
|
params |
LinearRegressionParams |
{"fit_intercept": true, "positive": false} |
|
LinearRegressionParams
| Field |
Type |
Default |
Description |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
LogisticRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LogisticRegression |
required |
|
params |
LogisticRegressionParams |
{"C": 1.0, "l1_ratio": 0.0, "fit_intercept": true, "solver"… |
|
LogisticRegressionParams
| Field |
Type |
Default |
Description |
C |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
l1_ratio |
number |
0.0 |
≥ 0, ≤ 1 |
fit_intercept |
boolean |
true |
|
solver |
lbfgs or liblinear or newton-cg or newton-cholesky or sag or saga |
lbfgs |
|
max_iter |
integer |
100 |
≥ 1, ≤ 100000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
NoUncertainty
Point predictions (representation point).
| Field |
Type |
Default |
Description |
kind |
none |
none |
|
QuantileRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.QuantileRegressor |
required |
|
params |
QuantileRegressorParams |
{"quantile": 0.5, "alpha": 1.0, "fit_intercept": true, "sol… |
|
QuantileRegressorParams
| Field |
Type |
Default |
Description |
quantile |
number |
0.5 |
> 0, < 1 |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
solver |
highs or highs-ds or highs-ipm |
highs |
|
RandomForestClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestClassifier |
required |
|
params |
RandomForestClassifierParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
gini or entropy or log_loss |
gini |
|
max_features |
sqrt or log2 or number (optional) |
sqrt |
|
class_weight |
balanced or balanced_subsample (optional) |
null |
|
RandomForestRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestRegressor |
required |
|
params |
RandomForestRegressorParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
squared_error or absolute_error or friedman_mse or poisson |
squared_error |
|
max_features |
sqrt or log2 or number (optional) |
1.0 |
|
RidgeChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Ridge |
required |
|
params |
RidgeParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "s… |
|
RidgeParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
solver |
auto or svd or cholesky or lsqr or sparse_cg or sag or saga or lbfgs |
auto |
|
max_iter |
integer (optional) |
null |
|
tol |
number |
0.0001 |
> 0, ≤ 1 |
Role
What a variable means to a model.
One of target, covariate, media, spend, control, index, mask, constant, weight, exposure.
XGBClassifierChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBClassifier |
required |
|
params |
XGBClassifierParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
binary:logistic |
binary:logistic |
|
scale_pos_weight |
number |
1.0 |
> 0 |
XGBRegressorChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBRegressor |
required |
|
params |
XGBRegressorParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
reg:squarederror or reg:squaredlogerror or reg:absoluteerror or reg:pseudohubererror or reg:quantileerror or count:poisson or reg:gamma or reg:tweedie |
reg:squarederror |
|
quantile_alpha |
number (optional) |
null |
|
tweedie_variance_power |
number (optional) |
null |
|
huber_slope |
number (optional) |
null |
|
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"time_dim": {
"type": "string",
"default": "time"
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer",
"index",
"none"
],
"default": "time"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "time"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "time",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "integer",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "index"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "index",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
}
]
}
Tabular regression with split-conformal prediction intervals (per-cell coverage 1 - alpha; intervals cannot be aggregated).
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
interval |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: scikit-learn and xgboost estimators provide no pointwise log-likelihood |
| Default plots |
core.fit_vs_actual, core.residuals_over_time, ml.feature_importance |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(bound) |
– |
Split-conformal prediction interval (lower, upper) and point |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
estimator |
LinearRegressionChoice or RidgeChoice or LassoChoice or ElasticNetChoice or QuantileRegressorChoice or LogisticRegressionChoice or RandomForestRegressorChoice or RandomForestClassifierChoice or GradientBoostingRegressorChoice or HistGradientBoostingRegressorChoice or XGBRegressorChoice or XGBClassifierChoice or HistGradientBoostingClassifierChoice or LGBMClassifierChoice or CatBoostClassifierChoice |
required |
– |
|
target |
string |
y |
– |
|
rows |
list of string |
required |
– |
min items 1, max items 8 |
time_dim |
string |
time |
– |
|
time_kind |
time or integer or index or none |
time |
– |
|
columns |
ColumnsSettings |
– |
– |
|
coord_features |
map of category or onehot or ordinal or numeric |
– |
– |
|
new_levels |
pooled or zero or error |
pooled |
– |
|
pooled_max_levels |
integer |
256 |
– |
≥ 1, ≤ 10000 |
weight |
string (optional) |
null |
– |
|
mask |
string (optional) |
null |
– |
|
forecast_strategy |
direct or recursive |
direct |
– |
|
retransform |
median or smearing |
median |
– |
|
n_jobs |
integer |
1 |
– |
≥ 1, ≤ 64 |
uncertainty |
ConformalUncertainty |
– |
– |
|
Nested settings types
| Field |
Type |
Default |
Description |
kind |
catboost.CatBoostClassifier |
required |
|
params |
CatBoostClassifierParams |
{"iterations": 500, "learning_rate": null, "depth": 6, "l2_… |
|
| Field |
Type |
Default |
Description |
iterations |
integer |
500 |
≥ 1, ≤ 10000 |
learning_rate |
number (optional) |
null |
|
depth |
integer |
6 |
≥ 1, ≤ 16 |
l2_leaf_reg |
number |
3.0 |
≥ 0 |
min_data_in_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
rsm |
number |
1.0 |
> 0, ≤ 1 |
random_strength |
number |
1.0 |
≥ 0 |
border_count |
integer |
254 |
≥ 1, ≤ 65535 |
auto_class_weights |
Balanced or SqrtBalanced (optional) |
null |
|
Which variables become feature columns. vars (explicit list) wins over roles; exclude removes names from either. Variables with dims beyond rows are flattened into one column per label (spend[tv], promo_lag[1]).
| Field |
Type |
Default |
Description |
roles |
list of Role |
– |
max items 16 |
vars |
list of string (optional) |
null |
|
exclude |
list of string |
– |
max items 1024 |
Split-conformal prediction intervals (representation interval, never draws). A calibration fraction of the training rows is held out (the most recent periods of time_dim for calibration_by: last, a seeded random subset for random); the interval is point ± q where q is the ceil((n+1)(1-alpha))-th smallest absolute calibration residual. refit refits the point model on all rows afterwards (sharper, but the finite-sample guarantee then only holds approximately).
| Field |
Type |
Default |
Description |
kind |
conformal |
conformal |
|
alpha |
number |
0.1 |
> 0, < 1 |
calibration |
number |
0.2 |
≥ 0.05, ≤ 0.5 |
calibration_by |
last or random |
last |
|
refit |
boolean |
false |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.ElasticNet |
required |
|
params |
ElasticNetParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
l1_ratio |
number |
0.5 |
≥ 0, ≤ 1 |
| Field |
Type |
Default |
Description |
kind |
sklearn.GradientBoostingRegressor |
required |
|
params |
GradientBoostingRegressorParams |
{"loss": "squared_error", "alpha": 0.9, "learning_rate": 0.… |
|
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or huber or quantile |
squared_error |
|
alpha |
number |
0.9 |
> 0, < 1 |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
max_depth |
integer (optional) |
3 |
|
max_features |
sqrt or log2 or number (optional) |
null |
|
n_iter_no_change |
integer (optional) |
null |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingClassifier |
required |
|
params |
HistGradientBoostingClassifierParams |
{"learning_rate": 0.1, "max_iter": 100, "max_leaf_nodes": 3… |
|
| Field |
Type |
Default |
Description |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingRegressor |
required |
|
params |
HistGradientBoostingRegressorParams |
{"loss": "squared_error", "quantile": null, "learning_rate"… |
|
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or gamma or poisson or quantile |
squared_error |
|
quantile |
number (optional) |
null |
|
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
| Field |
Type |
Default |
Description |
kind |
lightgbm.LGBMClassifier |
required |
|
params |
LGBMClassifierParams |
{"n_estimators": 100, "learning_rate": 0.1, "num_leaves": 3… |
|
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
learning_rate |
number |
0.1 |
> 0, ≤ 1 |
num_leaves |
integer |
31 |
≥ 2, ≤ 131072 |
max_depth |
integer |
-1 |
≥ -1, ≤ 64 |
min_child_samples |
integer |
20 |
≥ 1, ≤ 1000000 |
min_child_weight |
number |
0.001 |
≥ 0 |
min_split_gain |
number |
0.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
subsample_freq |
integer |
0 |
≥ 0, ≤ 1000 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
0.0 |
≥ 0 |
max_bin |
integer |
255 |
≥ 2, ≤ 4096 |
class_weight |
balanced (optional) |
null |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.Lasso |
required |
|
params |
LassoParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.LinearRegression |
required |
|
params |
LinearRegressionParams |
{"fit_intercept": true, "positive": false} |
|
| Field |
Type |
Default |
Description |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.LogisticRegression |
required |
|
params |
LogisticRegressionParams |
{"C": 1.0, "l1_ratio": 0.0, "fit_intercept": true, "solver"… |
|
| Field |
Type |
Default |
Description |
C |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
l1_ratio |
number |
0.0 |
≥ 0, ≤ 1 |
fit_intercept |
boolean |
true |
|
solver |
lbfgs or liblinear or newton-cg or newton-cholesky or sag or saga |
lbfgs |
|
max_iter |
integer |
100 |
≥ 1, ≤ 100000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.QuantileRegressor |
required |
|
params |
QuantileRegressorParams |
{"quantile": 0.5, "alpha": 1.0, "fit_intercept": true, "sol… |
|
| Field |
Type |
Default |
Description |
quantile |
number |
0.5 |
> 0, < 1 |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
solver |
highs or highs-ds or highs-ipm |
highs |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestClassifier |
required |
|
params |
RandomForestClassifierParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
gini or entropy or log_loss |
gini |
|
max_features |
sqrt or log2 or number (optional) |
sqrt |
|
class_weight |
balanced or balanced_subsample (optional) |
null |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestRegressor |
required |
|
params |
RandomForestRegressorParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
squared_error or absolute_error or friedman_mse or poisson |
squared_error |
|
max_features |
sqrt or log2 or number (optional) |
1.0 |
|
| Field |
Type |
Default |
Description |
kind |
sklearn.Ridge |
required |
|
params |
RidgeParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "s… |
|
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
solver |
auto or svd or cholesky or lsqr or sparse_cg or sag or saga or lbfgs |
auto |
|
max_iter |
integer (optional) |
null |
|
tol |
number |
0.0001 |
> 0, ≤ 1 |
What a variable means to a model.
One of target, covariate, media, spend, control, index, mask, constant, weight, exposure.
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBClassifier |
required |
|
params |
XGBClassifierParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
binary:logistic |
binary:logistic |
|
scale_pos_weight |
number |
1.0 |
> 0 |
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBRegressor |
required |
|
params |
XGBRegressorParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
reg:squarederror or reg:squaredlogerror or reg:absoluteerror or reg:pseudohubererror or reg:quantileerror or count:poisson or reg:gamma or reg:tweedie |
reg:squarederror |
|
quantile_alpha |
number (optional) |
null |
|
tweedie_variance_power |
number (optional) |
null |
|
huber_slope |
number (optional) |
null |
|
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"time_dim": {
"type": "string",
"default": "time"
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer",
"index",
"none"
],
"default": "time"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "time"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "time",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "integer",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "index"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "index",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
}
]
}
sklearn.tabular_quantiles
Tabular quantile regression: native xgboost multi-quantile or one quantile model per level; quantiles are per cell and cannot be aggregated.
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
quantiles |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: scikit-learn and xgboost estimators provide no pointwise log-likelihood |
| Default plots |
core.fit_vs_actual, core.residuals_over_time, ml.feature_importance |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(quantile) |
– |
Conditional quantiles of the target over the row dims |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
estimator |
LinearRegressionChoice or RidgeChoice or LassoChoice or ElasticNetChoice or QuantileRegressorChoice or LogisticRegressionChoice or RandomForestRegressorChoice or RandomForestClassifierChoice or GradientBoostingRegressorChoice or HistGradientBoostingRegressorChoice or XGBRegressorChoice or XGBClassifierChoice or HistGradientBoostingClassifierChoice or LGBMClassifierChoice or CatBoostClassifierChoice |
required |
– |
|
target |
string |
y |
– |
|
rows |
list of string |
required |
– |
min items 1, max items 8 |
time_dim |
string |
time |
– |
|
time_kind |
time or integer or index or none |
time |
– |
|
columns |
ColumnsSettings |
– |
– |
|
coord_features |
map of category or onehot or ordinal or numeric |
– |
– |
|
new_levels |
pooled or zero or error |
pooled |
– |
|
pooled_max_levels |
integer |
256 |
– |
≥ 1, ≤ 10000 |
weight |
string (optional) |
null |
– |
|
mask |
string (optional) |
null |
– |
|
forecast_strategy |
direct or recursive |
direct |
– |
|
retransform |
median or smearing |
median |
– |
|
n_jobs |
integer |
1 |
– |
≥ 1, ≤ 64 |
uncertainty |
QuantileUncertainty |
– |
– |
|
Nested settings types
CatBoostClassifierChoice
| Field |
Type |
Default |
Description |
kind |
catboost.CatBoostClassifier |
required |
|
params |
CatBoostClassifierParams |
{"iterations": 500, "learning_rate": null, "depth": 6, "l2_… |
|
CatBoostClassifierParams
| Field |
Type |
Default |
Description |
iterations |
integer |
500 |
≥ 1, ≤ 10000 |
learning_rate |
number (optional) |
null |
|
depth |
integer |
6 |
≥ 1, ≤ 16 |
l2_leaf_reg |
number |
3.0 |
≥ 0 |
min_data_in_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
rsm |
number |
1.0 |
> 0, ≤ 1 |
random_strength |
number |
1.0 |
≥ 0 |
border_count |
integer |
254 |
≥ 1, ≤ 65535 |
auto_class_weights |
Balanced or SqrtBalanced (optional) |
null |
|
ColumnsSettings
Which variables become feature columns. vars (explicit list) wins over roles; exclude removes names from either. Variables with dims beyond rows are flattened into one column per label (spend[tv], promo_lag[1]).
| Field |
Type |
Default |
Description |
roles |
list of Role |
– |
max items 16 |
vars |
list of string (optional) |
null |
|
exclude |
list of string |
– |
max items 1024 |
ElasticNetChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.ElasticNet |
required |
|
params |
ElasticNetParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
ElasticNetParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
l1_ratio |
number |
0.5 |
≥ 0, ≤ 1 |
GradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.GradientBoostingRegressor |
required |
|
params |
GradientBoostingRegressorParams |
{"loss": "squared_error", "alpha": 0.9, "learning_rate": 0.… |
|
GradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or huber or quantile |
squared_error |
|
alpha |
number |
0.9 |
> 0, < 1 |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
max_depth |
integer (optional) |
3 |
|
max_features |
sqrt or log2 or number (optional) |
null |
|
n_iter_no_change |
integer (optional) |
null |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
HistGradientBoostingClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingClassifier |
required |
|
params |
HistGradientBoostingClassifierParams |
{"learning_rate": 0.1, "max_iter": 100, "max_leaf_nodes": 3… |
|
HistGradientBoostingClassifierParams
| Field |
Type |
Default |
Description |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
HistGradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingRegressor |
required |
|
params |
HistGradientBoostingRegressorParams |
{"loss": "squared_error", "quantile": null, "learning_rate"… |
|
HistGradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or gamma or poisson or quantile |
squared_error |
|
quantile |
number (optional) |
null |
|
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
LGBMClassifierChoice
| Field |
Type |
Default |
Description |
kind |
lightgbm.LGBMClassifier |
required |
|
params |
LGBMClassifierParams |
{"n_estimators": 100, "learning_rate": 0.1, "num_leaves": 3… |
|
LGBMClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
learning_rate |
number |
0.1 |
> 0, ≤ 1 |
num_leaves |
integer |
31 |
≥ 2, ≤ 131072 |
max_depth |
integer |
-1 |
≥ -1, ≤ 64 |
min_child_samples |
integer |
20 |
≥ 1, ≤ 1000000 |
min_child_weight |
number |
0.001 |
≥ 0 |
min_split_gain |
number |
0.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
subsample_freq |
integer |
0 |
≥ 0, ≤ 1000 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
0.0 |
≥ 0 |
max_bin |
integer |
255 |
≥ 2, ≤ 4096 |
class_weight |
balanced (optional) |
null |
|
LassoChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Lasso |
required |
|
params |
LassoParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
LassoParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
LinearRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LinearRegression |
required |
|
params |
LinearRegressionParams |
{"fit_intercept": true, "positive": false} |
|
LinearRegressionParams
| Field |
Type |
Default |
Description |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
LogisticRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LogisticRegression |
required |
|
params |
LogisticRegressionParams |
{"C": 1.0, "l1_ratio": 0.0, "fit_intercept": true, "solver"… |
|
LogisticRegressionParams
| Field |
Type |
Default |
Description |
C |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
l1_ratio |
number |
0.0 |
≥ 0, ≤ 1 |
fit_intercept |
boolean |
true |
|
solver |
lbfgs or liblinear or newton-cg or newton-cholesky or sag or saga |
lbfgs |
|
max_iter |
integer |
100 |
≥ 1, ≤ 100000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
QuantileRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.QuantileRegressor |
required |
|
params |
QuantileRegressorParams |
{"quantile": 0.5, "alpha": 1.0, "fit_intercept": true, "sol… |
|
QuantileRegressorParams
| Field |
Type |
Default |
Description |
quantile |
number |
0.5 |
> 0, < 1 |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
solver |
highs or highs-ds or highs-ipm |
highs |
|
QuantileUncertainty
Conditional quantiles (representation quantiles). xgboost fits one native multi-quantile model; sklearn's quantile-capable estimators fit one model per level. rearrange sorts crossing quantiles per cell (monotone rearrangement), which never makes the pinball loss worse.
| Field |
Type |
Default |
Description |
kind |
quantile |
quantile |
|
quantiles |
list of number |
– |
min items 1, max items 99 |
rearrange |
boolean |
true |
|
RandomForestClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestClassifier |
required |
|
params |
RandomForestClassifierParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
gini or entropy or log_loss |
gini |
|
max_features |
sqrt or log2 or number (optional) |
sqrt |
|
class_weight |
balanced or balanced_subsample (optional) |
null |
|
RandomForestRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestRegressor |
required |
|
params |
RandomForestRegressorParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
squared_error or absolute_error or friedman_mse or poisson |
squared_error |
|
max_features |
sqrt or log2 or number (optional) |
1.0 |
|
RidgeChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Ridge |
required |
|
params |
RidgeParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "s… |
|
RidgeParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
solver |
auto or svd or cholesky or lsqr or sparse_cg or sag or saga or lbfgs |
auto |
|
max_iter |
integer (optional) |
null |
|
tol |
number |
0.0001 |
> 0, ≤ 1 |
Role
What a variable means to a model.
One of target, covariate, media, spend, control, index, mask, constant, weight, exposure.
XGBClassifierChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBClassifier |
required |
|
params |
XGBClassifierParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
binary:logistic |
binary:logistic |
|
scale_pos_weight |
number |
1.0 |
> 0 |
XGBRegressorChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBRegressor |
required |
|
params |
XGBRegressorParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
reg:squarederror or reg:squaredlogerror or reg:absoluteerror or reg:pseudohubererror or reg:quantileerror or count:poisson or reg:gamma or reg:tweedie |
reg:squarederror |
|
quantile_alpha |
number (optional) |
null |
|
tweedie_variance_power |
number (optional) |
null |
|
huber_slope |
number (optional) |
null |
|
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"time_dim": {
"type": "string",
"default": "time"
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer",
"index",
"none"
],
"default": "time"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "time"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "time",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "integer",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "index"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "index",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
}
]
}
sklearn.tabular_regressor
Tabular regression with an allow-listed scikit-learn or xgboost estimator: rows are stacked from labelled dims, predictions are point estimates (with exact linear or counterfactual-zeroing contributions).
|
|
| Version |
1.0.0 |
| Inference |
point |
| Representation |
point |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: scikit-learn and xgboost estimators provide no pointwise log-likelihood |
| Default plots |
core.fit_vs_actual, core.residuals_over_time, ml.feature_importance |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
() |
– |
Prediction of the target over the row dims (settings.rows) |
contributions |
(component) |
– |
Per-feature contributions (exact for linear estimators, counterfactual zeroing otherwise), in model space |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
estimator |
LinearRegressionChoice or RidgeChoice or LassoChoice or ElasticNetChoice or QuantileRegressorChoice or LogisticRegressionChoice or RandomForestRegressorChoice or RandomForestClassifierChoice or GradientBoostingRegressorChoice or HistGradientBoostingRegressorChoice or XGBRegressorChoice or XGBClassifierChoice or HistGradientBoostingClassifierChoice or LGBMClassifierChoice or CatBoostClassifierChoice |
required |
– |
|
target |
string |
y |
– |
|
rows |
list of string |
required |
– |
min items 1, max items 8 |
time_dim |
string |
time |
– |
|
time_kind |
time or integer or index or none |
time |
– |
|
columns |
ColumnsSettings |
– |
– |
|
coord_features |
map of category or onehot or ordinal or numeric |
– |
– |
|
new_levels |
pooled or zero or error |
pooled |
– |
|
pooled_max_levels |
integer |
256 |
– |
≥ 1, ≤ 10000 |
weight |
string (optional) |
null |
– |
|
mask |
string (optional) |
null |
– |
|
forecast_strategy |
direct or recursive |
direct |
– |
|
retransform |
median or smearing |
median |
– |
|
n_jobs |
integer |
1 |
– |
≥ 1, ≤ 64 |
uncertainty |
NoUncertainty |
– |
– |
|
contributions |
none or auto or exact or zeroing |
auto |
– |
|
Nested settings types
CatBoostClassifierChoice
| Field |
Type |
Default |
Description |
kind |
catboost.CatBoostClassifier |
required |
|
params |
CatBoostClassifierParams |
{"iterations": 500, "learning_rate": null, "depth": 6, "l2_… |
|
CatBoostClassifierParams
| Field |
Type |
Default |
Description |
iterations |
integer |
500 |
≥ 1, ≤ 10000 |
learning_rate |
number (optional) |
null |
|
depth |
integer |
6 |
≥ 1, ≤ 16 |
l2_leaf_reg |
number |
3.0 |
≥ 0 |
min_data_in_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
rsm |
number |
1.0 |
> 0, ≤ 1 |
random_strength |
number |
1.0 |
≥ 0 |
border_count |
integer |
254 |
≥ 1, ≤ 65535 |
auto_class_weights |
Balanced or SqrtBalanced (optional) |
null |
|
ColumnsSettings
Which variables become feature columns. vars (explicit list) wins over roles; exclude removes names from either. Variables with dims beyond rows are flattened into one column per label (spend[tv], promo_lag[1]).
| Field |
Type |
Default |
Description |
roles |
list of Role |
– |
max items 16 |
vars |
list of string (optional) |
null |
|
exclude |
list of string |
– |
max items 1024 |
ElasticNetChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.ElasticNet |
required |
|
params |
ElasticNetParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
ElasticNetParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
l1_ratio |
number |
0.5 |
≥ 0, ≤ 1 |
GradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.GradientBoostingRegressor |
required |
|
params |
GradientBoostingRegressorParams |
{"loss": "squared_error", "alpha": 0.9, "learning_rate": 0.… |
|
GradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or huber or quantile |
squared_error |
|
alpha |
number |
0.9 |
> 0, < 1 |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
max_depth |
integer (optional) |
3 |
|
max_features |
sqrt or log2 or number (optional) |
null |
|
n_iter_no_change |
integer (optional) |
null |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
HistGradientBoostingClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingClassifier |
required |
|
params |
HistGradientBoostingClassifierParams |
{"learning_rate": 0.1, "max_iter": 100, "max_leaf_nodes": 3… |
|
HistGradientBoostingClassifierParams
| Field |
Type |
Default |
Description |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
HistGradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingRegressor |
required |
|
params |
HistGradientBoostingRegressorParams |
{"loss": "squared_error", "quantile": null, "learning_rate"… |
|
HistGradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or gamma or poisson or quantile |
squared_error |
|
quantile |
number (optional) |
null |
|
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
LGBMClassifierChoice
| Field |
Type |
Default |
Description |
kind |
lightgbm.LGBMClassifier |
required |
|
params |
LGBMClassifierParams |
{"n_estimators": 100, "learning_rate": 0.1, "num_leaves": 3… |
|
LGBMClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
learning_rate |
number |
0.1 |
> 0, ≤ 1 |
num_leaves |
integer |
31 |
≥ 2, ≤ 131072 |
max_depth |
integer |
-1 |
≥ -1, ≤ 64 |
min_child_samples |
integer |
20 |
≥ 1, ≤ 1000000 |
min_child_weight |
number |
0.001 |
≥ 0 |
min_split_gain |
number |
0.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
subsample_freq |
integer |
0 |
≥ 0, ≤ 1000 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
0.0 |
≥ 0 |
max_bin |
integer |
255 |
≥ 2, ≤ 4096 |
class_weight |
balanced (optional) |
null |
|
LassoChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Lasso |
required |
|
params |
LassoParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "m… |
|
LassoParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
max_iter |
integer |
1000 |
≥ 1, ≤ 1000000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
selection |
cyclic or random |
cyclic |
|
LinearRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LinearRegression |
required |
|
params |
LinearRegressionParams |
{"fit_intercept": true, "positive": false} |
|
LinearRegressionParams
| Field |
Type |
Default |
Description |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
LogisticRegressionChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.LogisticRegression |
required |
|
params |
LogisticRegressionParams |
{"C": 1.0, "l1_ratio": 0.0, "fit_intercept": true, "solver"… |
|
LogisticRegressionParams
| Field |
Type |
Default |
Description |
C |
number |
1.0 |
> 0, ≤ 1000000000000.0 |
l1_ratio |
number |
0.0 |
≥ 0, ≤ 1 |
fit_intercept |
boolean |
true |
|
solver |
lbfgs or liblinear or newton-cg or newton-cholesky or sag or saga |
lbfgs |
|
max_iter |
integer |
100 |
≥ 1, ≤ 100000 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
class_weight |
balanced (optional) |
null |
|
NoUncertainty
Point predictions (representation point).
| Field |
Type |
Default |
Description |
kind |
none |
none |
|
QuantileRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.QuantileRegressor |
required |
|
params |
QuantileRegressorParams |
{"quantile": 0.5, "alpha": 1.0, "fit_intercept": true, "sol… |
|
QuantileRegressorParams
| Field |
Type |
Default |
Description |
quantile |
number |
0.5 |
> 0, < 1 |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
solver |
highs or highs-ds or highs-ipm |
highs |
|
RandomForestClassifierChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestClassifier |
required |
|
params |
RandomForestClassifierParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
gini or entropy or log_loss |
gini |
|
max_features |
sqrt or log2 or number (optional) |
sqrt |
|
class_weight |
balanced or balanced_subsample (optional) |
null |
|
RandomForestRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.RandomForestRegressor |
required |
|
params |
RandomForestRegressorParams |
{"n_estimators": 100, "max_depth": null, "min_samples_split… |
|
RandomForestRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 5000 |
max_depth |
integer (optional) |
null |
|
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
bootstrap |
boolean |
true |
|
max_samples |
number (optional) |
null |
|
min_impurity_decrease |
number |
0.0 |
≥ 0 |
ccp_alpha |
number |
0.0 |
≥ 0 |
criterion |
squared_error or absolute_error or friedman_mse or poisson |
squared_error |
|
max_features |
sqrt or log2 or number (optional) |
1.0 |
|
RidgeChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.Ridge |
required |
|
params |
RidgeParams |
{"alpha": 1.0, "fit_intercept": true, "positive": false, "s… |
|
RidgeParams
| Field |
Type |
Default |
Description |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
positive |
boolean |
false |
|
solver |
auto or svd or cholesky or lsqr or sparse_cg or sag or saga or lbfgs |
auto |
|
max_iter |
integer (optional) |
null |
|
tol |
number |
0.0001 |
> 0, ≤ 1 |
Role
What a variable means to a model.
One of target, covariate, media, spend, control, index, mask, constant, weight, exposure.
XGBClassifierChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBClassifier |
required |
|
params |
XGBClassifierParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBClassifierParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
binary:logistic |
binary:logistic |
|
scale_pos_weight |
number |
1.0 |
> 0 |
XGBRegressorChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBRegressor |
required |
|
params |
XGBRegressorParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
reg:squarederror or reg:squaredlogerror or reg:absoluteerror or reg:pseudohubererror or reg:quantileerror or count:poisson or reg:gamma or reg:tweedie |
reg:squarederror |
|
quantile_alpha |
number (optional) |
null |
|
tweedie_variance_power |
number (optional) |
null |
|
huber_slope |
number (optional) |
null |
|
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"time_dim": {
"type": "string",
"default": "time"
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer",
"index",
"none"
],
"default": "time"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "time"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "time",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "integer",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "index"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "index",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
}
]
}
tabular.hierarchical_glm
A hierarchical generalised linear model in long layout: group intercepts (and optional slopes) partially pooled towards a population mean that may depend on group-level covariates. Unseen groups are drawn from the fitted hyperprior.
|
|
| Version |
1.1.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
counterfactual, evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.ppc, core.convergence, core.posterior_forest |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(obs) |
of y |
Expected response (mean) or a predictive draw per observation |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
group_dim |
string |
county |
– |
The grouping dim (index var: _idx) |
family |
normal or student_t or poisson or bernoulli or negative_binomial or zero_inflated_poisson or zero_inflated_negative_binomi… or beta or gamma or ordinal |
normal |
– |
Likelihood family (its canonical link) |
covariates |
list of string |
[] |
– |
Observation-level predictors over obs (max items 256) |
varying_slopes |
list of string |
[] |
– |
Covariates whose slope varies by group (max items 32) |
group_covariates |
list of string |
[] |
– |
Group-level predictors of the group intercept (max items 64) |
centered |
boolean |
false |
– |
Centred group effects (non-centred default) |
intercept_sigma |
number |
2.0 |
– |
Prior sd of the population intercept (> 0) |
group_sigma_scale |
number |
1.0 |
– |
Half-normal scale of group sds (> 0) |
beta_sigma |
number |
1.0 |
– |
Prior sd of the population slopes (> 0) |
noise_sigma |
number |
1.0 |
– |
Half-normal scale of the noise sd (> 0) |
n_categories |
integer (optional) |
null |
– |
Number of ordered categories (ordinal family only) |
Input data contract (schema template)
{
"params": {
"group_dim": {
"type": "string",
"default": "county"
},
"covariates": {
"type": "string_list",
"default": []
},
"group_covariates": {
"type": "string_list",
"default": []
}
},
"template": {
"layout": "long",
"dims": {
"obs": {
"kind": "integer",
"policy": "extend"
},
"{group_dim}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "hyperprior"
}
},
"vars": {
"y": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "target"
},
"{group_dim}_idx": {
"dims": [
"obs"
],
"dtype": "int64",
"role": "index",
"index_of": "{group_dim}"
},
"{*covariates as v}": {
"dims": [
"obs"
],
"dtype": "float64",
"role": "covariate"
},
"{*group_covariates as v}": {
"dims": [
"{group_dim}"
],
"dtype": "float64",
"role": "covariate"
}
}
}
}
tabular.image_logistic
A Bayesian multinomial logistic regression for small images of the same size: principal component scores (or block means) of the pixels predict the class, with zero-sum normal priors on the class weights.
|
|
| Version |
1.1.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: the model stores no pointwise log-likelihood |
| Default plots |
core.roc_pr, core.confusion, core.convergence |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(class) |
1 |
Probability of each class per image (sums to 1 over class) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
pixels |
string |
pixels |
– |
The image variable (image, y, x, channel) |
target |
string |
label |
– |
The class label of each image |
image_dim |
string |
image |
– |
The dim that lists the images |
features |
pca or pixels |
pca |
– |
pca: principal component scores; pixels: the block means |
n_components |
integer |
16 |
– |
PCA components (features: pca) (≥ 2, ≤ 64) |
downsample |
integer |
1 |
– |
Block size of the mean over y and x (≥ 1, ≤ 16) |
max_features |
integer |
256 |
– |
features: pixels: the most block means allowed (≥ 4, ≤ 1024) |
prior_sigma |
number |
1.0 |
– |
Prior sd of the class weights (> 0, ≤ 10) |
class_order |
list of string (optional) |
null |
– |
The classes in order (default: sorted) |
input |
pixels or features |
pixels |
– |
pixels: an image variable (image, y, x, channel); features: image features (image, feature_dim), for example from the dl.embed step |
feature_dim |
string |
feature |
– |
input: features: the dim of the features |
Input data contract (schema template)
{
"params": {
"pixels": {
"type": "string",
"default": "pixels"
},
"target": {
"type": "string",
"default": "label"
},
"image_dim": {
"type": "string",
"default": "image"
},
"input": {
"type": "string",
"enum": [
"pixels",
"features"
],
"default": "pixels"
},
"feature_dim": {
"type": "string",
"default": "feature"
}
},
"template": {
"dims": {
"{image_dim}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "pooled"
}
},
"vars": {
"{target}": {
"dims": [
"{image_dim}"
],
"dtype": "str",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"input": "pixels"
},
"merge": {
"dims": {
"y": {
"kind": "integer",
"policy": "fixed"
},
"x": {
"kind": "integer",
"policy": "fixed"
},
"channel": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"{pixels}": {
"dims": [
"{image_dim}",
"y",
"x",
"channel"
],
"dtype": "uint8",
"role": "covariate"
}
}
}
},
{
"when": {
"input": "features"
},
"merge": {
"dims": {
"{feature_dim}": {
"kind": "integer",
"policy": "fixed"
}
},
"vars": {
"{pixels}": {
"dims": [
"{image_dim}",
"{feature_dim}"
],
"dtype": "float32",
"role": "covariate"
}
}
}
}
]
}
tabular.regressor
Tabular quantile regression for panels such as store x sku x week demand: rows are stacked from labelled dims, coordinates become categorical features, new levels are pooled and forecasts are direct. Quantiles are per cell and never aggregated.
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
quantiles |
| Score modes |
counterfactual, evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: scikit-learn and xgboost estimators provide no pointwise log-likelihood |
| Default plots |
core.fit_vs_actual, core.residuals_over_time, ml.feature_importance |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(quantile) |
– |
Conditional quantiles of the target over the row dims |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
estimator |
XGBRegressorChoice or HistGradientBoostingRegressorChoice or GradientBoostingRegressorChoice or QuantileRegressorChoice |
{"kind": "xgboost.XGBRegressor", "params": {"colsample_byle… |
– |
A quantile-capable estimator from the allow-listed registry |
target |
string |
y |
– |
|
rows |
list of string |
required |
– |
min items 1, max items 8 |
time_dim |
string |
time |
– |
|
time_kind |
time or integer or index or none |
time |
– |
|
columns |
ColumnsSettings |
– |
– |
|
coord_features |
map of category or onehot or ordinal or numeric |
– |
– |
|
new_levels |
pooled or zero or error |
pooled |
– |
|
pooled_max_levels |
integer |
256 |
– |
≥ 1, ≤ 10000 |
weight |
string (optional) |
null |
– |
|
mask |
string (optional) |
null |
– |
|
forecast_strategy |
direct or recursive |
direct |
– |
|
retransform |
median or smearing |
median |
– |
|
n_jobs |
integer |
1 |
– |
≥ 1, ≤ 64 |
uncertainty |
QuantileUncertainty |
{"kind": "quantile", "quantiles": [0.1, 0.5, 0.9], "rearran… |
– |
Quantile levels (the default gives an 80% band around the median) |
Nested settings types
ColumnsSettings
Which variables become feature columns. vars (explicit list) wins over roles; exclude removes names from either. Variables with dims beyond rows are flattened into one column per label (spend[tv], promo_lag[1]).
| Field |
Type |
Default |
Description |
roles |
list of Role |
– |
max items 16 |
vars |
list of string (optional) |
null |
|
exclude |
list of string |
– |
max items 1024 |
GradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.GradientBoostingRegressor |
required |
|
params |
GradientBoostingRegressorParams |
{"loss": "squared_error", "alpha": 0.9, "learning_rate": 0.… |
|
GradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or huber or quantile |
squared_error |
|
alpha |
number |
0.9 |
> 0, < 1 |
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
min_samples_split |
integer |
2 |
≥ 2, ≤ 1000000 |
min_samples_leaf |
integer |
1 |
≥ 1, ≤ 1000000 |
max_depth |
integer (optional) |
3 |
|
max_features |
sqrt or log2 or number (optional) |
null |
|
n_iter_no_change |
integer (optional) |
null |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
tol |
number |
0.0001 |
> 0, ≤ 1 |
HistGradientBoostingRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.HistGradientBoostingRegressor |
required |
|
params |
HistGradientBoostingRegressorParams |
{"loss": "squared_error", "quantile": null, "learning_rate"… |
|
HistGradientBoostingRegressorParams
| Field |
Type |
Default |
Description |
loss |
squared_error or absolute_error or gamma or poisson or quantile |
squared_error |
|
quantile |
number (optional) |
null |
|
learning_rate |
number |
0.1 |
> 0, ≤ 10 |
max_iter |
integer |
100 |
≥ 1, ≤ 10000 |
max_leaf_nodes |
integer (optional) |
31 |
|
max_depth |
integer (optional) |
null |
|
min_samples_leaf |
integer |
20 |
≥ 1, ≤ 1000000 |
l2_regularization |
number |
0.0 |
≥ 0 |
max_features |
number |
1.0 |
> 0, ≤ 1 |
max_bins |
integer |
255 |
≥ 2, ≤ 255 |
early_stopping |
boolean |
false |
|
validation_fraction |
number |
0.1 |
> 0, < 1 |
n_iter_no_change |
integer |
10 |
≥ 1, ≤ 10000 |
tol |
number |
1e-07 |
≥ 0, ≤ 1 |
QuantileRegressorChoice
| Field |
Type |
Default |
Description |
kind |
sklearn.QuantileRegressor |
required |
|
params |
QuantileRegressorParams |
{"quantile": 0.5, "alpha": 1.0, "fit_intercept": true, "sol… |
|
QuantileRegressorParams
| Field |
Type |
Default |
Description |
quantile |
number |
0.5 |
> 0, < 1 |
alpha |
number |
1.0 |
≥ 0, ≤ 1000000000000.0 |
fit_intercept |
boolean |
true |
|
solver |
highs or highs-ds or highs-ipm |
highs |
|
QuantileUncertainty
Conditional quantiles (representation quantiles). xgboost fits one native multi-quantile model; sklearn's quantile-capable estimators fit one model per level. rearrange sorts crossing quantiles per cell (monotone rearrangement), which never makes the pinball loss worse.
| Field |
Type |
Default |
Description |
kind |
quantile |
quantile |
|
quantiles |
list of number |
– |
min items 1, max items 99 |
rearrange |
boolean |
true |
|
Role
What a variable means to a model.
One of target, covariate, media, spend, control, index, mask, constant, weight, exposure.
XGBRegressorChoice
| Field |
Type |
Default |
Description |
kind |
xgboost.XGBRegressor |
required |
|
params |
XGBRegressorParams |
{"n_estimators": 100, "max_depth": 6, "learning_rate": 0.3,… |
|
XGBRegressorParams
| Field |
Type |
Default |
Description |
n_estimators |
integer |
100 |
≥ 1, ≤ 10000 |
max_depth |
integer |
6 |
≥ 0, ≤ 64 |
learning_rate |
number |
0.3 |
> 0, ≤ 1 |
min_child_weight |
number |
1.0 |
≥ 0 |
subsample |
number |
1.0 |
> 0, ≤ 1 |
colsample_bytree |
number |
1.0 |
> 0, ≤ 1 |
colsample_bylevel |
number |
1.0 |
> 0, ≤ 1 |
colsample_bynode |
number |
1.0 |
> 0, ≤ 1 |
reg_alpha |
number |
0.0 |
≥ 0 |
reg_lambda |
number |
1.0 |
≥ 0 |
gamma |
number |
0.0 |
≥ 0 |
max_bin |
integer |
256 |
≥ 2, ≤ 4096 |
tree_method |
hist or approx or exact |
hist |
|
grow_policy |
depthwise or lossguide |
depthwise |
|
max_leaves |
integer |
0 |
≥ 0, ≤ 1000000 |
max_cat_to_onehot |
integer (optional) |
null |
|
objective |
reg:squarederror or reg:squaredlogerror or reg:absoluteerror or reg:pseudohubererror or reg:quantileerror or count:poisson or reg:gamma or reg:tweedie |
reg:squarederror |
|
quantile_alpha |
number (optional) |
null |
|
tweedie_variance_power |
number (optional) |
null |
|
huber_slope |
number (optional) |
null |
|
Input data contract (schema template)
{
"params": {
"target": {
"type": "string",
"default": "y"
},
"rows": {
"type": "string_list",
"required": true
},
"time_dim": {
"type": "string",
"default": "time"
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer",
"index",
"none"
],
"default": "time"
},
"new_levels": {
"type": "string",
"enum": [
"pooled",
"zero",
"error"
],
"default": "pooled"
}
},
"template": {
"dims": {
"{*rows as d}": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "{new_levels}"
}
},
"vars": {
"{target}": {
"dims": "{rows}",
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "time"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "time",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "integer",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
},
{
"when": {
"time_kind": "index"
},
"merge": {
"dims": {
"{time_dim}": {
"kind": "index",
"policy": "extend",
"new_level_strategy": "error"
}
}
}
}
]
}
ts.ardl
statsmodels ARDL: the result regressed on its own lags and current and past values of drivers by least squares; optional lag selection by information criterion; one model per series of a panel; forecasts need future drivers.
|
|
| Version |
1.0.0 |
| Inference |
point |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
required |
basic |
Driver variables (at least one); their future values are needed for forecasts (min items 1, max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
lags |
integer |
1 |
– |
Past values of the result to use (≥ 0, ≤ 12) |
order |
integer |
1 |
– |
Past values of each driver to use (0 = same period only) (≥ 0, ≤ 12) |
trend |
n or c or t or ct |
c |
– |
n none, c constant, t trend, ct both |
auto |
boolean |
false |
– |
Choose lags and driver orders per series by an information criterion (up to lags/order) |
ic |
aic or bic or hqic |
aic |
– |
Criterion for auto |
causal |
boolean |
false |
advanced |
Use only past values of the drivers (no same-period effect) |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.arima
statsmodels ARIMA(p,d,q)(P,D,Q)s without drivers (state-space form, exact likelihood); one model per series of a panel; prediction intervals as quantiles.
|
|
| Version |
1.0.0 |
| Inference |
kalman |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
maxiter |
integer |
200 |
advanced |
Optimiser iterations (≥ 10, ≤ 5000) |
method |
lbfgs or bfgs or powell or nm |
lbfgs |
advanced |
Likelihood optimiser |
order |
list of any |
[1, 0, 0] |
basic |
(p, d, q): past values used (AR), times differenced (d), past errors used (MA) (min items 3, max items 3) |
seasonal_order |
list of any |
[0, 0, 0, 0] |
basic |
(P, D, Q, s): the same for the seasonal pattern repeating every s periods (min items 4, max items 4) |
trend |
auto or n or c or t or ct |
auto |
– |
Deterministic trend: n none, c constant, t linear, ct both; auto uses a constant when the series is not differenced |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.bsts
A Bayesian structural time series: a trend, seasonal patterns and drivers, fitted with the Kalman filter of pymc-extras. Forecasts and filters start from the stored terminal state.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, filter, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
scaling |
| LOO |
invalid: the Kalman likelihood is a sum over the whole series; steps depend on each other, so pointwise leave-one-out is not defined |
| Default plots |
core.ppc_fan, core.decomposition, core.convergence, core.posterior_forest |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Expected value or predictive draw: one-step-ahead inside the fitted range, a forecast after it |
level |
(t) |
of y |
The trend and level component (expected) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
trend |
level or local_linear or smooth |
local_linear |
basic |
level: a level that wanders; local_linear: a level and a slope that both wander; smooth: a slope that wanders slowly (a smooth trend) |
seasonality |
list of SeasonSettings |
– |
basic |
Seasonal patterns (at most three) (max items 3) |
level_sigma |
number |
0.1 |
– |
Half-normal scale of level changes (> 0, ≤ 5) |
slope_sigma |
number |
0.02 |
– |
Half-normal scale of slope changes (> 0, ≤ 5) |
obs_sigma |
number |
0.5 |
– |
Half-normal scale of the noise (> 0, ≤ 10) |
initial_sd |
number |
1.0 |
– |
Prior sd of the initial states and seasonal effects (> 0, ≤ 10) |
regression_prior |
normal or horseshoe |
normal |
– |
normal: every driver has an effect; horseshoe: most drivers have none |
regression_sigma |
number |
1.0 |
– |
Prior scale of the driver effects (standardised) (> 0, ≤ 10) |
regressors |
list of string |
– |
basic |
Driver variables (prices, promotions) whose future values are supplied for forecasts (max items 32) |
Nested settings types
SeasonSettings
One seasonal pattern.
| Field |
Type |
Default |
Description |
period |
number |
required |
Length of the cycle in periods of the time dim (12 for monthly data with a yearly cycle, 52.18 for weekly data, 7 for daily data) (> 1, ≤ 1000) |
harmonics |
integer (optional) |
null |
Number of sine/cosine pairs. Empty: one effect per season (needs a whole-number period of at most 24) |
stochastic |
boolean |
false |
Let the seasonal pattern change over time |
sigma |
number |
0.05 |
Half-normal scale of the seasonal changes (standardised) (> 0, ≤ 5) |
Input data contract (schema template)
{
"params": {
"regressors": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
}
},
"vars": {
"y": {
"dims": [
"t"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
},
"{*regressors as x}": {
"dims": [
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
}
}
ts.dynamic_factor
statsmodels DynamicFactor: a few latent factors following a VAR drive many series; estimated by maximum likelihood in state-space form; stores the smoothed factors. Standardise the series first (core.standardize).
|
|
| Version |
1.0.0 |
| Inference |
kalman |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
– |
basic |
Driver variables (prices, promotions, holidays) whose future values are supplied for forecasts (max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
maxiter |
integer |
200 |
advanced |
Optimiser iterations (≥ 10, ≤ 5000) |
method |
lbfgs or bfgs or powell or nm |
lbfgs |
advanced |
Likelihood optimiser |
k_factors |
integer |
1 |
– |
Number of hidden common factors (≥ 1, ≤ 5) |
factor_order |
integer |
1 |
– |
Lags in the factors' own dynamics (≥ 0, ≤ 4) |
error_order |
integer |
0 |
– |
Lags in each series' own noise (≥ 0, ≤ 2) |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
},
"variable": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"variable",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.ecm
Single-equation error-correction model: an ARDL in levels reparameterised as an unrestricted ECM (statsmodels UECM) with long-run coefficients, the speed of adjustment and the Pesaran-Shin-Smith bounds test; forecasts need future drivers.
|
|
| Version |
1.0.0 |
| Inference |
point |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
required |
basic |
Driver variables (at least one); their future values are needed for forecasts (min items 1, max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
lags |
integer |
1 |
– |
Past values of the result in the levels ARDL (≥ 1, ≤ 12) |
order |
integer |
1 |
– |
Past values of each driver in the levels ARDL (≥ 1, ≤ 12) |
trend |
n or c or ct |
c |
– |
n none, c constant (bounds case 3), ct constant and trend (case 5) |
bounds_case |
1 or 2 or 3 or 4 or 5 (optional) |
null |
advanced |
Pesaran-Shin-Smith case of the bounds test (default from the trend) |
bounds_alpha |
number |
0.05 |
– |
Significance of the bounds test (> 0, < 0.5) |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.ets
statsmodels ETSModel: exponential smoothing with additive or multiplicative error, trend (optionally damped) and season, estimated by maximum likelihood; one model per series of a panel; closed-form or simulated prediction intervals as quantiles.
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time, core.decomposition |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
error |
add or mul |
add |
– |
Error: additive (add) or multiplicative (mul) |
trend |
add or mul (optional) |
null |
– |
Trend: none, additive or multiplicative |
damped_trend |
boolean |
false |
– |
Let the trend flatten out over the horizon |
seasonal |
add or mul (optional) |
null |
– |
Season: none, additive or multiplicative |
seasonal_periods |
integer (optional) |
null |
– |
Season length in periods (e.g. 12 for monthly data) |
simulate_repetitions |
integer |
1000 |
advanced |
Simulated paths for intervals of multiplicative models (≥ 100, ≤ 20000) |
maxiter |
integer |
1000 |
advanced |
≥ 10, ≤ 10000 |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.gaussian_hmm
A K-state Gaussian hidden Markov model over padded sequences (e.g. animal tracks). Hidden states are marginalised with the forward algorithm; forecasts and filters start from the stored terminal state.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, filter, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: the HMM likelihood is a potential over whole sequences; steps within a sequence are dependent, so pointwise leave-one-out is not defined |
| Default plots |
core.convergence, core.posterior_forest, core.state_sequence |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(animal, step) |
of y |
One-step-ahead expected value or predictive draw of y |
state_prob |
(animal, step, state) |
probability |
Hidden-state probabilities (predicted, or filtered in filter mode) |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
n_states |
integer |
2 |
– |
Number of hidden states K (≥ 2, ≤ 8) |
mu_center |
number |
0.0 |
– |
Prior mean of the state means |
mu_sigma |
number |
2.0 |
– |
Prior sd of the state means (> 0) |
sigma_scale |
number |
1.0 |
– |
Half-normal scale of the emission sds (> 0) |
stickiness |
number |
2.0 |
– |
Extra Dirichlet weight on staying in the same state (≥ 0, ≤ 1000) |
pi_concentration |
number |
1.0 |
– |
Dirichlet weight of pi (> 0) |
identification |
relabel or ordered |
relabel |
– |
relabel: sort states by mean after sampling; ordered: ordered prior |
Input data contract (schema template)
{
"template": {
"dims": {
"animal": {
"kind": "categorical",
"policy": "new_levels",
"new_level_strategy": "pooled"
},
"step": {
"kind": "integer",
"policy": "extend"
}
},
"vars": {
"y": {
"dims": [
"animal",
"step"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
},
"mask": {
"dims": [
"animal",
"step"
],
"dtype": "bool",
"role": "mask"
}
},
"ragged": [
{
"group_dim": "animal",
"within_dim": "step",
"form": "padded",
"mask_var": "mask"
}
]
}
}
ts.hsgp_trend
A smooth Hilbert-space GP trend with optional linear drift and Fourier seasonality for one regular time series (Mauna-Loa style). Forecasts reach at most max_extension periods past the fit; further horizons need a refit.
|
|
| Version |
1.0.0 |
| Inference |
mcmc |
| Representation |
draws |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
valid |
| Default plots |
core.ppc_fan, core.convergence, core.posterior_forest, core.decomposition |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
The series: expected value (trend + seasonality) or a predictive draw |
trend |
(t) |
of y |
The long-term component (intercept + drift + GP), no seasonality |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
max_extension |
integer |
24 |
– |
Periods a forecast may reach past the fitted range without a refit; sizes the HSGP domain (x-ui-level: basic) (≥ 1, ≤ 10000) |
kernel |
expquad or matern52 or matern32 |
expquad |
– |
Covariance kernel of the smooth trend |
m |
integer |
30 |
– |
Number of HSGP basis functions (≥ 4, ≤ 400) |
c |
number |
1.5 |
– |
Boundary factor (L = c on the scaled axis) (> 1.0, ≤ 5.0) |
lengthscale_mu |
number |
0.4 |
– |
Median of the lengthscale prior on the scaled axis [-1, 1] (> 0) |
lengthscale_sigma |
number |
0.5 |
– |
Log-scale sd of the lengthscale (> 0) |
eta_sigma |
number |
1.0 |
– |
Half-normal scale of the GP amplitude (> 0) |
linear_trend |
boolean |
true |
– |
|
intercept_sigma |
number |
1.0 |
– |
> 0 |
slope_sigma |
number |
1.0 |
– |
> 0 |
season_period |
number (optional) |
12.0 |
– |
Seasonal period in periods of t (12 for monthly data) |
season_order |
integer |
3 |
– |
Fourier order of the seasonality (≥ 0, ≤ 20) |
season_sigma |
number |
0.5 |
– |
> 0 |
noise_sigma |
number |
0.5 |
– |
> 0 |
Input data contract (schema template)
{
"params": {
"max_extension": {
"type": "integer",
"default": 24
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend",
"max_extension": "{max_extension}"
}
},
"vars": {
"y": {
"dims": [
"t"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
}
}
}
}
ts.markov_switching
statsmodels Markov switching: a regression or autoregression whose level, driver effects and noise switch between hidden regimes (Hamilton filter, maximum likelihood); stores regime probabilities and durations; forecasts are regime mixtures (simulated for autoregressions).
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time, core.state_sequence |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
– |
basic |
Driver variables (prices, promotions, holidays) whose future values are supplied for forecasts (max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
k_regimes |
integer |
2 |
– |
Number of regimes (≥ 2, ≤ 4) |
order |
integer |
0 |
– |
Autoregressive order (0 = no AR terms) (≥ 0, ≤ 4) |
trend |
n or c or t or ct |
c |
– |
n, c (level), t or ct |
switching_trend |
boolean |
true |
– |
Each regime has its own level/trend |
switching_exog |
boolean |
true |
– |
Each regime has its own driver effects |
switching_variance |
boolean |
true |
– |
Each regime has its own noise level |
switching_ar |
boolean |
true |
– |
Each regime has its own AR coefficients |
search_reps |
integer |
0 |
advanced |
Random restarts to avoid poor local optima (seeded) (≥ 0, ≤ 50) |
simulations |
integer |
2000 |
advanced |
Simulated paths for forecasts of autoregressive models (≥ 200, ≤ 20000) |
maxiter |
integer |
100 |
advanced |
≥ 10, ≤ 2000 |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.sarimax
statsmodels SARIMAX: ARIMA(p,d,q)(P,D,Q)s with drivers, estimated by exact maximum likelihood with the Kalman filter; one model per series of a panel; prediction intervals as quantiles; future drivers are required for forecasts.
|
|
| Version |
1.0.0 |
| Inference |
kalman |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
– |
basic |
Driver variables (prices, promotions, holidays) whose future values are supplied for forecasts (max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
maxiter |
integer |
200 |
advanced |
Optimiser iterations (≥ 10, ≤ 5000) |
method |
lbfgs or bfgs or powell or nm |
lbfgs |
advanced |
Likelihood optimiser |
order |
list of any |
[1, 0, 0] |
basic |
(p, d, q): past values used (AR), times differenced (d), past errors used (MA) (min items 3, max items 3) |
seasonal_order |
list of any |
[0, 0, 0, 0] |
basic |
(P, D, Q, s): the same for the seasonal pattern repeating every s periods (min items 4, max items 4) |
trend |
auto or n or c or t or ct |
auto |
– |
Deterministic trend: n none, c constant, t linear, ct both; auto uses a constant when the series is not differenced |
enforce_stationarity |
boolean |
true |
advanced |
|
enforce_invertibility |
boolean |
true |
advanced |
|
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.theta
statsmodels ThetaModel (Assimakopoulos-Nikolopoulos theta method, equivalent to simple exponential smoothing with drift) with optional seasonal adjustment; a strong, fast baseline; one model per series of a panel.
|
|
| Version |
1.0.0 |
| Inference |
custom |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
period |
integer (optional) |
null |
– |
Season length; leave empty for no seasonal adjustment |
deseasonalize |
boolean |
true |
– |
Remove the season before forecasting |
use_test |
boolean |
true |
advanced |
Only remove the season when a test finds one |
method |
auto or additive or multiplicative |
auto |
advanced |
How the season is removed |
theta |
number |
2.0 |
– |
Weight of the trend line (2 = classic) (≥ 1.0, ≤ 10.0) |
use_mle |
boolean |
false |
advanced |
Estimate by maximum likelihood (ARIMA(0,1,1) with drift) instead of OLS + SES |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.unobserved_components
statsmodels UnobservedComponents: a structural model with a level/trend, optional stochastic seasonal, cycle, AR noise and drivers, estimated by maximum likelihood; smoothed components are stored with the fit.
|
|
| Version |
1.0.0 |
| Inference |
kalman |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time, core.decomposition |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
– |
basic |
Driver variables (prices, promotions, holidays) whose future values are supplied for forecasts (max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
maxiter |
integer |
200 |
advanced |
Optimiser iterations (≥ 10, ≤ 5000) |
method |
lbfgs or bfgs or powell or nm |
lbfgs |
advanced |
Likelihood optimiser |
level |
irregular or fixed intercept or deterministic constant or local level or random walk or fixed slope or deterministic trend or local linear deterministic tr… or random walk with drift or local linear trend or smooth trend or random trend |
local linear trend |
basic |
How the level and trend move: 'local level' (level wanders), 'local linear trend' (level and slope wander), 'smooth trend', 'deterministic trend', ... |
seasonal |
integer (optional) |
null |
– |
Season length in periods (e.g. 52 for weekly data) |
stochastic_seasonal |
boolean |
true |
– |
Let the seasonal pattern change slowly |
cycle |
boolean |
false |
– |
Add a cycle (business-cycle like swings) |
stochastic_cycle |
boolean |
false |
advanced |
|
damped_cycle |
boolean |
false |
advanced |
|
autoregressive |
integer (optional) |
null |
– |
Order of an AR term for the remaining noise |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "allow"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.var
statsmodels VAR(p) by least squares with the lag order chosen by AIC/BIC/HQIC/FPE; joint forecasts with intervals, orthogonalised impulse responses with 95% bands, forecast-error variance decomposition and pairwise Granger causality tests.
|
|
| Version |
1.0.0 |
| Inference |
point |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
– |
basic |
Driver variables (prices, promotions, holidays) whose future values are supplied for forecasts (max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
irf_horizon |
integer |
12 |
– |
Periods of the impulse responses and the variance decomposition (≥ 1, ≤ 60) |
lags |
integer (optional) |
null |
– |
Lag order; leave empty to choose it by the criterion |
max_lags |
integer |
8 |
– |
Largest lag order tried when choosing (≥ 1, ≤ 24) |
ic |
aic or bic or hqic or fpe |
aic |
– |
Criterion for the lag order |
trend |
n or c or ct or ctt |
c |
– |
n none, c constant, ct + trend |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
},
"variable": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"variable",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.varmax
statsmodels VARMAX(p, q) with drivers (VARX when q = 0) estimated by maximum likelihood in state-space form; joint forecasts need future drivers; stores orthogonalised impulse responses and the variance decomposition.
|
|
| Version |
1.0.0 |
| Inference |
kalman |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
– |
basic |
Driver variables (prices, promotions, holidays) whose future values are supplied for forecasts (max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
irf_horizon |
integer |
12 |
– |
Periods of the impulse responses and the variance decomposition (≥ 1, ≤ 60) |
maxiter |
integer |
200 |
advanced |
Optimiser iterations (≥ 10, ≤ 5000) |
method |
lbfgs or bfgs or powell or nm |
lbfgs |
advanced |
Likelihood optimiser |
order |
list of any |
[1, 0] |
– |
(p, q): VAR lags and MA lags (min items 2, max items 2) |
trend |
n or c or t or ct |
c |
– |
n, c, t or ct |
measurement_error |
boolean |
false |
advanced |
|
enforce_stationarity |
boolean |
true |
advanced |
|
enforce_invertibility |
boolean |
true |
advanced |
|
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
},
"variable": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"variable",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}
ts.vecm
statsmodels VECM (Johansen maximum likelihood) for trending series tied together in the long run; the cointegration rank comes from the Johansen trace or max-eigenvalue test unless set; stores alpha/beta, the rank test table, impulse responses, FEVD and Granger tests.
|
|
| Version |
1.0.0 |
| Inference |
point |
| Representation |
quantiles |
| Score modes |
evaluate, forecast, predict |
| Contributions |
none |
| Decision objective |
– |
| Fast scoring |
– |
| Owns |
– |
| LOO |
invalid: statsmodels estimates are maximum-likelihood or least-squares point estimates without posterior draws; use holdout or backtest metrics instead of LOO |
| Default plots |
core.ppc_fan, core.fit_vs_actual, core.residuals_over_time |
| Resources |
class S (min S) |
Outputs
| Output |
Dims |
Units |
Description |
y_hat |
(t) |
of y |
Prediction-interval quantiles of y: one-step-ahead inside the fitted range, a multi-step forecast after it |
Settings (model.settings)
| Field |
Type |
Default |
Level |
Description |
exog |
list of string |
– |
basic |
Driver variables (prices, promotions, holidays) whose future values are supplied for forecasts (max items 64) |
series_dims |
list of string |
– |
basic |
Panel dims (geo, product, ...): one model per series cell. Empty for a single series. (max items 4) |
quantiles |
list of number |
– |
advanced |
Quantiles of the prediction intervals (must include 0.05, 0.5 and 0.95) (min items 3, max items 16) |
time_kind |
time or integer |
time |
advanced |
Whether the time index holds dates ('time') or period numbers ('integer') |
irf_horizon |
integer |
12 |
– |
Periods of the impulse responses and the variance decomposition (≥ 1, ≤ 60) |
k_ar_diff |
integer |
1 |
– |
Lagged differences in each equation (≥ 0, ≤ 12) |
coint_rank |
integer (optional) |
null |
– |
Number of long-run relationships; leave empty to take it from the Johansen test |
rank_test |
trace or maxeig |
trace |
– |
Johansen test statistic |
rank_signif |
number |
0.05 |
– |
Significance of the rank test: 0.01, 0.05 or 0.1 |
deterministic |
n or co or ci or lo or li or cili or colo |
ci |
– |
Constant/trend: n none, co outside / ci inside the long-run relation, lo/li linear trend outside/inside, combinations |
Input data contract (schema template)
{
"params": {
"series_dims": {
"type": "string_list",
"default": []
},
"time_kind": {
"type": "string",
"enum": [
"time",
"integer"
],
"default": "time"
},
"exog": {
"type": "string_list",
"default": []
}
},
"template": {
"dims": {
"t": {
"kind": "time",
"policy": "extend"
},
"{*series_dims as d}": {
"kind": "categorical",
"policy": "fixed"
},
"variable": {
"kind": "categorical",
"policy": "fixed"
}
},
"vars": {
"y": {
"dims": [
"{*series_dims}",
"variable",
"t"
],
"dtype": "float64",
"role": "target",
"missing": "forbid"
},
"{*exog as x}": {
"dims": [
"{*series_dims}",
"t"
],
"dtype": "float64",
"role": "covariate",
"future_required": true
}
}
},
"cases": [
{
"when": {
"time_kind": "integer"
},
"merge": {
"dims": {
"t": {
"kind": "integer"
}
}
}
}
]
}