A DuckDB extension for statistical regression and inference in SQL - OLS, Ridge, Elastic Net, LARS/LassoLars, WLS, recursive least squares, robust estimators (Huber, RANSAC, Theil-Sen), GLMs (Poisson, Negative Binomial, Binomial, Tweedie, Gamma, Logistic) with offset support, mixed-effects/hierarchical GLMs with random slopes and crossed/nested factors, AFT survival regression, explicit priors with Laplace intervals, empirical-Bayes shrinkage, and time-series regression, all with full diagnostics and inference.
Compatibility Matrix
This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 |
|---|---|---|---|---|---|
| Linux AMD64 | |||||
| Linux ARM64 | |||||
| macOS AMD64 | |||||
| macOS ARM64 | |||||
| Windows AMD64 | |||||
| Windows ARM64 | |||||
| WebAssembly |
Installing and Loading
INSTALL anofox_statistics FROM community;
LOAD anofox_statistics;
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| acf_agg | aggregate | Sample autocorrelation function of x in the aggregate's ORDER BY order (R acf): one row per lag 0..max_lag with the 95% white-noise band conf_low/conf_high = -/+ qnorm(0.975)/sqrt(n). max_lag defaults to R's floor(10 log10 n). NULL values are skipped; NULL when n <= max_lag. | NULL | [acf_agg(resid, 10 ORDER BY t)] |
| acf_by | table_macro | Table macro: the sample autocorrelation function (R acf) of value_col ordered by order_col within each group of source, one row per lag (the integration contract's curve schema, curve_type 'acf'): the group column, model_id, series, curve_type, x (lag), y, y_low / y_high (95% white-noise band), threshold, weight, n_censor. max_lag defaults to R's floor(10 log10 n). |
NULL | [acf_by('residuals', store, resid, t, max_lag := 12)] |
| ad_test_agg | aggregate | k-sample Anderson-Darling test (Scholz and Stephens; kSamples::ad.test, asymptotic p-value) of two or more groups. | NULL | [ad_test_agg(value, group_id, {'midrank': true})] |
| ad_test_agg | aggregate | k-sample Anderson-Darling test (Scholz and Stephens; kSamples::ad.test, asymptotic p-value) of two or more groups. Default options. | NULL | [ad_test_agg(value, group_id)] |
| aft_cdf | scalar | Cumulative distribution P(T <= t) of an AFT survival time with linear predictor eta, scale and distribution (weibull, lognormal, loglogistic, exponential). | NULL | [aft_cdf(5.0, f.intercept + f.coefficients[1] * x1, f.scale, 'weibull')] |
| aft_fit_agg | aggregate | Fits an accelerated failure time (AFT) survival model to right-censored durations (event = 1 observed, 0 censored); coefficients are on the log-time scale. | NULL | [aft_fit_agg(duration, [x1, x2], event)] |
| aft_fit_agg | aggregate | Fits an accelerated failure time (AFT) survival model with a MAP of options (distribution, fit_intercept, compute_inference, confidence_level, …). | NULL | [aft_fit_agg(duration, [x1, x2], event, {'distribution': 'lognormal'})] |
| aft_glance_by | table_macro | Table macro: fits an accelerated failure time (AFT) survival model per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [aft_glance_by('my_table', group_col, y, [x1, x2], event)] |
| aft_quantile | scalar | p-quantile of an AFT survival time with linear predictor eta, scale and distribution (weibull, lognormal, loglogistic, exponential). | NULL | [aft_quantile(0.5, f.intercept + f.coefficients[1] * x1, f.scale, 'weibull')] |
| aft_survival | scalar | Model-based survival curve S(t | x) of a fitted AFT model (the STRUCT returned by aft_fit_agg) for the covariate row x, at each of times (R psurvreg(t, eta, scale, dist, lower.tail = FALSE)): one {time, surv} per time. | NULL | [aft_survival(m, [1.0, 0.5], [1, 5, 10, 20])] |
| aft_tidy_by | table_macro | Table macro: fits an accelerated failure time (AFT) survival model per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [aft_tidy_by('my_table', group_col, y, [x1, x2], event, names := ['x1', 'x2'])] |
| aic | scalar | Computes Akaike Information Criterion (AIC) from residual sum of squares, number of observations, and number of parameters. | NULL | [aic(rss, n, k)] |
| aid_agg | aggregate | Classifies demand patterns (smooth, intermittent, erratic, lumpy) using Automatic Identification of Demand (AID). | NULL | [aid_agg(y)] |
| aid_agg | aggregate | Classifies demand patterns using AID with a MAP of options (intermittent_threshold, outlier_method). | NULL | [aid_agg(y, {'intermittent_threshold': 0.3})] |
| aid_anomaly_agg | aggregate | Identifies anomalies in demand time series using AID with a MAP of options (intermittent_threshold, outlier_method). | NULL | [aid_anomaly_agg(y, {'outlier_method': 'iqr'})] |
| aid_anomaly_agg | aggregate | Identifies anomalies in demand time series using the AID classification framework. | NULL | [aid_anomaly_agg(y)] |
| aid_anomaly_by | table_macro | Table macro: AID anomaly flags per group of source, ordered by order_col; returns one row per input row with stockout, new_product, obsolete_product, high_outlier and low_outlier flags. | NULL | [aid_anomaly_by('sales', product_id, date, demand)] |
| aid_by | table_macro | Table macro: Automatic Identification of Demand (AID); classifies the demand pattern of each group of source and returns one row per group. Pass order_by := | NULL | [aid_by('sales', product_id, demand, order_by := week)] |
| alm_fit_agg | aggregate | Fits an Additive Linear Model (ALM) and returns coefficients and fit statistics. | NULL | [alm_fit_agg(y, x)] |
| alm_fit_agg | aggregate | Fits an Additive Linear Model (ALM) and returns coefficients and fit statistics. | NULL | [alm_fit_agg(y, x, {'fit_intercept': true})] |
| alm_fit_predict_agg | aggregate | Fits an Additive Linear Model on training rows with a MAP of options and predicts all rows. | NULL | [alm_fit_predict_agg(y, x, split_col, {'distribution': 'laplace'})] |
| alm_fit_predict_agg | aggregate | Fits an Additive Linear Model over a partition and returns per-row predictions. | NULL | [alm_fit_predict_agg(y, x)] |
| alm_fit_predict_agg | aggregate | Fits an Additive Linear Model over a partition with a MAP of options and returns per-row predictions. | NULL | [alm_fit_predict_agg(y, x, {'distribution': 'laplace'})] |
| alm_fit_predict_agg | aggregate | Fits an Additive Linear Model using only training rows (split_col='train') and predicts all rows. | NULL | [alm_fit_predict_agg(y, x, split_col)] |
| alm_fit_predict_by | table_macro | Table macro: fits an Augmented Linear Model (ALM) per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [alm_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| alm_glance_by | table_macro | Table macro: fits an augmented linear model (ALM) per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [alm_glance_by('my_table', group_col, y, [x1, x2])] |
| alm_prediction_by | table_macro | Table macro: fits an augmented linear model (ALM) per group of source (alm_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('alm'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [alm_prediction_by('sales', store, week, revenue, [price, promo])] |
| alm_tidy_by | table_macro | Table macro: fits an augmented linear model (ALM) per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [alm_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| anofox_contract_version | scalar | Returns the version of the anofox integration contract (output schemas and duckdb_functions() tags) this extension implements. | NULL | [anofox_contract_version()] |
| ard_fit_agg | aggregate | Fits an ARD regression per group (scikit-learn ARDRegression: one Gaussian prior precision per coefficient, features whose precision reaches threshold_lambda are pruned to 0) and returns the posterior mean coefficients, intercept, R^2, noise_precision (alpha_), weight_precisions (lambda_, one per feature), the posterior standard deviation of each coefficient and the iteration count. | NULL | [ard_fit_agg(y, [x1, x2, x3])] |
| ard_fit_agg | aggregate | Fits an ARD regression per group (scikit-learn ARDRegression: one Gaussian prior precision per coefficient, features whose precision reaches threshold_lambda are pruned to 0) and returns the posterior mean coefficients, intercept, R^2, noise_precision (alpha_), weight_precisions (lambda_, one per feature), the posterior standard deviation of each coefficient and the iteration count. | NULL | [ard_fit_agg(y, [x1, x2, x3], {'threshold_lambda': 1000})] |
| ard_fit_predict_agg | aggregate | Fits an ARD (automatic relevance determination) regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [ard_fit_predict_agg(y, x)] |
| ard_fit_predict_agg | aggregate | Fits an ARD (automatic relevance determination) regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [ard_fit_predict_agg(y, x, split)] |
| ard_fit_predict_agg | aggregate | Fits an ARD (automatic relevance determination) regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [ard_fit_predict_agg(y, x, split, {'fit_intercept': false})] |
| ard_fit_predict_agg | aggregate | Fits an ARD (automatic relevance determination) regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [ard_fit_predict_agg(y, x, {'confidence_level': 0.9})] |
| ard_fit_predict_by | table_macro | Table macro: fits an ARD (automatic relevance determination) regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training appended. | NULL | [ard_fit_predict_by('my_table', group_col, y, [x1, x2, x3])] |
| ard_glance_by | table_macro | Table macro: fits an ARD (automatic relevance determination) regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [ard_glance_by('my_table', group_col, y, [x1, x2])] |
| ard_prediction_by | table_macro | Table macro: fits an ARD (automatic relevance determination) regression per group of source (ard_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('ard'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [ard_prediction_by('sales', store, week, revenue, [price, promo])] |
| ard_tidy_by | table_macro | Table macro: fits an ARD (automatic relevance determination) regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. std_error is the posterior standard deviation and conf_low / conf_high the central Bayesian credible interval at conf_level (options' confidence_level), not a frequentist confidence interval; statistic and p_value are NULL. names := […] labels the terms. | NULL | [ard_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| auc_agg | aggregate | Area under the ROC curve (scikit-learn roc_auc_score, pROC auc); ties count one half. NULL when only one class is present. | NULL | [auc_agg(y_true, score)] |
| bayesian_ridge_fit_agg | aggregate | Fits a Bayesian Ridge regression per group (scikit-learn BayesianRidge: Gaussian prior on the coefficients, noise and weight precisions estimated by evidence maximisation) and returns the posterior mean coefficients, intercept, R^2, noise_precision (alpha_), weight_precision (lambda_), the posterior standard deviation of each coefficient, the iteration count and the log marginal likelihood. | NULL | [bayesian_ridge_fit_agg(y, [x1, x2, x3])] |
| bayesian_ridge_fit_agg | aggregate | Fits a Bayesian Ridge regression per group (scikit-learn BayesianRidge: Gaussian prior on the coefficients, noise and weight precisions estimated by evidence maximisation) and returns the posterior mean coefficients, intercept, R^2, noise_precision (alpha_), weight_precision (lambda_), the posterior standard deviation of each coefficient, the iteration count and the log marginal likelihood. | NULL | [bayesian_ridge_fit_agg(y, [x1, x2, x3], {'max_iterations': 500})] |
| bayesian_ridge_fit_predict_agg | aggregate | Fits a Bayesian Ridge regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [bayesian_ridge_fit_predict_agg(y, x)] |
| bayesian_ridge_fit_predict_agg | aggregate | Fits a Bayesian Ridge regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [bayesian_ridge_fit_predict_agg(y, x, split)] |
| bayesian_ridge_fit_predict_agg | aggregate | Fits a Bayesian Ridge regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [bayesian_ridge_fit_predict_agg(y, x, split, {'fit_intercept': false})] |
| bayesian_ridge_fit_predict_agg | aggregate | Fits a Bayesian Ridge regression over a partition (training rows: y NOT NULL and, with split_col, split 'train' / 'training' in any case) and returns one STRUCT per row: y, yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training. | NULL | [bayesian_ridge_fit_predict_agg(y, x, {'confidence_level': 0.9})] |
| bayesian_ridge_fit_predict_by | table_macro | Table macro: fits a Bayesian Ridge regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat, yhat_lower / yhat_upper (posterior predictive interval at confidence_level, default 0.95) and is_training appended. | NULL | [bayesian_ridge_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| bayesian_ridge_glance_by | table_macro | Table macro: fits a Bayesian Ridge regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [bayesian_ridge_glance_by('my_table', group_col, y, [x1, x2])] |
| bayesian_ridge_prediction_by | table_macro | Table macro: fits a Bayesian Ridge regression per group of source (bayesian_ridge_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('bayesian_ridge'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [bayesian_ridge_prediction_by('sales', store, week, revenue, [price, promo])] |
| bayesian_ridge_tidy_by | table_macro | Table macro: fits a Bayesian Ridge regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. std_error is the posterior standard deviation and conf_low / conf_high the central Bayesian credible interval at conf_level (options' confidence_level), not a frequentist confidence interval; statistic and p_value are NULL. names := […] labels the terms. | NULL | [bayesian_ridge_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| bic | scalar | Computes Bayesian Information Criterion (BIC) from residual sum of squares, number of observations, and number of parameters. | NULL | [bic(rss, n, k)] |
| binom_test_agg | aggregate | Performs an exact binomial test comparing an observed success count to a hypothesized probability, using default options. | NULL | [binom_test_agg(value)] |
| binom_test_agg | aggregate | Performs an exact binomial test comparing an observed success count to a hypothesized probability. | NULL | [binom_test_agg(value, {'p0': 0.5, 'alternative': 'two_sided'})] |
| binomial_augment_agg | aggregate | Fits a Binomial GLM over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [binomial_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| binomial_augment_agg | aggregate | Fits a Binomial GLM over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [binomial_augment_agg(y, [x1, x2], {'binomial_link': 'logit'}) OVER ()] |
| binomial_augment_by | table_macro | Table macro: fits a Binomial GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, approx_loo_fitted and approx_loo_residual (one-step approximate leave-one-out prediction and residual, response scale: not the refit). Non-training rows get the prediction as fitted and NULL diagnostics. Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [binomial_augment_by('my_table', group_col, y, [x1, x2])] |
| binomial_effects_by | table_macro | Table macro: marginal-effect grid of a binomial GLM per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of binomial_tidy_by). |
NULL | [binomial_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| binomial_fit_agg | aggregate | Fits a Binomial GLM (logit link by default) and returns coefficients, deviance, AIC, dispersion, and fit statistics. y is the success rate in [0, 1]. | NULL | [binomial_fit_agg(y, x)] |
| binomial_fit_agg | aggregate | Fits a Binomial GLM (user-selectable link: logit / probit / cloglog; default logit) and returns coefficients, deviance, AIC, dispersion (= 1 for canonical binomial), and fit statistics. y is the success rate in [0, 1]. | NULL | [binomial_fit_agg(y, x, {'binomial_link': 'logit', 'fit_intercept': true})] |
| binomial_fit_predict_by | table_macro | Table macro: fits a binomial GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [binomial_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| binomial_glance_by | table_macro | Table macro: fits a binomial GLM per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [binomial_glance_by('my_table', group_col, y, [x1, x2])] |
| binomial_partial_residuals_agg | aggregate | Fits a Binomial GLM over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots; the working residual), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots; NULL for GLMs). Rows not used for fitting get NULL residuals. | NULL | [binomial_partial_residuals_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| binomial_partial_residuals_by | table_macro | Table macro: fits a binomial GLM per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= working residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (NULL for GLMs). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [binomial_partial_residuals_by('my_table', group_col, y, [x1, x2])] |
| binomial_prediction_by | table_macro | Table macro: fits a binomial GLM per group of source (binomial_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('binomial'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [binomial_prediction_by('sales', store, week, revenue, [price, promo])] |
| binomial_tidy_by | table_macro | Table macro: fits a binomial GLM per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [binomial_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| bls_fit_agg | aggregate | Fits a Bounded Least Squares (BLS) regression with coefficient bounds and returns fit statistics. | NULL | [bls_fit_agg(y, x)] |
| bls_fit_agg | aggregate | Fits a Bounded Least Squares (BLS) regression with coefficient bounds and returns fit statistics. | NULL | [bls_fit_agg(y, x, {'lower_bound': 0.0, 'upper_bound': 1.0})] |
| bls_fit_predict_agg | aggregate | Fits a Bounded Least Squares model on training rows with a MAP of options and predicts all rows. | NULL | [bls_fit_predict_agg(y, x, split_col, {'null_policy': 'drop'})] |
| bls_fit_predict_agg | aggregate | Fits a Bounded Least Squares model over a partition and returns per-row predictions. | NULL | [bls_fit_predict_agg(y, x)] |
| bls_fit_predict_agg | aggregate | Fits a Bounded Least Squares model over a partition with a MAP of options and returns per-row predictions. | NULL | [bls_fit_predict_agg(y, x, {'null_policy': 'drop'})] |
| bls_fit_predict_agg | aggregate | Fits a Bounded Least Squares model using only training rows (split_col='train') and predicts all rows. | NULL | [bls_fit_predict_agg(y, x, split_col)] |
| bls_fit_predict_by | table_macro | Table macro: fits a bounded/non-negative least squares (BLS) regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [bls_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| bls_glance_by | table_macro | Table macro: fits a bounded least squares regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [bls_glance_by('my_table', group_col, y, [x1, x2])] |
| bls_prediction_by | table_macro | Table macro: fits a bounded least squares regression per group of source (bls_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('bls'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [bls_prediction_by('sales', store, week, revenue, [price, promo])] |
| bls_tidy_by | table_macro | Table macro: fits a bounded least squares regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. The model has no coefficient inference. names := […] labels the terms. | NULL | [bls_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| box_pierce_agg | aggregate | Box-Pierce portmanteau test for autocorrelation of x in the aggregate's ORDER BY order (R Box.test(x, lag, type = 'Box-Pierce', fitdf)). lag defaults to 1, fitdf to 0. | NULL | [box_pierce_agg(resid, 10 ORDER BY t)] |
| breusch_pagan_agg | aggregate | Breusch-Pagan test for heteroskedasticity of regression residuals against the regressors x (R lmtest::bptest): statistic, df1, p_value. studentize (default true) is Koenker's robust variant, bptest's default; false gives the original 1979 statistic. | NULL | [breusch_pagan_agg(resid, [x1, x2])] |
| breusch_pagan_agg | aggregate | Breusch-Pagan test for heteroskedasticity of regression residuals against the regressors x (R lmtest::bptest): statistic, df1, p_value. studentize (default true) is Koenker's robust variant, bptest's default; false gives the original 1979 statistic. | NULL | [breusch_pagan_agg(resid, [x1, x2], false)] |
| brier_agg | aggregate | Brier score: mean squared difference between the predicted probability and the 0/1 outcome (scikit-learn brier_score_loss). | NULL | [brier_agg(y_true, prob)] |
| brown_forsythe_agg | aggregate | Tests equality of variances across groups using the Brown-Forsythe test. | NULL | [brown_forsythe_agg(value, group_id)] |
| brunner_munzel_agg | aggregate | Performs the Brunner-Munzel test for stochastic equality of two independent samples, using default options. | NULL | [brunner_munzel_agg(value, group_id)] |
| brunner_munzel_agg | aggregate | Performs the Brunner-Munzel test for stochastic equality of two independent samples. | NULL | [brunner_munzel_agg(value, group_id, {'alternative': 'two_sided'})] |
| calibration_agg | aggregate | Calibration (reliability) curve over n_bins equal-width bins of [0, 1] as a LIST of {bin, mean_pred, frac_pos, n, conf_low, conf_high} (scikit-learn calibration_curve, strategy 'uniform'); empty bins are omitted, bin is zero-based, and conf_low/conf_high are Wilson intervals (default conf_level 0.95). | NULL | [calibration_agg(y_true, prob, 10)] |
| calibration_curve_by | table_macro | Table macro: computes the calibration curve (x = mean predicted probability, y = fraction of positives, y_low/y_high = Wilson interval, weight = bin count; see calibration_agg) per group of source and returns one row per point in curve order (the integration contract's curve schema): the group column, model_id, series, curve_type ('calibration'), x, y, y_low, y_high, threshold, weight, n_censor. y_true_col is BOOLEAN or 0/1. |
NULL | [calibration_curve_by('scored', model, label, prob, n_bins := 10)] |
| chisq_gof_agg | aggregate | Performs a chi-squared goodness-of-fit test comparing observed frequencies to expected probabilities. | NULL | [chisq_gof_agg(observed, expected_prob)] |
| chisq_test_agg | aggregate | Performs a chi-squared test of independence on a 2×2 contingency table from two categorical columns. | NULL | [chisq_test_agg(row_var, col_var)] |
| chisq_test_agg | aggregate | Performs a chi-squared test of independence on a 2×2 contingency table from two categorical columns. | NULL | [chisq_test_agg(row_var, col_var, {'correction': true})] |
| clark_west_agg | aggregate | Performs the Clark-West test to compare a nested forecast model against an encompassing model, using default options. | NULL | [clark_west_agg(actual, forecast_restricted, forecast_unrestricted)] |
| clark_west_agg | aggregate | Performs the Clark-West test to compare a nested forecast model against an encompassing model. | NULL | [clark_west_agg(actual, forecast_restricted, forecast_unrestricted, {'horizon': 1})] |
| cohen_kappa_agg | aggregate | Computes Cohen's kappa, a measure of inter-rater agreement for categorical classifications. | NULL | [cohen_kappa_agg(rater1, rater2)] |
| cohen_kappa_agg | aggregate | Computes Cohen's kappa, a measure of inter-rater agreement for categorical classifications. | NULL | [cohen_kappa_agg(rater1, rater2, {'weighted': false})] |
| contingency_coef_agg | aggregate | Computes the contingency coefficient (C), a measure of association for categorical variables. | NULL | [contingency_coef_agg(row_var, col_var)] |
| cramers_v_agg | aggregate | Computes Cramér's V, a measure of association strength for nominal categorical variables. | NULL | [cramers_v_agg(row_var, col_var)] |
| cvm_test_agg | aggregate | Two-sample Cramer-von Mises test (Anderson's T): exact permutation p-value when max(n1, n2) <= 20, otherwise the limiting distribution. | NULL | [cvm_test_agg(value, group_id, {'method': 'auto'})] |
| cvm_test_agg | aggregate | Two-sample Cramer-von Mises test (Anderson's T): exact permutation p-value when max(n1, n2) <= 20, otherwise the limiting distribution. Default options. | NULL | [cvm_test_agg(value, group_id)] |
| dagostino_k2_agg | aggregate | Performs the D'Agostino-Pearson K² omnibus normality test based on skewness and kurtosis. | NULL | [dagostino_k2_agg(value)] |
| diebold_mariano_agg | aggregate | Performs the Diebold-Mariano test to compare predictive accuracy of two forecast models, using default options. | NULL | [diebold_mariano_agg(actual, forecast1, forecast2)] |
| diebold_mariano_agg | aggregate | Performs the Diebold-Mariano test to compare predictive accuracy of two forecast models. | NULL | [diebold_mariano_agg(actual, forecast1, forecast2, {'loss': 'squared'})] |
| distance_cor_agg | aggregate | Computes the distance correlation between two variables, detecting both linear and nonlinear dependence, using default options. | NULL | [distance_cor_agg(x, y)] |
| distance_cor_agg | aggregate | Computes the distance correlation between two variables, detecting both linear and nonlinear dependence. | NULL | [distance_cor_agg(x, y, {'n_permutations': 1000})] |
| dunn_test_agg | aggregate | Dunn's test for all pairwise differences of mean ranks after Kruskal-Wallis (FSA::dunnTest). Returns one row per pair: estimate (mean rank of group2 - group1), statistic (z for group2 - group1), p_value, p_adj. Options: p_adjust (holm [default], hochberg, hommel, bonferroni, BH/fdr, BY, none). | NULL | [dunn_test_agg(value, group, {'p_adjust': 'holm'})] |
| dunn_test_by | table_macro | Table macro: runs Dunn's rank test with p-value adjustment (FSA::dunnTest) between the levels of factor_col within each group of source and returns one row per pair (the integration contract's test schema): the group column, model_id, test_id (' |
NULL | [dunn_test_by('my_table', experiment, response, treatment)] |
| durbin_watson_agg | aggregate | Durbin-Watson statistic sum((e_t - e_{t-1})^2) / sum(e_t^2) of residuals in the aggregate's ORDER BY order (the statistic of R lmtest::dwtest). p_value is NULL here: pass the regressors, durbin_watson_agg(resid, x ORDER BY t), for the test with a p-value. | NULL | [durbin_watson_agg(resid ORDER BY t)] |
| durbin_watson_agg | aggregate | Durbin-Watson test for first-order autocorrelation of regression residuals in the aggregate's ORDER BY order, with the p-value of R lmtest::dwtest: x are the model's regressors (an intercept column is added unless fit_intercept is false). The p-value is exact (Imhof) for n < 100, else the normal approximation. alternative: 'greater' (default, positive autocorrelation), 'less' or 'two_sided'. | NULL | [durbin_watson_agg(resid, [x1, x2] ORDER BY t)] |
| eb_shrink_agg | aggregate | Empirical-Bayes (random-effects) shrinkage of per-group estimates with standard errors toward their precision-weighted mean; returns the shrunken estimates with mu and tau_squared. | NULL | [eb_shrink_agg(estimate, se)] |
| eb_shrink_agg | aggregate | Empirical-Bayes shrinkage of per-group estimates with a MAP of options (tau_squared, tau_method). | NULL | [eb_shrink_agg(estimate, se, {'tau_method': 'dl'})] |
| eb_shrink_by | table_macro | Table macro: empirical-Bayes shrinkage of the estimates in estimate_col (standard errors in se_col); returns every source row with shrunken, shrunken_se, weight, mu and tau_squared appended. | NULL | [eb_shrink_by('my_table', estimate, se)] |
| elasticnet_cv_agg | aggregate | k-fold cross-validation of the elastic-net path per group. Returns a LIST of curve rows (curve_type = 'lambda_cv', x = lambda, y = cv_mean, y_low / y_high = cv_mean -/+ cv_se, threshold NULL, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds), as cv.glmnet (type.measure = 'mse', or 'mae' with metric). Options: as the path, plus folds (10) and seed for the seeded folds, repeats, cv_strategy and its options (see the cv_key form). |
NULL | [elasticnet_cv_agg(y, [x1, x2])] |
| elasticnet_cv_agg | aggregate | k-fold cross-validation of the elastic-net path per group. Returns a LIST of curve rows (curve_type = 'lambda_cv', x = lambda, y = cv_mean, y_low / y_high = cv_mean -/+ cv_se, threshold NULL, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds), as cv.glmnet (type.measure = 'mse', or 'mae' with metric). Options: as the path, plus folds (10) and seed for the seeded folds, repeats, cv_strategy and its options (see the cv_key form). |
NULL | [elasticnet_cv_agg(y, [x1, x2], {'l1_ratio': 0.5, 'folds': 5})] |
| elasticnet_cv_agg | aggregate | k-fold cross-validation of the elastic-net path per group. Returns a LIST of curve rows (curve_type = 'lambda_cv', x = lambda, y = cv_mean, y_low / y_high = cv_mean -/+ cv_se, threshold NULL, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds), as cv.glmnet (type.measure = 'mse', or 'mae' with metric). Options: as the path, plus folds (10) and seed for the seeded folds, repeats, cv_strategy and its options (see the cv_key form). With cv_key, the folds follow cv_strategy: 'fold_id' (default; cv_key is each row's fold, any labels, at least 3), 'group' (cv_key is a group that never spans two folds; a STRUCT of several columns for a combined key), 'logo' (leave one group out), 'stratified' (cv_key is the stratum) or 'time_series' (cv_key is the time: rolling-origin splits with test_size, gap, window, max_train_size). |
NULL | [elasticnet_cv_agg(y, [x1, x2], store, {'cv_strategy': 'group', 'folds': 5})] |
| elasticnet_cv_by | table_macro | Table macro: computes the k-fold cross-validation curve of the elastic-net path (cv.glmnet) per group of source with elasticnet_cv_agg (same options) and returns one row per lambda in the integration contract's curve schema: the group column, id (the group), model_id and model_name (the method), curve_type ('lambda_cv'), series, x (lambda), y (cv_mean), y_low, y_high (cv_mean -/+ cv_se), threshold, weight, n_censor, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds. cv_key := column (or a STRUCT of columns) passes the cv_key of the cv_strategy option. |
NULL | [elasticnet_cv_by('my_table', group_col, y, [x1, x2])] |
| elasticnet_fit | scalar | Fits an ElasticNet regression model (L1+L2 regularization) with optional MAP of settings (fit_intercept, alpha, l1_ratio, max_iterations, tolerance). | NULL | [elasticnet_fit(y, x, {'alpha': 1.0, 'l1_ratio': 0.5})] |
| elasticnet_fit | scalar | Fits an ElasticNet regression model combining L1 and L2 regularization to the given response and feature data. | NULL | [elasticnet_fit(y, x)] |
| elasticnet_fit_agg | aggregate | Fits an ElasticNet model combining L1 and L2 regularization and returns coefficients and fit statistics. | NULL | [elasticnet_fit_agg(y, x)] |
| elasticnet_fit_agg | aggregate | Fits an ElasticNet model combining L1 and L2 regularization and returns coefficients and fit statistics. | NULL | [elasticnet_fit_agg(y, x, {'alpha': 1.0, 'l1_ratio': 0.5})] |
| elasticnet_fit_predict | aggregate | Window aggregate: fits an ElasticNet regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use elasticnet_fit_predict_agg. | NULL | [elasticnet_fit_predict(y, x)] |
| elasticnet_fit_predict | aggregate | Window aggregate: fits an ElasticNet regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use elasticnet_fit_predict_agg. | NULL | [elasticnet_fit_predict(y, x, {'null_policy': 'drop'})] |
| elasticnet_fit_predict_agg | aggregate | Fits ElasticNet regression on training rows with a MAP of options and predicts all rows. | NULL | [elasticnet_fit_predict_agg(y, x, split_col, {'null_policy': 'drop'})] |
| elasticnet_fit_predict_agg | aggregate | Fits ElasticNet regression over a partition and returns per-row predictions with prediction intervals. | NULL | [elasticnet_fit_predict_agg(y, x)] |
| elasticnet_fit_predict_agg | aggregate | Fits ElasticNet regression over a partition with a MAP of options and returns per-row predictions with prediction intervals. | NULL | [elasticnet_fit_predict_agg(y, x, {'null_policy': 'drop'})] |
| elasticnet_fit_predict_agg | aggregate | Fits ElasticNet regression using only training rows (split_col='train') and predicts all rows. | NULL | [elasticnet_fit_predict_agg(y, x, split_col)] |
| elasticnet_fit_predict_by | table_macro | Table macro: fits an ElasticNet regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [elasticnet_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| elasticnet_glance_by | table_macro | Table macro: fits an Elastic Net regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [elasticnet_glance_by('my_table', group_col, y, [x1, x2])] |
| elasticnet_nested_cv_agg | aggregate | Nested cross-validation of the elastic-net path per group. Each outer fold's training rows choose lambda by an inner CV (inner_folds folds built from those rows only, respecting the same cv_key; rule 'min' or '1se') and the refit at that lambda is scored on the outer test rows. Returns a LIST of curve rows (curve_type = 'nested_cv'): one per outer fold (series 'fold', x = fold, y = test_error, with lambda, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds) and a summary row (series 'mean', y = the mean outer error weighted by test rows, y_low / y_high = mean -/+ test_se). Options: as the CV aggregate (cv_strategy, folds = outer folds, default 5; seed; metric) plus inner_folds (5) and rule ('min'). |
NULL | [elasticnet_nested_cv_agg(y, [x1, x2])] |
| elasticnet_nested_cv_agg | aggregate | Nested cross-validation of the elastic-net path per group. Each outer fold's training rows choose lambda by an inner CV (inner_folds folds built from those rows only, respecting the same cv_key; rule 'min' or '1se') and the refit at that lambda is scored on the outer test rows. Returns a LIST of curve rows (curve_type = 'nested_cv'): one per outer fold (series 'fold', x = fold, y = test_error, with lambda, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds) and a summary row (series 'mean', y = the mean outer error weighted by test rows, y_low / y_high = mean -/+ test_se). Options: as the CV aggregate (cv_strategy, folds = outer folds, default 5; seed; metric) plus inner_folds (5) and rule ('min'). |
NULL | [elasticnet_nested_cv_agg(y, [x1, x2], store, {'cv_strategy': 'group', 'rule': '1se'})] |
| elasticnet_nested_cv_agg | aggregate | Nested cross-validation of the elastic-net path per group. Each outer fold's training rows choose lambda by an inner CV (inner_folds folds built from those rows only, respecting the same cv_key; rule 'min' or '1se') and the refit at that lambda is scored on the outer test rows. Returns a LIST of curve rows (curve_type = 'nested_cv'): one per outer fold (series 'fold', x = fold, y = test_error, with lambda, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds) and a summary row (series 'mean', y = the mean outer error weighted by test rows, y_low / y_high = mean -/+ test_se). Options: as the CV aggregate (cv_strategy, folds = outer folds, default 5; seed; metric) plus inner_folds (5) and rule ('min'). With cv_key, the folds follow cv_strategy: 'fold_id' (default; cv_key is each row's fold, any labels, at least 3), 'group' (cv_key is a group that never spans two folds; a STRUCT of several columns for a combined key), 'logo' (leave one group out), 'stratified' (cv_key is the stratum) or 'time_series' (cv_key is the time: rolling-origin splits with test_size, gap, window, max_train_size). |
NULL | [elasticnet_nested_cv_agg(y, [x1, x2], store, {'cv_strategy': 'group', 'folds': 5})] |
| elasticnet_nested_cv_by | table_macro | Table macro: computes the nested cross-validation of the elastic-net path per group of source with elasticnet_nested_cv_agg (same options) and returns one row per outer fold plus a summary row in the integration contract's curve schema: the group column, id (the group), model_id and model_name (the method), curve_type ('nested_cv'), series ('fold' | 'mean'), x (fold), y (test error), y_low, y_high (mean -/+ se on the summary row), threshold, weight, n_censor, fold, lambda, test_error, test_se, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds, n_folds, metric. cv_key := column (or a STRUCT of columns) passes the cv_key. |
NULL | [elasticnet_nested_cv_by('my_table', group_col, y, [x1, x2])] |
| elasticnet_path_agg | aggregate | Elastic-net coefficient path per group, as glmnet(alpha = l1_ratio) (default l1_ratio 0.5). Returns a LIST of terms rows (term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name = 'lambda', index_value = lambda), one per lambda and term, intercept first. Options: lambdas (default glmnet's grid), n_lambda (100), lambda_min_ratio, standardize (false), fit_intercept, feature_names. |
NULL | [elasticnet_path_agg(y, [x1, x2])] |
| elasticnet_path_agg | aggregate | Elastic-net coefficient path per group, as glmnet(alpha = l1_ratio) (default l1_ratio 0.5). Returns a LIST of terms rows (term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name = 'lambda', index_value = lambda), one per lambda and term, intercept first. Options: lambdas (default glmnet's grid), n_lambda (100), lambda_min_ratio, standardize (false), fit_intercept, feature_names. |
NULL | [elasticnet_path_agg(y, [x1, x2], {'l1_ratio': 0.5, 'lambdas': [1.0, 0.1, 0.01]})] |
| elasticnet_path_by | table_macro | Table macro: computes the elastic-net coefficient path (glmnet, l1_ratio = alpha) per group of source with elasticnet_path_agg (same options) and returns one row per index value and term in the terms schema: the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('lambda'), index_value. names := […] labels the terms. |
NULL | [elasticnet_path_by('my_table', group_col, y, [x1, x2])] |
| elasticnet_prediction_by | table_macro | Table macro: fits an Elastic Net regression per group of source (elasticnet_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('elasticnet'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [elasticnet_prediction_by('sales', store, week, revenue, [price, promo])] |
| elasticnet_rolling_tidy_by | table_macro | Table macro: fits an Elastic Net regression over a trailing window of window_size rows (ordered by order_col) within each group of source and returns the coefficients of every window as terms rows (integration contract): the group column, id (the group), model_id and model_name (the method), window_end (order_col of the window's last row), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('window_end'), index_value (the window's 1-based end position in its group) and n_window. Windows with fewer than min_obs rows (default window_size) are skipped. |
NULL | [elasticnet_rolling_tidy_by('my_table', group_col, t, y, [x1, x2], window_size := 24)] |
| elasticnet_tidy_by | table_macro | Table macro: fits an Elastic Net regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. The model has no coefficient inference. names := […] labels the terms. | NULL | [elasticnet_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| energy_distance_agg | aggregate | Computes the energy distance between two samples as a measure of distributional difference, using default options. | NULL | [energy_distance_agg(value, group_id)] |
| energy_distance_agg | aggregate | Computes the energy distance between two samples as a measure of distributional difference. | NULL | [energy_distance_agg(value, group_id, {'n_permutations': 1000})] |
| epps_singleton_agg | aggregate | Epps-Singleton two-sample test based on the empirical characteristic function (scipy epps_singleton_2samp). | NULL | [epps_singleton_agg(value, group_id, {'t': [0.4, 0.8]})] |
| epps_singleton_agg | aggregate | Epps-Singleton two-sample test based on the empirical characteristic function (scipy epps_singleton_2samp). Default options. | NULL | [epps_singleton_agg(value, group_id)] |
| fisher_exact_agg | aggregate | Performs Fisher's exact test for association in a 2×2 contingency table. | NULL | [fisher_exact_agg(row_var, col_var)] |
| fisher_exact_agg | aggregate | Performs Fisher's exact test for association in a 2×2 contingency table. | NULL | [fisher_exact_agg(row_var, col_var, {'alternative': 'two_sided'})] |
| g_test_agg | aggregate | Performs a G-test (log-likelihood ratio test) for goodness of fit or independence. | NULL | [g_test_agg(row_var, col_var)] |
| gamma_augment_agg | aggregate | Fits a Gamma GLM (log link) over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [gamma_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| gamma_augment_agg | aggregate | Fits a Gamma GLM (log link) over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [gamma_augment_agg(y, [x1, x2], {'fit_intercept': true}) OVER ()] |
| gamma_augment_by | table_macro | Table macro: fits a Gamma GLM (log link) per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, approx_loo_fitted and approx_loo_residual (one-step approximate leave-one-out prediction and residual, response scale: not the refit). Non-training rows get the prediction as fitted and NULL diagnostics. Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [gamma_augment_by('my_table', group_col, y, [x1, x2])] |
| gamma_effects_by | table_macro | Table macro: marginal-effect grid of a Gamma GLM per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of gamma_tidy_by). |
NULL | [gamma_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| gamma_fit_agg | aggregate | Fits a Gamma GLM (log link, var_power = 2.0 fixed) and returns coefficients, deviance, AIC, dispersion, and fit statistics. | NULL | [gamma_fit_agg(y, x)] |
| gamma_fit_agg | aggregate | Fits a Gamma GLM (log link, var_power = 2.0 fixed) and returns coefficients, deviance, AIC, dispersion, and fit statistics. y must be strictly positive. | NULL | [gamma_fit_agg(y, x, {'fit_intercept': true})] |
| gamma_fit_predict_by | table_macro | Table macro: fits a Gamma GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [gamma_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| gamma_glance_by | table_macro | Table macro: fits a Gamma GLM per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [gamma_glance_by('my_table', group_col, y, [x1, x2])] |
| gamma_partial_residuals_agg | aggregate | Fits a Gamma GLM (log link) over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots; the working residual), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots; NULL for GLMs). Rows not used for fitting get NULL residuals. | NULL | [gamma_partial_residuals_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| gamma_partial_residuals_by | table_macro | Table macro: fits a Gamma GLM per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= working residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (NULL for GLMs). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [gamma_partial_residuals_by('my_table', group_col, y, [x1, x2])] |
| gamma_prediction_by | table_macro | Table macro: fits a Gamma GLM per group of source (gamma_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('gamma'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [gamma_prediction_by('sales', store, week, revenue, [price, promo])] |
| gamma_tidy_by | table_macro | Table macro: fits a Gamma GLM per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [gamma_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| glance | scalar | Model-level summary with the same fields for every model: model_type, family, link, n_observations, n_features, r_squared, adj_r_squared, residual_std_error, f_statistic, f_pvalue, log_likelihood, aic, bic, deviance, null_deviance, pseudo_r_squared, dispersion, iterations, converged, press, press_rmse, loo_r_squared. Fields a model does not have are NULL. | NULL | [glance(ols_fit_agg(y, [x1, x2])).*] |
| glmm_augment_agg | aggregate | Window aggregate: fits the same mixed model as glmm_fit_agg over the frame and returns one STRUCT per input row (in frame order) with fitted (conditional on the BLUPs, response scale), fitted_population (random effects at zero), residual (y - fitted), pearson_residual and is_training. Use it over a whole partition, as glmm_augment_by does. | NULL | [glmm_augment_agg(y, [x1, x2], store_id) OVER ()] |
| glmm_augment_agg | aggregate | Window aggregate: fits the same mixed model as glmm_fit_agg over the frame and returns one STRUCT per input row (in frame order) with fitted (conditional on the BLUPs, response scale), fitted_population (random effects at zero), residual (y - fitted), pearson_residual and is_training. Use it over a whole partition, as glmm_augment_by does. | NULL | [glmm_augment_agg(y, [x1, x2], store_id, {'family': 'poisson'}) OVER ()] |
| glmm_augment_by | table_macro | Table macro: fits one generalized linear mixed model (glmm_augment_agg, random effects over re_group) per group_col and returns every source row with its per-observation results (the integration contract's obs schema, broom.mixed::augment): all source columns, model_id and model_name ('glmm'), row_id, fitted (conditional on the BLUPs, response scale), residual (y - fitted), resid_type ('response'), std_residual, stud_residual, leverage, cooks_d, dffits (NULL), weight, is_training, n_params (NULL), then fitted_population (random effects at zero) and pearson_residual. Rows the fit could not use get NULLs. |
NULL | [glmm_augment_by('sales', region, revenue, [price], store)] |
| glmm_fit_agg | aggregate | Fits a generalized linear mixed model with a MAP of options (family, reml, random slopes, crossed groups, compute_inference, …). | NULL | [glmm_fit_agg(y, [x1, x2], store_id, {'family': 'poisson'})] |
| glmm_fit_agg | aggregate | Fits a generalized linear mixed model with a random intercept per group (one model across all groups); returns fixed effects, variance components and per-group random effects. | NULL | [glmm_fit_agg(y, [x1, x2], store_id)] |
| glmm_fit_by | table_macro | Table macro: fits one generalized linear mixed model (random intercept per group_col) over the whole table and returns one row per group with its random effect and the fixed effects and variance components. | NULL | [glmm_fit_by('my_table', group_col, y, [x1, x2])] |
| glmm_glance_by | table_macro | Table macro: fits one generalized linear mixed model (glmm_fit_agg, random effects over re_group) per group_col and returns its fit statistics in long form (the integration contract's summary schema, broom.mixed::glance): the group column, id (the group), model_id and model_name ('glmm'), model_type, metric, value. Metrics: n_observations, n_groups, n_features, sigma, log_likelihood, aic, bic, deviance (the REML criterion for a REML fit), df_residual, var_group, var_residual, icc, nb_theta (negative binomial), converged (1/0), iterations. |
NULL | [glmm_glance_by('sales', region, revenue, [price], store)] |
| glmm_tidy_by | table_macro | Table macro: fits one generalized linear mixed model (glmm_fit_agg, random effects over re_group) per group_col and returns its terms (the integration contract's terms schema, broom.mixed::tidy): the group column, id (the group), model_id and model_name ('glmm'), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value, then effect ('fixed', 'ran_pars', 'ran_vals'), re_group, re_level and df. Fixed effects carry Wald z or, for gaussian, Satterthwaite t inference (option ddf; inference is always computed); ran_pars rows are the random-effect SDs (sd__ |
NULL | [glmm_tidy_by('sales', region, revenue, [price], store, names := ['price'])] |
| hellinger_agg | aggregate | Hellinger distance in [0, 1] on shared bins (evidently 'hellinger'). | NULL | [hellinger_agg(value, group_id, {'binning': 'auto', 'threshold': 0.1})] |
| hellinger_agg | aggregate | Hellinger distance in [0, 1] on shared bins (evidently 'hellinger'). Default options. | NULL | [hellinger_agg(value, group_id)] |
| huber_fit | scalar | Fits a Huber M-estimator regression model with optional MAP of settings (epsilon, alpha, fit_intercept, compute_inference, confidence_level, max_iterations, tolerance). | NULL | [huber_fit(y, x, {'epsilon': 1.35, 'alpha': 0.01})] |
| huber_fit | scalar | Fits a Huber M-estimator robust regression model. Returns coefficients, fit statistics, the MAD-based scale, and the outlier count as a struct. | NULL | [huber_fit(y, x)] |
| huber_fit_agg | aggregate | Fits a Huber M-estimator robust regression model and returns coefficients, fit statistics, the MAD-based scale, and the outlier count as a struct. | NULL | [huber_fit_agg(y, x)] |
| huber_fit_agg | aggregate | Fits a Huber M-estimator robust regression model and returns coefficients, fit statistics, the MAD-based scale, and the outlier count as a struct. | NULL | [huber_fit_agg(y, x, {'epsilon': 1.35, 'fit_intercept': true})] |
| huber_fit_predict | aggregate | Window aggregate: fits a Huber M-estimator regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use huber_fit_predict_agg. | NULL | [huber_fit_predict(y, x) OVER (PARTITION BY g ORDER BY t)] |
| huber_fit_predict | aggregate | Window aggregate: fits a Huber M-estimator regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use huber_fit_predict_agg. | NULL | [huber_fit_predict(y, x, {'epsilon': 1.5}) OVER (…)] |
| huber_fit_predict_agg | aggregate | Fits Huber regression on training rows with a MAP of options and predicts all rows. | NULL | [huber_fit_predict_agg(y, x, split_col, {'epsilon': 1.5})] |
| huber_fit_predict_agg | aggregate | Fits Huber regression over a partition with a MAP of options and returns per-row predictions with prediction intervals. | NULL | [huber_fit_predict_agg(y, x, {'epsilon': 1.35, 'null_policy': 'drop'})] |
| huber_fit_predict_agg | aggregate | Fits Huber regression using only training rows (split_col='train') and predicts all rows. | NULL | [huber_fit_predict_agg(y, x, split_col)] |
| huber_fit_predict_agg | aggregate | Fits a Huber M-estimator robust regression over a partition and returns per-row predictions with prediction intervals. | NULL | [huber_fit_predict_agg(y, x)] |
| huber_fit_predict_by | table_macro | Table macro: fits a Huber M-estimator regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [huber_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| huber_glance_by | table_macro | Table macro: fits a Huber M-estimator regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [huber_glance_by('my_table', group_col, y, [x1, x2])] |
| huber_prediction_by | table_macro | Table macro: fits a Huber M-estimator regression per group of source (huber_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('huber'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [huber_prediction_by('sales', store, week, revenue, [price, promo])] |
| huber_rolling_tidy_by | table_macro | Table macro: fits a Huber M-estimator regression over a trailing window of window_size rows (ordered by order_col) within each group of source and returns the coefficients of every window as terms rows (integration contract): the group column, id (the group), model_id and model_name (the method), window_end (order_col of the window's last row), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('window_end'), index_value (the window's 1-based end position in its group) and n_window. Windows with fewer than min_obs rows (default window_size) are skipped. |
NULL | [huber_rolling_tidy_by('my_table', group_col, t, y, [x1, x2], window_size := 24)] |
| huber_tidy_by | table_macro | Table macro: fits a Huber M-estimator regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [huber_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| icc_agg | aggregate | Computes the Intraclass Correlation Coefficient (ICC) to measure rater or measurement consistency. | NULL | [icc_agg(value, subject_id, rater_id)] |
| icc_agg | aggregate | Computes the Intraclass Correlation Coefficient (ICC) to measure rater or measurement consistency. | NULL | [icc_agg(value, subject_id, rater_id, {'type': 'single'})] |
| isotonic_fit_agg | aggregate | Fits a monotonic (isotonic) regression of y on a single x per group and returns the step function as sorted knots x with fitted values. | NULL | [isotonic_fit_agg(y, x)] |
| isotonic_fit_agg | aggregate | Fits a monotonic (isotonic) regression of y on a single x per group and returns the step function as sorted knots x with fitted values. | NULL | [isotonic_fit_agg(y, x, {'increasing': false})] |
| isotonic_fit_predict_agg | aggregate | Fits an isotonic regression model on training rows with a MAP of options and predicts all rows. | NULL | [isotonic_fit_predict_agg(y, x, split_col, {'increasing': true})] |
| isotonic_fit_predict_agg | aggregate | Fits an isotonic regression model over a partition and returns per-row predictions. | NULL | [isotonic_fit_predict_agg(y, x)] |
| isotonic_fit_predict_agg | aggregate | Fits an isotonic regression model over a partition with a MAP of options and returns per-row predictions. | NULL | [isotonic_fit_predict_agg(y, x, {'increasing': true})] |
| isotonic_fit_predict_agg | aggregate | Fits an isotonic regression model using only training rows (split_col='train') and predicts all rows. | NULL | [isotonic_fit_predict_agg(y, x, split_col)] |
| isotonic_fit_predict_by | table_macro | Table macro: fits an isotonic regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [isotonic_fit_predict_by('my_table', group_col, y, x)] |
| isotonic_prediction_by | table_macro | Table macro: fits an isotonic regression per group of source (isotonic_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('isotonic'), x (x_col, the plot position and row order, and the model's one feature), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [isotonic_prediction_by('sales', store, price, revenue)] |
| jarque_bera | scalar | Tests whether a sample has skewness and kurtosis consistent with a normal distribution (Jarque-Bera test). | NULL | [jarque_bera(values)] |
| jarque_bera_agg | aggregate | Aggregate version of the Jarque-Bera normality test, applied to a column of values. | NULL | [jarque_bera_agg(value)] |
| jensen_shannon_agg | aggregate | Jensen-Shannon distance (square root of the divergence) on shared bins (evidently 'jensenshannon'). | NULL | [jensen_shannon_agg(value, group_id, {'binning': 'auto', 'base': 2})] |
| jensen_shannon_agg | aggregate | Jensen-Shannon distance (square root of the divergence) on shared bins (evidently 'jensenshannon'). Default options. | NULL | [jensen_shannon_agg(value, group_id)] |
| kaplan_meier_agg | aggregate | Kaplan-Meier survival curve of right-censored durations (event true/1 = observed, false/0 = censored), as R survival::survfit: one row per distinct time with surv, the pointwise confidence interval conf_low/conf_high (Greenwood; conf_type 'log' [default], 'log-log' or 'plain'; conf_level default 0.95), n_risk, n_event, n_censor and the Greenwood std_err of surv. | NULL | [kaplan_meier_agg(duration, event, 0.95, 'log-log')] |
| kaplan_meier_by | table_macro | Table macro: one Kaplan-Meier curve per stratum of source (R survfit(Surv(time, event) ~ strata)), one row per distinct time (the integration contract's curve schema, curve_type 'km', series = stratum): the stratum column, model_id, series, curve_type, x (time), y (survival), y_low / y_high (pointwise interval), threshold, weight (number at risk), n_censor, then n_risk, n_event and std_err. |
NULL | [kaplan_meier_by('patients', treatment, duration, event, conf_type := 'log-log')] |
| kendall_agg | aggregate | Computes Kendall's tau rank correlation coefficient and tests its significance. | NULL | [kendall_agg(x, y)] |
| kendall_agg | aggregate | Computes Kendall's tau rank correlation coefficient and tests its significance. | NULL | [kendall_agg(x, y, {'alternative': 'two_sided'})] |
| kl_divergence_agg | aggregate | Kullback-Leibler divergence KL(reference || current) on shared bins (evidently 'kl_div'). | NULL | [kl_divergence_agg(value, group_id, {'binning': 'auto', 'base': 2})] |
| kl_divergence_agg | aggregate | Kullback-Leibler divergence KL(reference || current) on shared bins (evidently 'kl_div'). Default options. | NULL | [kl_divergence_agg(value, group_id)] |
| kruskal_wallis_agg | aggregate | Performs the Kruskal-Wallis H-test, a nonparametric alternative to one-way ANOVA. | NULL | [kruskal_wallis_agg(value, group_id)] |
| ks_test_agg | aggregate | Two-sample Kolmogorov-Smirnov test (R ks.test): exact p-value when n1*n2 < 10000, otherwise the limiting Kolmogorov distribution. | NULL | [ks_test_agg(value, group_id, {'alternative': 'two_sided', 'exact': true})] |
| ks_test_agg | aggregate | Two-sample Kolmogorov-Smirnov test (R ks.test): exact p-value when n1*n2 < 10000, otherwise the limiting Kolmogorov distribution. Default options. | NULL | [ks_test_agg(value, group_id)] |
| lars_fit_agg | aggregate | Fits a Least Angle Regression (LARS / LassoLars) model and returns coefficients and fit statistics. | NULL | [lars_fit_agg(y, x, {'fit_intercept': true, 'alpha': 0.0})] |
| lars_fit_agg | aggregate | Fits a Least Angle Regression (LARS) model and returns coefficients and fit statistics. | NULL | [lars_fit_agg(y, x)] |
| lars_glance_by | table_macro | Table macro: fits a LARS / Lasso-LARS regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [lars_glance_by('my_table', group_col, y, [x1, x2])] |
| lars_path_agg | aggregate | LARS / Lasso-LARS coefficient path per group, one entry per knot (index_name 'alpha', index_value the knot's alpha = max_j |x_j'(y - yhat)| on the centred design, columns scaled to unit norm with standardize; this is n * glmnet's lambda without standardize and sqrt(n) * lambda with it). Options: method ('lasso' default, 'lar'), standardize (true), n_nonzero_coefs, fit_intercept, feature_names. | NULL | [lars_path_agg(y, [x1, x2, x3])] |
| lars_path_agg | aggregate | LARS / Lasso-LARS coefficient path per group, one entry per knot (index_name 'alpha', index_value the knot's alpha = max_j |x_j'(y - yhat)| on the centred design, columns scaled to unit norm with standardize; this is n * glmnet's lambda without standardize and sqrt(n) * lambda with it). Options: method ('lasso' default, 'lar'), standardize (true), n_nonzero_coefs, fit_intercept, feature_names. | NULL | [lars_path_agg(y, [x1, x2])] |
| lars_path_by | table_macro | Table macro: computes the LARS / Lasso-LARS coefficient path per group of source with lars_path_agg (same options) and returns one row per index value and term in the terms schema: the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('alpha'), index_value. names := […] labels the terms. |
NULL | [lars_path_by('my_table', group_col, y, [x1, x2])] |
| lars_tidy_by | table_macro | Table macro: fits a LARS / Lasso-LARS regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. The model has no coefficient inference. names := […] labels the terms. | NULL | [lars_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| linear_predict | scalar | Applies coefficients and an intercept to column-layout feature data (LIST of feature columns) and returns the list of predictions. Same as the 3-argument predict(). | NULL | [linear_predict([[1.0, 2.0], [3.0, 4.0]], [0.5, 1.5], 2.0)] |
| ljung_box_agg | aggregate | Ljung-Box portmanteau test for autocorrelation of x in the aggregate's ORDER BY order (R Box.test(x, lag, type = 'Ljung-Box', fitdf)): statistic Q, df1 = lag - fitdf, p_value. lag defaults to 1, fitdf to 0. | NULL | [ljung_box_agg(resid, 10, 2 ORDER BY t)] |
| lm_dynamic_fit_agg | aggregate | Fits a dynamic linear model with time-varying coefficients (greybox lmDynamic, bruteforce): every subset of the regressors is fitted, each row weights them by its pointwise information criterion and gets the weighted coefficients. Rows are in input order (give it with ORDER BY). Returns the time-averaged coefficients and intercept, fit statistics, n_models and, per row used, dynamic_intercept, dynamic_coefficients and fitted_values. Options: ic ('aicc' default | 'aic' | 'bic'), span (lowess f smoothing the model weights over time, default 0.3; 0 = no smoothing), fit_intercept. | NULL | [lm_dynamic_fit_agg(y, [x1, x2] ORDER BY t)] |
| lm_dynamic_fit_agg | aggregate | Fits a dynamic linear model with time-varying coefficients (greybox lmDynamic, bruteforce): every subset of the regressors is fitted, each row weights them by its pointwise information criterion and gets the weighted coefficients. Rows are in input order (give it with ORDER BY). Returns the time-averaged coefficients and intercept, fit statistics, n_models and, per row used, dynamic_intercept, dynamic_coefficients and fitted_values. Options: ic ('aicc' default | 'aic' | 'bic'), span (lowess f smoothing the model weights over time, default 0.3; 0 = no smoothing), fit_intercept. | NULL | [lm_dynamic_fit_agg(y, [x1, x2], {'ic': 'bic', 'span': 0.5} ORDER BY t)] |
| lm_dynamic_fit_predict_agg | aggregate | Fits a dynamic linear model (greybox lmDynamic) on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (the row's own time-varying fit; rows outside the fit use the time-averaged coefficients), yhat_lower / yhat_upper (NULL), is_training, and the row's dynamic intercept and coefficients (NULL outside the fit). Options: ic ('aicc' default | 'aic' | 'bic'), span (lowess f smoothing the model weights over time, default 0.3; 0 = no smoothing), fit_intercept. | NULL | [lm_dynamic_fit_predict_agg(y, x ORDER BY t)] |
| lm_dynamic_fit_predict_agg | aggregate | Fits a dynamic linear model (greybox lmDynamic) on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (the row's own time-varying fit; rows outside the fit use the time-averaged coefficients), yhat_lower / yhat_upper (NULL), is_training, and the row's dynamic intercept and coefficients (NULL outside the fit). Options: ic ('aicc' default | 'aic' | 'bic'), span (lowess f smoothing the model weights over time, default 0.3; 0 = no smoothing), fit_intercept. | NULL | [lm_dynamic_fit_predict_agg(y, x, split ORDER BY t)] |
| lm_dynamic_fit_predict_agg | aggregate | Fits a dynamic linear model (greybox lmDynamic) on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (the row's own time-varying fit; rows outside the fit use the time-averaged coefficients), yhat_lower / yhat_upper (NULL), is_training, and the row's dynamic intercept and coefficients (NULL outside the fit). Options: ic ('aicc' default | 'aic' | 'bic'), span (lowess f smoothing the model weights over time, default 0.3; 0 = no smoothing), fit_intercept. | NULL | [lm_dynamic_fit_predict_agg(y, x, split, {'ic': 'aic'} ORDER BY t)] |
| lm_dynamic_fit_predict_agg | aggregate | Fits a dynamic linear model (greybox lmDynamic) on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (the row's own time-varying fit; rows outside the fit use the time-averaged coefficients), yhat_lower / yhat_upper (NULL), is_training, and the row's dynamic intercept and coefficients (NULL outside the fit). Options: ic ('aicc' default | 'aic' | 'bic'), span (lowess f smoothing the model weights over time, default 0.3; 0 = no smoothing), fit_intercept. | NULL | [lm_dynamic_fit_predict_agg(y, x, {'span': 0} ORDER BY t)] |
| lm_dynamic_fit_predict_by | table_macro | Table macro: fits a dynamic linear model with time-varying coefficients (greybox lmDynamic) per group of source in order_by order (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (the row's own time-varying fit; rows outside the fit use the time-averaged coefficients), yhat_lower / yhat_upper (NULL) and is_training appended. | NULL | [lm_dynamic_fit_predict_by('my_table', group_col, y, [x1, x2], order_by := t)] |
| lm_dynamic_glance_by | table_macro | Table macro: fits a dynamic linear model with time-varying coefficients (greybox lmDynamic) per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. Rows are fitted in order_col order (the model is sequential). | NULL | [lm_dynamic_glance_by('my_table', group_col, t, y, [x1, x2])] |
| lm_dynamic_prediction_by | table_macro | Table macro: fits a dynamic linear model with time-varying coefficients (greybox lmDynamic) per group of source (lm_dynamic_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('lm_dynamic'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [lm_dynamic_prediction_by('sales', store, week, revenue, [price, promo])] |
| lm_dynamic_tidy_by | table_macro | Table macro: fits a dynamic linear model with time-varying coefficients (greybox lmDynamic) per group of source (rows in order_col order) and returns the time-varying coefficients of every fitted row as terms rows, intercept first (the shape of |
NULL | [lm_dynamic_tidy_by('my_table', group_col, t, y, [x1, x2], names := ['x1', 'x2'])] |
| log_loss_agg | aggregate | Log loss (mean binary cross-entropy, scikit-learn log_loss); probabilities are clipped to [eps, 1 - eps]. | NULL | [log_loss_agg(y_true, prob)] |
| log_rank_test_agg | aggregate | Log-rank test of equal survival across two or more groups (R survival::survdiff, rho = 0): statistic (chi-squared), df1 (groups - 1), p_value, n. | NULL | [log_rank_test_agg(duration, event, treatment)] |
| logistic_augment_agg | aggregate | Fits a logistic regression over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [logistic_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| logistic_augment_agg | aggregate | Fits a logistic regression over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [logistic_augment_agg(y, [x1, x2], {'fit_intercept': true}) OVER ()] |
| logistic_augment_by | table_macro | Table macro: fits a logistic regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, approx_loo_fitted and approx_loo_residual (one-step approximate leave-one-out prediction and residual, response scale: not the refit). Non-training rows get the prediction as fitted and NULL diagnostics. Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [logistic_augment_by('my_table', group_col, y, [x1, x2])] |
| logistic_effects_by | table_macro | Table macro: marginal-effect grid of a logistic regression per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of logistic_tidy_by). |
NULL | [logistic_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| logistic_fit_agg | aggregate | Fits a binary Logistic regression (binomial GLM with logit link; classifier API). y must be binary (0 or 1). Result struct extends the standard GLM shape with accuracy (on training data, at the configured threshold) and the threshold echo. Optional L2 (ridge) penalty. |
NULL | [logistic_fit_agg(y, x, {'glm_lambda': 0.1, 'threshold': 0.5})] |
| logistic_fit_agg | aggregate | Fits a binary Logistic regression (binomial GLM with logit link; classifier API). y must be binary (0 or 1). Result struct extends the standard GLM shape with accuracy and the threshold echo. |
NULL | [logistic_fit_agg(y, x)] |
| logistic_fit_predict_by | table_macro | Table macro: fits a logistic regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [logistic_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| logistic_glance_by | table_macro | Table macro: fits a logistic regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [logistic_glance_by('my_table', group_col, y, [x1, x2])] |
| logistic_partial_residuals_agg | aggregate | Fits a logistic regression over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots; the working residual), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots; NULL for GLMs). Rows not used for fitting get NULL residuals. | NULL | [logistic_partial_residuals_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| logistic_partial_residuals_by | table_macro | Table macro: fits a logistic regression per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= working residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (NULL for GLMs). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [logistic_partial_residuals_by('my_table', group_col, y, [x1, x2])] |
| logistic_prediction_by | table_macro | Table macro: fits a logistic regression per group of source (logistic_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('logistic'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [logistic_prediction_by('sales', store, week, revenue, [price, promo])] |
| logistic_tidy_by | table_macro | Table macro: fits a logistic regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [logistic_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| lowess_agg | aggregate | LOWESS scatterplot smoother of y on x per group (R stats::lowess: local linear fits with tricube weights over the frac * n nearest points, iterations robustifying passes; delta at R's default). Returns the curve as a LIST of {x, yhat}, x increasing, one point per complete row. frac defaults to 2/3, iterations to 3. | NULL | [lowess_agg(y, x)] |
| lowess_agg | aggregate | LOWESS scatterplot smoother of y on x per group (R stats::lowess: local linear fits with tricube weights over the frac * n nearest points, iterations robustifying passes; delta at R's default). Returns the curve as a LIST of {x, yhat}, x increasing, one point per complete row. frac defaults to 2/3, iterations to 3. | NULL | [lowess_agg(y, x, 0.3)] |
| lowess_agg | aggregate | LOWESS scatterplot smoother of y on x per group (R stats::lowess: local linear fits with tricube weights over the frac * n nearest points, iterations robustifying passes; delta at R's default). Returns the curve as a LIST of {x, yhat}, x increasing, one point per complete row. frac defaults to 2/3, iterations to 3. | NULL | [lowess_agg(y, x, 0.3, 0)] |
| lowess_by | table_macro | Table macro: the LOWESS smoother of y_col on x_col per group of source (R stats::lowess(x, y, f = frac, iter = iterations), see lowess_agg), one row per point in x order (the integration contract's curve schema, curve_type 'lowess'): the group column, id (the group), model_id and model_name ('lowess'), curve_type, series, x, y (the smoothed value), y_low, y_high, threshold, weight, n_censor. |
NULL | [lowess_by('measurements', sensor, temperature, load, frac := 0.3)] |
| ls_state_agg | aggregate | Compact, mergeable least-squares state of a group's rows (counts, weighted means and centred co-moments, O(p^2) bytes) as a BLOB. Store it, merge states with ls_state_combine_agg, and fit with ols_fit_from_state / wls_fit_from_state / ridge_fit_from_state without the rows. Rows with a NULL y, x element or weight are skipped; the bytes do not depend on the row order. | NULL | [ls_state_agg(y, [x1, x2])] |
| ls_state_agg | aggregate | Compact, mergeable least-squares state of a group's rows (counts, weighted means and centred co-moments, O(p^2) bytes) as a BLOB. Store it, merge states with ls_state_combine_agg, and fit with ols_fit_from_state / wls_fit_from_state / ridge_fit_from_state without the rows. Rows with a NULL y, x element or weight are skipped; the bytes do not depend on the row order. | NULL | [ls_state_agg(y, [x1, x2], weight)] |
| ls_state_combine_agg | aggregate | Merges least-squares states from ls_state_agg into one state, as if ls_state_agg had seen all their rows (NULL states are skipped). States must have the same number of features; the result does not depend on the order of the states. | NULL | [ls_state_combine_agg(state)] |
| ls_state_info | scalar | Row count (zero-weight rows included), feature count and whether the rows were weighted, of a least-squares state. | NULL | [ls_state_info(state)] |
| mann_whitney_u_agg | aggregate | Performs the Mann-Whitney U test (Wilcoxon rank-sum) for two independent samples, using default options. | NULL | [mann_whitney_u_agg(value, group_id)] |
| mann_whitney_u_agg | aggregate | Performs the Mann-Whitney U test (Wilcoxon rank-sum) for two independent samples. | NULL | [mann_whitney_u_agg(value, group_id, {'alternative': 'two_sided'})] |
| mcnemar_agg | aggregate | Performs McNemar's test for marginal homogeneity in paired categorical data. | NULL | [mcnemar_agg(var1, var2)] |
| mcnemar_agg | aggregate | Performs McNemar's test for marginal homogeneity in paired categorical data. | NULL | [mcnemar_agg(var1, var2, {'correction': true})] |
| mediation_agg | aggregate | Causal mediation analysis (linear models, as R mediation::mediate): fits m ~ x + covariates and y ~ x + m + covariates and returns one row per effect (acme, ade, total, prop_mediated) with estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, method, n_obs and n_sims. Inference by nonparametric bootstrap (default), Sobel or quasi-Bayesian Monte Carlo. | NULL | [mediation_agg(y, m, treat)] |
| mediation_agg | aggregate | Causal mediation analysis (linear models, as R mediation::mediate): fits m ~ x + covariates and y ~ x + m + covariates and returns one row per effect (acme, ade, total, prop_mediated) with estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, method, n_obs and n_sims. Inference by nonparametric bootstrap (default), Sobel or quasi-Bayesian Monte Carlo. | NULL | [mediation_agg(y, m, treat, [age, baseline])] |
| mediation_agg | aggregate | Causal mediation analysis (linear models, as R mediation::mediate): fits m ~ x + covariates and y ~ x + m + covariates and returns one row per effect (acme, ade, total, prop_mediated) with estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, method, n_obs and n_sims. Inference by nonparametric bootstrap (default), Sobel or quasi-Bayesian Monte Carlo. | NULL | [mediation_agg(y, m, treat, [age], {'n_bootstrap': 2000, 'seed': 7})] |
| mediation_by | table_macro | Table macro: causal mediation analysis per group of source (linear models, as R mediation::mediate): fits mediator ~ treatment + covariates and outcome ~ treatment + mediator + covariates and returns one row per group and effect (acme, ade, total, prop_mediated) in the contract terms schema plus method, n_obs and n_sims. Inference by nonparametric bootstrap (default, n_bootstrap 1000, seed 42), Sobel or quasi-Bayesian Monte Carlo (options method, ci_type, n_bootstrap, seed, confidence_level, treat_value, control_value). | NULL | [mediation_by('trial', site, treat, m, y, covariates := [age, baseline])] |
| mmd_agg | aggregate | Computes the Maximum Mean Discrepancy (MMD) between two samples to test distributional similarity, using default options. | NULL | [mmd_agg(value, group_id)] |
| mmd_agg | aggregate | Computes the Maximum Mean Discrepancy (MMD) between two samples to test distributional similarity. | NULL | [mmd_agg(value, group_id, {'n_permutations': 1000})] |
| negbinom_augment_agg | aggregate | Fits a Negative Binomial GLM over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [negbinom_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| negbinom_augment_agg | aggregate | Fits a Negative Binomial GLM over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [negbinom_augment_agg(y, [x1, x2], {'theta': 2.0}) OVER ()] |
| negbinom_augment_by | table_macro | Table macro: fits a Negative Binomial GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, approx_loo_fitted and approx_loo_residual (one-step approximate leave-one-out prediction and residual, response scale: not the refit). Non-training rows get the prediction as fitted and NULL diagnostics. Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [negbinom_augment_by('my_table', group_col, y, [x1, x2])] |
| negbinom_effects_by | table_macro | Table macro: marginal-effect grid of a negative binomial GLM per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of negbinom_tidy_by). |
NULL | [negbinom_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| negbinom_fit_agg | aggregate | Fits a Negative Binomial GLM (log link, overdispersion parameter estimated jointly) and returns coefficients, deviance, AIC, dispersion (= alpha), and fit statistics. | NULL | [negbinom_fit_agg(y, x)] |
| negbinom_fit_agg | aggregate | Fits a Negative Binomial GLM (log link, overdispersion parameter estimated jointly) and returns coefficients, deviance, AIC, dispersion (= alpha), and fit statistics. | NULL | [negbinom_fit_agg(y, x, {'fit_intercept': true})] |
| negbinom_fit_predict_by | table_macro | Table macro: fits a negative binomial GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [negbinom_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| negbinom_glance_by | table_macro | Table macro: fits a negative binomial GLM per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [negbinom_glance_by('my_table', group_col, y, [x1, x2])] |
| negbinom_partial_residuals_agg | aggregate | Fits a Negative Binomial GLM over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots; the working residual), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots; NULL for GLMs). Rows not used for fitting get NULL residuals. | NULL | [negbinom_partial_residuals_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| negbinom_partial_residuals_by | table_macro | Table macro: fits a negative binomial GLM per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= working residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (NULL for GLMs). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [negbinom_partial_residuals_by('my_table', group_col, y, [x1, x2])] |
| negbinom_prediction_by | table_macro | Table macro: fits a negative binomial GLM per group of source (negbinom_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('negbinom'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [negbinom_prediction_by('sales', store, week, revenue, [price, promo])] |
| negbinom_tidy_by | table_macro | Table macro: fits a negative binomial GLM per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [negbinom_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| nnls_fit_agg | aggregate | Fits a Non-Negative Least Squares (NNLS) regression with non-negativity constraints. | NULL | [nnls_fit_agg(y, x)] |
| nnls_fit_agg | aggregate | Fits a Non-Negative Least Squares (NNLS) regression with non-negativity constraints. | NULL | [nnls_fit_agg(y, x, {'tolerance': 1e-6})] |
| nnls_glance_by | table_macro | Table macro: fits a non-negative least squares regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [nnls_glance_by('my_table', group_col, y, [x1, x2])] |
| nnls_tidy_by | table_macro | Table macro: fits a non-negative least squares regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. The model has no coefficient inference. names := […] labels the terms. | NULL | [nnls_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| ols_anova_agg | aggregate | Nested-model F test per group (R's anova(lm(y ~ x_reduced), lm(y ~ x_full))): does the full OLS model fit significantly better than the reduced one? Returns the F statistic, df1, df2, p_value, both RSS values and both adjusted R^2 values. x_reduced := [] is the intercept-only model; its columns must appear in x_full. | NULL | [ols_anova_agg(y, [price], [price, promo, temp])] |
| ols_anova_agg | aggregate | Nested-model F test per group (R's anova(lm(y ~ x_reduced), lm(y ~ x_full))): does the full OLS model fit significantly better than the reduced one? Returns the F statistic, df1, df2, p_value, both RSS values and both adjusted R^2 values. x_reduced := [] is the intercept-only model; its columns must appear in x_full. | NULL | [ols_anova_agg(y, [price], [price, promo, temp], {'fit_intercept': false})] |
| ols_anova_by | table_macro | Table macro: nested-model F test per group of source (R's anova(lm(y ~ x_reduced), lm(y ~ x_full)) on the same rows); returns one row per group with method 'nested F', statistic, p_value, df1, df2, both RSS values and the adjusted R^2 of both models. x_reduced := [] (the default) is the intercept-only model. | NULL | [ols_anova_by('sales', region, y, x_reduced := [price], x_full := [price, promo, temp])] |
| ols_anova_table_agg | aggregate | Per-term ANOVA table of an OLS fit per group: R's anova(lm(y ~ x)) (type I, sequential sums of squares in the column order) or car::Anova(fit, type = 2) (type II, each term adjusted for all others). Returns one list element per term: term, statistic (F), df1, df2 (residual df), p_value, sum_sq, mean_sq and the residual sum of squares. Options: type ('I' default, 'II'), terms (one label per x column; equal labels form one term, e.g. factor dummies), fit_intercept. | NULL | [ols_anova_table_agg(y, [price, promo, temp])] |
| ols_anova_table_agg | aggregate | Per-term ANOVA table of an OLS fit per group: R's anova(lm(y ~ x)) (type I, sequential sums of squares in the column order) or car::Anova(fit, type = 2) (type II, each term adjusted for all others). Returns one list element per term: term, statistic (F), df1, df2 (residual df), p_value, sum_sq, mean_sq and the residual sum of squares. Options: type ('I' default, 'II'), terms (one label per x column; equal labels form one term, e.g. factor dummies), fit_intercept. | NULL | [ols_anova_table_agg(y, [price, promo, temp], {'type': 'II', 'terms': ['price', 'promo', 'temp']})] |
| ols_anova_table_by | table_macro | Table macro: per-term ANOVA table per group of source (R's anova(lm(y ~ x)), type I sequential sums of squares in the column order, or car::Anova(fit, type = 2) with options {'type': 'II'}); returns one row per group and term with term, method, statistic (F), p_value, df1, df2 (residual df), sum_sq, mean_sq and the residual sum of squares. options terms: one label per x column, equal labels form one term (e.g. factor dummies). | NULL | [ols_anova_table_by('sales', region, y, [price, promo, temp], options := {'type': 'II'})] |
| ols_augment_agg | aggregate | Fits OLS over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted, residual, resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training and n_params (broom augment). | NULL | [ols_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| ols_augment_agg | aggregate | Fits OLS over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted, residual, resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training and n_params (broom augment). | NULL | [ols_augment_agg(y, [x1, x2], {'fit_intercept': true}) OVER ()] |
| ols_augment_by | table_macro | Table macro: fits an OLS regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted, residual, resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, loo_residual and loo_fitted (exact leave-one-out: residual / (1 - leverage) and y minus it, NULL where leverage = 1). Non-training rows get the prediction as fitted and NULL diagnostics. | NULL | [ols_augment_by('my_table', group_col, y, [x1, x2])] |
| ols_effects_by | table_macro | Table macro: marginal-effect grid of an OLS regression per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of ols_tidy_by). |
NULL | [ols_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| ols_fit | scalar | Fits an OLS regression model with optional MAP of settings (fit_intercept, compute_inference, confidence_level, solver, hc_type, alias_tolerance, compute_loo). | NULL | [ols_fit(y, x, {'compute_inference': true, 'confidence_level': 0.95})] |
| ols_fit | scalar | Fits an Ordinary Least Squares (OLS) regression model to the given response and feature data. | NULL | [ols_fit(y, x)] |
| ols_fit_agg | aggregate | Fits an OLS regression model and returns coefficients and fit statistics as a struct. | NULL | [ols_fit_agg(y, x)] |
| ols_fit_agg | aggregate | Fits an OLS regression model and returns coefficients and fit statistics as a struct. | NULL | [ols_fit_agg(y, x, {'fit_intercept': true})] |
| ols_fit_from_state | scalar | Fits OLS from a least-squares state (ls_state_agg / ls_state_combine_agg): the same STRUCT as ols_fit_agg on the rows (coefficients, inference with compute_inference, vcov), up to floating-point summation order. A weighted state gives the WLS fit. Row-level options (hc_type, compute_loo) need the rows and raise an error. | NULL | [ols_fit_from_state(state)] |
| ols_fit_from_state | scalar | Fits OLS from a least-squares state (ls_state_agg / ls_state_combine_agg): the same STRUCT as ols_fit_agg on the rows (coefficients, inference with compute_inference, vcov), up to floating-point summation order. A weighted state gives the WLS fit. Row-level options (hc_type, compute_loo) need the rows and raise an error. | NULL | [ols_fit_from_state(state, {'compute_inference': true})] |
| ols_fit_predict | aggregate | Window aggregate: fits an OLS regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use ols_fit_predict_agg. | NULL | [ols_fit_predict(y, x)] |
| ols_fit_predict | aggregate | Window aggregate: fits an OLS regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use ols_fit_predict_agg. | NULL | [ols_fit_predict(y, x, {'null_policy': 'drop'})] |
| ols_fit_predict_agg | aggregate | Fits OLS regression on training rows with a MAP of options and predicts all rows. | NULL | [ols_fit_predict_agg(y, x, split_col, {'null_policy': 'drop'})] |
| ols_fit_predict_agg | aggregate | Fits OLS regression over a partition and returns per-row predictions with prediction intervals. | NULL | [ols_fit_predict_agg(y, x)] |
| ols_fit_predict_agg | aggregate | Fits OLS regression over a partition with a MAP of options and returns per-row predictions with prediction intervals. | NULL | [ols_fit_predict_agg(y, x, {'null_policy': 'drop'})] |
| ols_fit_predict_agg | aggregate | Fits OLS regression using only training rows (split_col='train') and predicts all rows. | NULL | [ols_fit_predict_agg(y, x, split_col)] |
| ols_fit_predict_by | table_macro | Table macro: fits an OLS regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [ols_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| ols_glance_by | table_macro | Table macro: fits an OLS regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [ols_glance_by('my_table', group_col, y, [x1, x2])] |
| ols_partial_residuals_agg | aggregate | Fits OLS over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots). Rows not used for fitting get NULL residuals. | NULL | [ols_partial_residuals_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| ols_partial_residuals_by | table_macro | Table macro: fits an OLS regression per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (x_j and y residualised on the other columns). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [ols_partial_residuals_by('my_table', group_col, y, [x1, x2])] |
| ols_prediction_by | table_macro | Table macro: fits an OLS regression per group of source (ols_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('ols'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [ols_prediction_by('sales', store, week, revenue, [price, promo])] |
| ols_rolling_tidy_by | table_macro | Table macro: fits an OLS regression over a trailing window of window_size rows (ordered by order_col) within each group of source and returns the coefficients of every window as terms rows (integration contract): the group column, id (the group), model_id and model_name (the method), window_end (order_col of the window's last row), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('window_end'), index_value (the window's 1-based end position in its group) and n_window. Windows with fewer than min_obs rows (default window_size) are skipped. |
NULL | [ols_rolling_tidy_by('my_table', group_col, t, y, [x1, x2], window_size := 24)] |
| ols_tidy_by | table_macro | Table macro: fits an OLS regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [ols_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| one_way_anova_agg | aggregate | Performs a one-way ANOVA F-test to compare means across multiple groups. | NULL | [one_way_anova_agg(value, group_id)] |
| p_adjust | aggregate | Window function (DuckDB 2.0+): the p-value of the row adjusted for multiple testing (R p.adjust) within its window frame, i.e. within the partition when OVER has no ORDER BY. NULL p-values stay NULL and are not counted. method: holm (default), hochberg, hommel, bonferroni, BH (alias fdr), BY, none; case-insensitive. n: number of hypotheses (default: the number of non-NULL p-values; may not be smaller). | NULL | [p_adjust(p_value, 'BH') OVER (PARTITION BY endpoint)] |
| p_adjust_agg | aggregate | Adjusts the p-values of a group for multiple testing (R p.adjust) and returns them as a list in input order (fix the order with ORDER BY inside the call). NULL p-values stay NULL and are not counted. method: holm (default), hochberg, hommel, bonferroni, BH (alias fdr), BY, none; case-insensitive. n: number of hypotheses (default: the number of non-NULL p-values; may not be smaller). | NULL | [p_adjust_agg(p_value, 'BH' ORDER BY test)] |
| p_adjust_by | table_macro | Table macro: adjusts the p-values in p_col for multiple testing within each group of group_col (R p.adjust; method holm (default), hochberg, hommel, bonferroni, BH/fdr, BY or none; n: number of hypotheses per group, default the number of non-NULL p-values); returns every source row, in source order, with p_adjusted appended. NULL p-values stay NULL and are not counted. | NULL | [p_adjust_by('results', endpoint, p_value, method := 'BH')] |
| p_adjust_list | scalar | Adjusts a list of p-values for multiple testing (R p.adjust); returns the adjusted list in the same order. NULL elements stay NULL and are not counted. method: holm (default), hochberg, hommel, bonferroni, BH (alias fdr), BY, none; case-insensitive. n: number of hypotheses (default: the number of non-NULL p-values; may not be smaller). | NULL | [p_adjust_list([0.01, 0.02, 0.04], 'BH')] |
| pacf_agg | aggregate | Sample partial autocorrelation function of x in the aggregate's ORDER BY order (R pacf): one row per lag 1..max_lag with the 95% white-noise band. max_lag defaults to R's floor(10 log10 n). | NULL | [pacf_agg(resid, 10 ORDER BY t)] |
| pacf_by | table_macro | Table macro: the sample partial autocorrelation function (R pacf) of value_col ordered by order_col within each group of source, one row per lag (the integration contract's curve schema, curve_type 'pacf'): the group column, model_id, series, curve_type, x (lag), y, y_low / y_high (95% white-noise band), threshold, weight, n_censor. max_lag defaults to R's floor(10 log10 n). |
NULL | [pacf_by('residuals', store, resid, t, max_lag := 12)] |
| pairwise_t_test_agg | aggregate | Pairwise t-tests between all groups with multiple-comparison adjustment (R pairwise.t.test). Returns one row per pair: group1, group2, estimate (mean of group2 - group1), statistic (t), p_value, p_adj, and the confidence interval of estimate (conf_low, conf_high at conf_level) from the same SE and df: per comparison with p_adjust none, Bonferroni-adjusted otherwise (as emmeans); one-sided for a one-sided alternative. Options: p_adjust (holm [default], hochberg, hommel, bonferroni, BH/fdr, BY, none), pool_sd (default true), alternative (two_sided, less, greater; for group2 - group1), confidence_level (default 0.95). | NULL | [pairwise_t_test_agg(value, group, {'p_adjust': 'holm', 'pool_sd': true})] |
| pairwise_t_test_by | table_macro | Table macro: runs pairwise t-tests with p-value adjustment (R pairwise.t.test) between the levels of factor_col within each group of source and returns one row per pair (the integration contract's test schema): the group column, model_id, test_id (' |
NULL | [pairwise_t_test_by('my_table', experiment, response, treatment)] |
| passive_aggressive_fit_agg | aggregate | Fits a Passive-Aggressive online regression (scikit-learn PassiveAggressiveRegressor) by updating the coefficients row by row in input order, without shuffling; give the order with ORDER BY. Returns the coefficients, intercept, R^2 and the number of passes. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_agg(y, [x1, x2] ORDER BY t)] |
| passive_aggressive_fit_agg | aggregate | Fits a Passive-Aggressive online regression (scikit-learn PassiveAggressiveRegressor) by updating the coefficients row by row in input order, without shuffling; give the order with ORDER BY. Returns the coefficients, intercept, R^2 and the number of passes. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_agg(y, [x1, x2], {'c': 0.5, 'epsilon': 0.05, 'variant': 'pa2'} ORDER BY t)] |
| passive_aggressive_fit_predict | aggregate | Window aggregate: runs the Passive-Aggressive online update over the rows of the window frame in frame order and returns the prediction for the LAST row of the frame (yhat; yhat_lower / yhat_upper are NULL). Use frames ending at CURRENT ROW over a unique ordering. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_predict(y, [x1, x2]) OVER (ORDER BY t ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)] |
| passive_aggressive_fit_predict | aggregate | Window aggregate: runs the Passive-Aggressive online update over the rows of the window frame in frame order and returns the prediction for the LAST row of the frame (yhat; yhat_lower / yhat_upper are NULL). Use frames ending at CURRENT ROW over a unique ordering. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_predict(y, [x1, x2], {'c': 0.5}) OVER (ORDER BY t ROWS BETWEEN 49 PRECEDING AND CURRENT ROW)] |
| passive_aggressive_fit_predict_agg | aggregate | Fits a Passive-Aggressive online regression on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (from the final coefficients), yhat_lower / yhat_upper (NULL: the model has no interval) and is_training. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_predict_agg(y, x ORDER BY t)] |
| passive_aggressive_fit_predict_agg | aggregate | Fits a Passive-Aggressive online regression on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (from the final coefficients), yhat_lower / yhat_upper (NULL: the model has no interval) and is_training. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_predict_agg(y, x, split ORDER BY t)] |
| passive_aggressive_fit_predict_agg | aggregate | Fits a Passive-Aggressive online regression on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (from the final coefficients), yhat_lower / yhat_upper (NULL: the model has no interval) and is_training. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_predict_agg(y, x, split, {'variant': 'pa2'} ORDER BY t)] |
| passive_aggressive_fit_predict_agg | aggregate | Fits a Passive-Aggressive online regression on the training rows of a partition (y NOT NULL and, with split_col, split 'train' / 'training' in any case) in input order and returns one STRUCT per row: y, yhat (from the final coefficients), yhat_lower / yhat_upper (NULL: the model has no interval) and is_training. Options: c (aggressiveness, default 1), epsilon (insensitive zone, 0.1), variant ('pa1' default | 'pa2'), fit_intercept, max_iterations (passes over the rows, default 1 = online) and tolerance (early stopping of multi-pass fits). | NULL | [passive_aggressive_fit_predict_agg(y, x, {'c': 0.5} ORDER BY t)] |
| passive_aggressive_fit_predict_by | table_macro | Table macro: fits a Passive-Aggressive online regression per group of source, updating row by row in order_by order (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case), and returns every source row with yhat from the final coefficients, yhat_lower / yhat_upper (NULL: no interval) and is_training appended. | NULL | [passive_aggressive_fit_predict_by('my_table', group_col, y, [x1, x2], order_by := t)] |
| passive_aggressive_glance_by | table_macro | Table macro: fits a Passive-Aggressive online regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. Rows are fitted in order_col order (the model is sequential). | NULL | [passive_aggressive_glance_by('my_table', group_col, t, y, [x1, x2])] |
| passive_aggressive_prediction_by | table_macro | Table macro: fits a Passive-Aggressive online regression per group of source (passive_aggressive_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('passive_aggressive'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [passive_aggressive_prediction_by('sales', store, week, revenue, [price, promo])] |
| passive_aggressive_tidy_by | table_macro | Table macro: fits a Passive-Aggressive online regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Rows are fitted in order_col order (the model is sequential). The model has no coefficient inference. names := […] labels the terms. | NULL | [passive_aggressive_tidy_by('my_table', group_col, t, y, [x1, x2], names := ['x1', 'x2'])] |
| pearson_agg | aggregate | Computes Pearson's product-moment correlation coefficient and tests its significance. | NULL | [pearson_agg(x, y)] |
| pearson_agg | aggregate | Computes Pearson's product-moment correlation coefficient and tests its significance. | NULL | [pearson_agg(x, y, {'alternative': 'two_sided'})] |
| permutation_t_test_agg | aggregate | Performs a permutation-based two-sample t-test using resampling, using default options. | NULL | [permutation_t_test_agg(value, group_id)] |
| permutation_t_test_agg | aggregate | Performs a permutation-based two-sample t-test using resampling. | NULL | [permutation_t_test_agg(value, group_id, {'alternative': 'two_sided', 'n_permutations': 10000})] |
| phi_coefficient_agg | aggregate | Computes the phi coefficient (φ), a measure of association for 2×2 contingency tables. | NULL | [phi_coefficient_agg(row_var, col_var)] |
| pls_fit_agg | aggregate | Fits a Partial Least Squares regression per group and returns the coefficients, intercept, R^2 and number of components. | NULL | [pls_fit_agg(y, [x1, x2, x3])] |
| pls_fit_agg | aggregate | Fits a Partial Least Squares regression per group and returns the coefficients, intercept, R^2 and number of components. | NULL | [pls_fit_agg(y, [x1, x2, x3], {'n_components': 2})] |
| pls_fit_predict_agg | aggregate | Fits a Partial Least Squares model on training rows with a MAP of options and predicts all rows. | NULL | [pls_fit_predict_agg(y, x, split_col, {'n_components': 2})] |
| pls_fit_predict_agg | aggregate | Fits a Partial Least Squares model over a partition and returns per-row predictions. | NULL | [pls_fit_predict_agg(y, x)] |
| pls_fit_predict_agg | aggregate | Fits a Partial Least Squares model over a partition with a MAP of options and returns per-row predictions. | NULL | [pls_fit_predict_agg(y, x, {'n_components': 2})] |
| pls_fit_predict_agg | aggregate | Fits a Partial Least Squares model using only training rows (split_col='train') and predicts all rows. | NULL | [pls_fit_predict_agg(y, x, split_col)] |
| pls_fit_predict_by | table_macro | Table macro: fits a partial least squares (PLS) regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [pls_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| pls_glance_by | table_macro | Table macro: fits a partial least squares regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [pls_glance_by('my_table', group_col, y, [x1, x2])] |
| pls_prediction_by | table_macro | Table macro: fits a partial least squares regression per group of source (pls_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('pls'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [pls_prediction_by('sales', store, week, revenue, [price, promo])] |
| pls_tidy_by | table_macro | Table macro: fits a partial least squares regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. The model has no coefficient inference. names := […] labels the terms. | NULL | [pls_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| poisson_augment_agg | aggregate | Fits a Poisson GLM over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [poisson_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| poisson_augment_agg | aggregate | Fits a Poisson GLM over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [poisson_augment_agg(y, [x1, x2], {'poisson_link': 'log'}) OVER ()] |
| poisson_augment_by | table_macro | Table macro: fits a Poisson GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, approx_loo_fitted and approx_loo_residual (one-step approximate leave-one-out prediction and residual, response scale: not the refit). Non-training rows get the prediction as fitted and NULL diagnostics. Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [poisson_augment_by('my_table', group_col, y, [x1, x2])] |
| poisson_effects_by | table_macro | Table macro: marginal-effect grid of a Poisson GLM per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of poisson_tidy_by). |
NULL | [poisson_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| poisson_fit_agg | aggregate | Fits a Poisson regression (GLM with log link) and returns coefficients, deviance, AIC, and fit statistics. | NULL | [poisson_fit_agg(y, x)] |
| poisson_fit_agg | aggregate | Fits a Poisson regression (GLM with log link) and returns coefficients, deviance, AIC, and fit statistics. | NULL | [poisson_fit_agg(y, x, {'fit_intercept': true})] |
| poisson_fit_predict_agg | aggregate | Fits a Poisson regression on training rows with a MAP of options and predicts all rows. | NULL | [poisson_fit_predict_agg(y, x, split_col, {'link': 'log'})] |
| poisson_fit_predict_agg | aggregate | Fits a Poisson regression over a partition and returns per-row predictions. | NULL | [poisson_fit_predict_agg(y, x)] |
| poisson_fit_predict_agg | aggregate | Fits a Poisson regression over a partition with a MAP of options and returns per-row predictions. | NULL | [poisson_fit_predict_agg(y, x, {'link': 'log'})] |
| poisson_fit_predict_agg | aggregate | Fits a Poisson regression using only training rows (split_col='train') and predicts all rows. | NULL | [poisson_fit_predict_agg(y, x, split_col)] |
| poisson_fit_predict_by | table_macro | Table macro: fits a Poisson GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [poisson_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| poisson_glance_by | table_macro | Table macro: fits a Poisson GLM per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [poisson_glance_by('my_table', group_col, y, [x1, x2])] |
| poisson_partial_residuals_agg | aggregate | Fits a Poisson GLM over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots; the working residual), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots; NULL for GLMs). Rows not used for fitting get NULL residuals. | NULL | [poisson_partial_residuals_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| poisson_partial_residuals_by | table_macro | Table macro: fits a Poisson GLM per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= working residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (NULL for GLMs). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [poisson_partial_residuals_by('my_table', group_col, y, [x1, x2])] |
| poisson_prediction_by | table_macro | Table macro: fits a Poisson GLM per group of source (poisson_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('poisson'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [poisson_prediction_by('sales', store, week, revenue, [price, promo])] |
| poisson_rolling_tidy_by | table_macro | Table macro: fits a Poisson GLM over a trailing window of window_size rows (ordered by order_col) within each group of source and returns the coefficients of every window as terms rows (integration contract): the group column, id (the group), model_id and model_name (the method), window_end (order_col of the window's last row), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('window_end'), index_value (the window's 1-based end position in its group) and n_window. Windows with fewer than min_obs rows (default window_size) are skipped. |
NULL | [poisson_rolling_tidy_by('my_table', group_col, t, y, [x1, x2], window_size := 24)] |
| poisson_tidy_by | table_macro | Table macro: fits a Poisson GLM per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [poisson_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| pr_agg | aggregate | Precision-recall curve as a LIST of {threshold, recall, precision} in increasing threshold order, as scikit-learn precision_recall_curve; the final point (recall 0, precision 1) has a NULL threshold. | NULL | [pr_agg(y_true, score)] |
| pr_curve_by | table_macro | Table macro: computes the precision-recall curve (x = recall, y = precision; scikit-learn precision_recall_curve, see pr_agg) per group of source and returns one row per point in curve order (the integration contract's curve schema): the group column, model_id, series, curve_type ('pr'), x, y, y_low, y_high, threshold, weight, n_censor. y_true_col is BOOLEAN or 0/1. |
NULL | [pr_curve_by('scored', model, label, score)] |
| predict | scalar | Applies pre-fitted coefficients and intercept to feature data to generate predictions. | NULL | [predict(x, coefficients, intercept)] |
| predict | scalar | Predicts one row from a fitted model STRUCT (as returned by any *_fit_agg or *_fit function). GLM models are mapped to the response scale through their link unless {'type': 'link'} is given; isotonic models are interpolated. | NULL | [predict(ols_fit_agg(y, [x1, x2]), [1.5, 2.0])] |
| predict | scalar | Predicts one row from a fitted model STRUCT with a MAP of options; {'type': 'link'} returns a GLM prediction on the link scale. {'se_fit': true} and/or {'interval': 'confidence' | 'prediction', 'level': 0.95} return STRUCT(yhat, se_fit, yhat_lower, yhat_upper) from the model's covariance (OLS, WLS, Ridge and GLM fits with {'compute_inference': true}); GLM intervals are built on the link scale and transformed. | NULL | [predict(model, [x1, x2], {'type': 'link'}), predict(model, [x1, x2], {'se_fit': true, 'interval': 'prediction', 'level': 0.9})] |
| prop_test_one_agg | aggregate | Tests whether an observed proportion differs from a hypothesized value (one-sample proportion test), using default options. | NULL | [prop_test_one_agg(value)] |
| prop_test_one_agg | aggregate | Tests whether an observed proportion differs from a hypothesized value (one-sample proportion test). | NULL | [prop_test_one_agg(value, {'p0': 0.5, 'alternative': 'two_sided'})] |
| prop_test_two_agg | aggregate | Tests whether two observed proportions are equal (two-sample proportion test), using default options. | NULL | [prop_test_two_agg(value, group_id)] |
| prop_test_two_agg | aggregate | Tests whether two observed proportions are equal (two-sample proportion test). | NULL | [prop_test_two_agg(value, group_id, {'alternative': 'two_sided'})] |
| psi_agg | aggregate | Population Stability Index of the current group against the reference on shared bins (evidently 'psi'); drift when psi >= threshold. | NULL | [psi_agg(value, group_id, {'binning': 'quantile', 'n_bins': 10})] |
| psi_agg | aggregate | Population Stability Index of the current group against the reference on shared bins (evidently 'psi'); drift when psi >= threshold. Default options. | NULL | [psi_agg(value, group_id)] |
| quantile_fit_agg | aggregate | Fits a linear quantile regression per group and returns the coefficients and intercept for the requested quantile tau. With {'compute_inference': true} or {'se': 'iid' | 'nid' | 'boot'} it adds standard errors, t statistics, p-values and conf_low / conf_high (quantreg::summary.rq). | NULL | [quantile_fit_agg(y, [x1, x2])] |
| quantile_fit_agg | aggregate | Fits a linear quantile regression per group and returns the coefficients and intercept for the requested quantile tau. With {'compute_inference': true} or {'se': 'iid' | 'nid' | 'boot'} it adds standard errors, t statistics, p-values and conf_low / conf_high (quantreg::summary.rq). | NULL | [quantile_fit_agg(y, [x1, x2], {'tau': 0.9, 'se': 'nid'})] |
| quantile_fit_predict_agg | aggregate | Fits a quantile regression model on training rows with a MAP of options and predicts all rows. | NULL | [quantile_fit_predict_agg(y, x, split_col, {'quantile': 0.5})] |
| quantile_fit_predict_agg | aggregate | Fits a quantile regression model over a partition and returns per-row predictions. | NULL | [quantile_fit_predict_agg(y, x)] |
| quantile_fit_predict_agg | aggregate | Fits a quantile regression model over a partition with a MAP of options and returns per-row predictions. | NULL | [quantile_fit_predict_agg(y, x, {'quantile': 0.5})] |
| quantile_fit_predict_agg | aggregate | Fits a quantile regression model using only training rows (split_col='train') and predicts all rows. | NULL | [quantile_fit_predict_agg(y, x, split_col)] |
| quantile_fit_predict_by | table_macro | Table macro: fits a quantile regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [quantile_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| quantile_glance_by | table_macro | Table macro: fits a quantile regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [quantile_glance_by('my_table', group_col, y, [x1, x2])] |
| quantile_prediction_by | table_macro | Table macro: fits a quantile regression per group of source (quantile_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('quantile'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [quantile_prediction_by('sales', store, week, revenue, [price, promo])] |
| quantile_process_agg | aggregate | Regression-quantile process per group: a quantile regression at each of taus (default 0.1, …, 0.9) with standard errors as quantreg::summary.rq (se 'nid' default, 'iid', 'boot'; 'compute_inference': false for estimates only). Returns a LIST of terms rows with index_name = 'tau', index_value = tau. |
NULL | [quantile_process_agg(y, [x1, x2])] |
| quantile_process_agg | aggregate | Regression-quantile process per group: a quantile regression at each of taus (default 0.1, …, 0.9) with standard errors as quantreg::summary.rq (se 'nid' default, 'iid', 'boot'; 'compute_inference': false for estimates only). Returns a LIST of terms rows with index_name = 'tau', index_value = tau. |
NULL | [quantile_process_agg(y, [x1, x2], {'taus': [0.25, 0.5, 0.75], 'se': 'iid'})] |
| quantile_process_by | table_macro | Table macro: computes the regression-quantile process (one quantile regression per tau, with inference) per group of source with quantile_process_agg (same options) and returns one row per index value and term in the terms schema: the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('tau'), index_value. names := […] labels the terms. |
NULL | [quantile_process_by('my_table', group_col, y, [x1, x2])] |
| quantile_tidy_by | table_macro | Table macro: fits a quantile regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [quantile_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| ransac_fit | scalar | Fits a RANSAC regression model with optional MAP of settings (residual_threshold, max_trials, min_samples, stop_probability, stop_n_inliers, random_state, fit_intercept, compute_inference, confidence_level). | NULL | [ransac_fit(y, x, {'residual_threshold': 0.5, 'random_state': 42})] |
| ransac_fit | scalar | Fits a RANSAC robust regression model. Returns coefficients, fit statistics, the residual threshold used, and the inlier / trial counts as a struct. | NULL | [ransac_fit(y, x)] |
| ransac_fit_agg | aggregate | Fits a RANSAC robust regression model and returns coefficients, fit statistics, the residual threshold used, and the inlier / trial counts as a struct. | NULL | [ransac_fit_agg(y, x)] |
| ransac_fit_agg | aggregate | Fits a RANSAC robust regression model and returns coefficients, fit statistics, the residual threshold used, and the inlier / trial counts as a struct. | NULL | [ransac_fit_agg(y, x, {'residual_threshold': 0.5, 'random_state': 42})] |
| ransac_fit_predict | aggregate | Window aggregate: fits a RANSAC regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use ransac_fit_predict_agg. | NULL | [ransac_fit_predict(y, x) OVER (PARTITION BY g ORDER BY t)] |
| ransac_fit_predict | aggregate | Window aggregate: fits a RANSAC regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use ransac_fit_predict_agg. | NULL | [ransac_fit_predict(y, x, {'residual_threshold': 0.5}) OVER (…)] |
| ransac_fit_predict_agg | aggregate | Fits RANSAC on training rows with a MAP of options and predicts all rows. | NULL | [ransac_fit_predict_agg(y, x, split_col, {'residual_threshold': 0.5})] |
| ransac_fit_predict_agg | aggregate | Fits RANSAC over a partition with a MAP of options and returns per-row predictions. | NULL | [ransac_fit_predict_agg(y, x, {'residual_threshold': 0.5, 'random_state': 42})] |
| ransac_fit_predict_agg | aggregate | Fits RANSAC using only training rows (split_col='train') and predicts all rows. | NULL | [ransac_fit_predict_agg(y, x, split_col)] |
| ransac_fit_predict_agg | aggregate | Fits a RANSAC robust regression over a partition and returns per-row predictions with prediction intervals. | NULL | [ransac_fit_predict_agg(y, x)] |
| ransac_fit_predict_by | table_macro | Table macro: fits a RANSAC robust regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [ransac_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| ransac_glance_by | table_macro | Table macro: fits a RANSAC regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [ransac_glance_by('my_table', group_col, y, [x1, x2])] |
| ransac_prediction_by | table_macro | Table macro: fits a RANSAC regression per group of source (ransac_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('ransac'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [ransac_prediction_by('sales', store, week, revenue, [price, promo])] |
| ransac_tidy_by | table_macro | Table macro: fits a RANSAC regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [ransac_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| residuals_diagnostics | scalar | Computes raw residuals from actuals and predictions. Standardized and studentized residuals, leverage and Cook's distance need the feature matrix: use residuals_diagnostics(y, y_hat, x, residual_std_error, include_studentized). | NULL | [residuals_diagnostics(y, y_hat)] |
| residuals_diagnostics | scalar | Computes raw, standardized and studentized residuals, leverage and Cook's distance from actuals, predictions and the feature matrix (residual_std_error may be NULL to estimate it from the residuals). | NULL | [residuals_diagnostics(y, y_hat, x, rse, true)] |
| residuals_diagnostics_agg | aggregate | Aggregate version of residuals diagnostics with feature matrix: computes raw, standardized, studentized residuals, leverage and Cook's distance from predicted and actual values and the feature matrix. | NULL | [residuals_diagnostics_agg(y, y_hat, x)] |
| residuals_diagnostics_agg | aggregate | Aggregate version of residuals diagnostics: computes raw residuals from predicted and actual values. Standardized and studentized residuals, leverage and Cook's distance need the feature matrix: use residuals_diagnostics_agg(y, y_hat, x). | NULL | [residuals_diagnostics_agg(y, y_hat)] |
| ridge_augment_agg | aggregate | Fits Ridge over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted, residual, resid_type, leverage (diagonal of the ridge hat matrix, intercept unpenalised), loo_residual and loo_fitted (exact leave-one-out at the same penalty), weight, is_training and n_params; std_residual, stud_residual, cooks_d and dffits are NULL. | NULL | [ridge_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| ridge_augment_agg | aggregate | Fits Ridge over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted, residual, resid_type, leverage (diagonal of the ridge hat matrix, intercept unpenalised), loo_residual and loo_fitted (exact leave-one-out at the same penalty), weight, is_training and n_params; std_residual, stud_residual, cooks_d and dffits are NULL. | NULL | [ridge_augment_agg(y, [x1, x2], {'alpha': 1.0}) OVER ()] |
| ridge_augment_by | table_macro | Table macro: fits a Ridge regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the contract obs columns: model_id and model_name, row_id, fitted, residual, resid_type, leverage (diagonal of the ridge hat matrix X(X'X + lambda I)^-1 X', intercept unpenalised), weight, is_training, n_params, loo_residual and loo_fitted (exact leave-one-out at the same penalty: residual / (1 - leverage) and y minus it). std_residual, stud_residual, cooks_d and dffits are NULL. Non-training rows get the prediction as fitted and NULL diagnostics. | NULL | [ridge_augment_by('my_table', group_col, y, [x1, x2], {'alpha': 1.0})] |
| ridge_cv_agg | aggregate | k-fold cross-validation of the ridge path per group. Returns a LIST of curve rows (curve_type = 'lambda_cv', x = lambda, y = cv_mean, y_low / y_high = cv_mean -/+ cv_se, threshold NULL, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds), as cv.glmnet (type.measure = 'mse', or 'mae' with metric). Options: as the path, plus folds (10) and seed for the seeded folds, repeats, cv_strategy and its options (see the cv_key form). |
NULL | [ridge_cv_agg(y, [x1, x2])] |
| ridge_cv_agg | aggregate | k-fold cross-validation of the ridge path per group. Returns a LIST of curve rows (curve_type = 'lambda_cv', x = lambda, y = cv_mean, y_low / y_high = cv_mean -/+ cv_se, threshold NULL, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds), as cv.glmnet (type.measure = 'mse', or 'mae' with metric). Options: as the path, plus folds (10) and seed for the seeded folds, repeats, cv_strategy and its options (see the cv_key form). |
NULL | [ridge_cv_agg(y, [x1, x2], {'folds': 5, 'seed': 1})] |
| ridge_cv_agg | aggregate | k-fold cross-validation of the ridge path per group. Returns a LIST of curve rows (curve_type = 'lambda_cv', x = lambda, y = cv_mean, y_low / y_high = cv_mean -/+ cv_se, threshold NULL, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds), as cv.glmnet (type.measure = 'mse', or 'mae' with metric). Options: as the path, plus folds (10) and seed for the seeded folds, repeats, cv_strategy and its options (see the cv_key form). With cv_key, the folds follow cv_strategy: 'fold_id' (default; cv_key is each row's fold, any labels, at least 3), 'group' (cv_key is a group that never spans two folds; a STRUCT of several columns for a combined key), 'logo' (leave one group out), 'stratified' (cv_key is the stratum) or 'time_series' (cv_key is the time: rolling-origin splits with test_size, gap, window, max_train_size). |
NULL | [ridge_cv_agg(y, [x1, x2], store, {'cv_strategy': 'group', 'folds': 5})] |
| ridge_cv_by | table_macro | Table macro: computes the k-fold cross-validation curve of the ridge path (cv.glmnet) per group of source with ridge_cv_agg (same options) and returns one row per lambda in the integration contract's curve schema: the group column, id (the group), model_id and model_name (the method), curve_type ('lambda_cv'), series, x (lambda), y (cv_mean), y_low, y_high (cv_mean -/+ cv_se), threshold, weight, n_censor, lambda, cv_mean, cv_se, n_nonzero, is_min, is_1se, n_folds. cv_key := column (or a STRUCT of columns) passes the cv_key of the cv_strategy option. |
NULL | [ridge_cv_by('my_table', group_col, y, [x1, x2])] |
| ridge_effects_by | table_macro | Table macro: marginal-effect grid of a Ridge regression per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of ridge_tidy_by). |
NULL | [ridge_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| ridge_fit | scalar | Fits a Ridge regression model with L2 regularization and optional MAP of settings (fit_intercept, compute_inference, confidence_level, alpha, solver, lambda_scaling, compute_loo). | NULL | [ridge_fit(y, x, {'alpha': 1.0, 'compute_inference': true})] |
| ridge_fit | scalar | Fits a Ridge regression model with L2 regularization to the given response and feature data. | NULL | [ridge_fit(y, x)] |
| ridge_fit_agg | aggregate | Fits a Ridge regression model with L2 regularization and returns coefficients and fit statistics. | NULL | [ridge_fit_agg(y, x)] |
| ridge_fit_agg | aggregate | Fits a Ridge regression model with L2 regularization and returns coefficients and fit statistics. Options: alpha (or lambda), fit_intercept, compute_inference, confidence_level, solver, lambda_scaling, compute_loo (exact leave-one-out press, press_rmse, loo_r_squared). | NULL | [ridge_fit_agg(y, x, {'alpha': 1.0})] |
| ridge_fit_from_state | scalar | Fits ridge regression from a least-squares state: the same STRUCT as ridge_fit_agg on the rows. The penalty (alpha, lambda_scaling) is applied here, so one stored state serves any alpha. Row-level options (hc_type, compute_loo) need the rows and raise an error. | NULL | [ridge_fit_from_state(state, {'alpha': 0.5})] |
| ridge_fit_from_state | scalar | Fits ridge regression from a least-squares state: the same STRUCT as ridge_fit_agg on the rows. The penalty (alpha, lambda_scaling) is applied here, so one stored state serves any alpha. Row-level options (hc_type, compute_loo) need the rows and raise an error. | NULL | [ridge_fit_from_state(state, {'alpha': 1.0})] |
| ridge_fit_predict | aggregate | Window aggregate: fits a Ridge regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use ridge_fit_predict_agg. | NULL | [ridge_fit_predict(y, x)] |
| ridge_fit_predict | aggregate | Window aggregate: fits a Ridge regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use ridge_fit_predict_agg. | NULL | [ridge_fit_predict(y, x, {'null_policy': 'drop'})] |
| ridge_fit_predict_agg | aggregate | Fits Ridge regression on training rows with a MAP of options and predicts all rows. | NULL | [ridge_fit_predict_agg(y, x, split_col, {'null_policy': 'drop'})] |
| ridge_fit_predict_agg | aggregate | Fits Ridge regression over a partition and returns per-row predictions with prediction intervals. | NULL | [ridge_fit_predict_agg(y, x)] |
| ridge_fit_predict_agg | aggregate | Fits Ridge regression over a partition with a MAP of options and returns per-row predictions with prediction intervals. | NULL | [ridge_fit_predict_agg(y, x, {'null_policy': 'drop'})] |
| ridge_fit_predict_agg | aggregate | Fits Ridge regression using only training rows (split_col='train') and predicts all rows. | NULL | [ridge_fit_predict_agg(y, x, split_col)] |
| ridge_fit_predict_by | table_macro | Table macro: fits a Ridge regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [ridge_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| ridge_glance_by | table_macro | Table macro: fits a Ridge regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [ridge_glance_by('my_table', group_col, y, [x1, x2])] |
| ridge_nested_cv_agg | aggregate | Nested cross-validation of the ridge path per group. Each outer fold's training rows choose lambda by an inner CV (inner_folds folds built from those rows only, respecting the same cv_key; rule 'min' or '1se') and the refit at that lambda is scored on the outer test rows. Returns a LIST of curve rows (curve_type = 'nested_cv'): one per outer fold (series 'fold', x = fold, y = test_error, with lambda, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds) and a summary row (series 'mean', y = the mean outer error weighted by test rows, y_low / y_high = mean -/+ test_se). Options: as the CV aggregate (cv_strategy, folds = outer folds, default 5; seed; metric) plus inner_folds (5) and rule ('min'). |
NULL | [ridge_nested_cv_agg(y, [x1, x2])] |
| ridge_nested_cv_agg | aggregate | Nested cross-validation of the ridge path per group. Each outer fold's training rows choose lambda by an inner CV (inner_folds folds built from those rows only, respecting the same cv_key; rule 'min' or '1se') and the refit at that lambda is scored on the outer test rows. Returns a LIST of curve rows (curve_type = 'nested_cv'): one per outer fold (series 'fold', x = fold, y = test_error, with lambda, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds) and a summary row (series 'mean', y = the mean outer error weighted by test rows, y_low / y_high = mean -/+ test_se). Options: as the CV aggregate (cv_strategy, folds = outer folds, default 5; seed; metric) plus inner_folds (5) and rule ('min'). |
NULL | [ridge_nested_cv_agg(y, [x1, x2], {'folds': 5, 'inner_folds': 5})] |
| ridge_nested_cv_agg | aggregate | Nested cross-validation of the ridge path per group. Each outer fold's training rows choose lambda by an inner CV (inner_folds folds built from those rows only, respecting the same cv_key; rule 'min' or '1se') and the refit at that lambda is scored on the outer test rows. Returns a LIST of curve rows (curve_type = 'nested_cv'): one per outer fold (series 'fold', x = fold, y = test_error, with lambda, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds) and a summary row (series 'mean', y = the mean outer error weighted by test rows, y_low / y_high = mean -/+ test_se). Options: as the CV aggregate (cv_strategy, folds = outer folds, default 5; seed; metric) plus inner_folds (5) and rule ('min'). With cv_key, the folds follow cv_strategy: 'fold_id' (default; cv_key is each row's fold, any labels, at least 3), 'group' (cv_key is a group that never spans two folds; a STRUCT of several columns for a combined key), 'logo' (leave one group out), 'stratified' (cv_key is the stratum) or 'time_series' (cv_key is the time: rolling-origin splits with test_size, gap, window, max_train_size). |
NULL | [ridge_nested_cv_agg(y, [x1, x2], store, {'cv_strategy': 'group', 'folds': 5})] |
| ridge_nested_cv_by | table_macro | Table macro: computes the nested cross-validation of the ridge path per group of source with ridge_nested_cv_agg (same options) and returns one row per outer fold plus a summary row in the integration contract's curve schema: the group column, id (the group), model_id and model_name (the method), curve_type ('nested_cv'), series ('fold' | 'mean'), x (fold), y (test error), y_low, y_high (mean -/+ se on the summary row), threshold, weight, n_censor, fold, lambda, test_error, test_se, inner_cv_mean, inner_cv_se, n_train, n_test, n_inner_folds, n_folds, metric. cv_key := column (or a STRUCT of columns) passes the cv_key. |
NULL | [ridge_nested_cv_by('my_table', group_col, y, [x1, x2])] |
| ridge_path_agg | aggregate | Ridge coefficient path per group, as glmnet(alpha = 0): lambda is glmnet's per-observation penalty (1/(2n) RSS + lambda/2 ||b||^2 with y scaled to unit variance internally). Returns a LIST of terms rows (term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name = 'lambda', index_value = lambda), one per lambda and term, intercept first. Options: lambdas (default glmnet's grid), n_lambda (100), lambda_min_ratio, standardize (false), fit_intercept, feature_names. |
NULL | [ridge_path_agg(y, [x1, x2])] |
| ridge_path_agg | aggregate | Ridge coefficient path per group, as glmnet(alpha = 0): lambda is glmnet's per-observation penalty (1/(2n) RSS + lambda/2 ||b||^2 with y scaled to unit variance internally). Returns a LIST of terms rows (term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name = 'lambda', index_value = lambda), one per lambda and term, intercept first. Options: lambdas (default glmnet's grid), n_lambda (100), lambda_min_ratio, standardize (false), fit_intercept, feature_names. |
NULL | [ridge_path_agg(y, [x1, x2], {'n_lambda': 20})] |
| ridge_path_by | table_macro | Table macro: computes the ridge coefficient path (glmnet alpha = 0) per group of source with ridge_path_agg (same options) and returns one row per index value and term in the terms schema: the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('lambda'), index_value. names := […] labels the terms. |
NULL | [ridge_path_by('my_table', group_col, y, [x1, x2])] |
| ridge_prediction_by | table_macro | Table macro: fits a Ridge regression per group of source (ridge_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('ridge'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [ridge_prediction_by('sales', store, week, revenue, [price, promo])] |
| ridge_rolling_tidy_by | table_macro | Table macro: fits a Ridge regression over a trailing window of window_size rows (ordered by order_col) within each group of source and returns the coefficients of every window as terms rows (integration contract): the group column, id (the group), model_id and model_name (the method), window_end (order_col of the window's last row), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('window_end'), index_value (the window's 1-based end position in its group) and n_window. Windows with fewer than min_obs rows (default window_size) are skipped. |
NULL | [ridge_rolling_tidy_by('my_table', group_col, t, y, [x1, x2], window_size := 24)] |
| ridge_tidy_by | table_macro | Table macro: fits a Ridge regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [ridge_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| rls_fit | scalar | Fits a Recursive Least Squares (RLS) model to the given response and feature data. | NULL | [rls_fit(y, x)] |
| rls_fit | scalar | Fits a Recursive Least Squares (RLS) model with optional MAP of settings (fit_intercept, forgetting_factor, initial_p_diagonal). | NULL | [rls_fit(y, x, {'forgetting_factor': 0.99})] |
| rls_fit_agg | aggregate | Fits a Recursive Least Squares model and returns coefficients and fit statistics. | NULL | [rls_fit_agg(y, x)] |
| rls_fit_agg | aggregate | Fits a Recursive Least Squares model and returns coefficients and fit statistics. | NULL | [rls_fit_agg(y, x, {'forgetting_factor': 0.99})] |
| rls_fit_predict | aggregate | Window aggregate: fits a Recursive Least Squares (RLS) regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use rls_fit_predict_agg. | NULL | [rls_fit_predict(y, x)] |
| rls_fit_predict | aggregate | Window aggregate: fits a Recursive Least Squares (RLS) regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use rls_fit_predict_agg. | NULL | [rls_fit_predict(y, x, {'null_policy': 'drop'})] |
| rls_fit_predict_agg | aggregate | Fits Robust LS regression on training rows with a MAP of options and predicts all rows. | NULL | [rls_fit_predict_agg(y, x, split_col, {'null_policy': 'drop'})] |
| rls_fit_predict_agg | aggregate | Fits Robust LS regression over a partition and returns per-row predictions. | NULL | [rls_fit_predict_agg(y, x)] |
| rls_fit_predict_agg | aggregate | Fits Robust LS regression over a partition with a MAP of options and returns per-row predictions. | NULL | [rls_fit_predict_agg(y, x, {'null_policy': 'drop'})] |
| rls_fit_predict_agg | aggregate | Fits Robust LS regression using only training rows (split_col='train') and predicts all rows. | NULL | [rls_fit_predict_agg(y, x, split_col)] |
| rls_fit_predict_by | table_macro | Table macro: fits a Recursive Least Squares (RLS) regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [rls_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| rls_glance_by | table_macro | Table macro: fits a recursive least squares regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. The model is sequential: order_by := |
NULL | [rls_glance_by('my_table', group_col, y, [x1, x2], order_by := t)] |
| rls_prediction_by | table_macro | Table macro: fits a recursive least squares regression per group of source (rls_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('rls'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [rls_prediction_by('sales', store, week, revenue, [price, promo])] |
| rls_tidy_by | table_macro | Table macro: fits a recursive least squares regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. The model is sequential: order_by := |
NULL | [rls_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'], order_by := t)] |
| roc_agg | aggregate | ROC curve of a binary classifier as a LIST of {threshold, fpr, tpr}, as scikit-learn roc_curve: the first point is (0, 0) at threshold +inf, tied scores form one point, and drop_intermediate (default true) drops collinear points. y_true is BOOLEAN or 0/1. | NULL | [roc_agg(y_true, score)] |
| roc_curve_by | table_macro | Table macro: computes the ROC curve (x = false positive rate, y = true positive rate; scikit-learn roc_curve, see roc_agg) per group of source and returns one row per point in curve order (the integration contract's curve schema): the group column, model_id, series, curve_type ('roc'), x, y, y_low, y_high, threshold, weight, n_censor. y_true_col is BOOLEAN or 0/1. |
NULL | [roc_curve_by('scored', model, label, score)] |
| shapiro_wilk_agg | aggregate | Performs the Shapiro-Wilk test for normality on a sample. | NULL | [shapiro_wilk_agg(value)] |
| spearman_agg | aggregate | Computes Spearman's rank correlation coefficient and tests its significance. | NULL | [spearman_agg(x, y)] |
| spearman_agg | aggregate | Computes Spearman's rank correlation coefficient and tests its significance. | NULL | [spearman_agg(x, y, {'alternative': 'two_sided'})] |
| t_test_agg | aggregate | Performs a two-sample t-test (Welch or Student) comparing values between two groups, using default options. | NULL | [t_test_agg(value, group_id)] |
| t_test_agg | aggregate | Performs a two-sample t-test (Welch or Student) comparing values between two groups. | NULL | [t_test_agg(value, group_id, {'alternative': 'two_sided'})] |
| theil_sen_fit | scalar | Fits a Theil-Sen regression model with optional MAP of settings (max_subpopulation, n_subsamples, max_iterations, tolerance, random_state, fit_intercept, compute_inference, confidence_level, ci_method ('exact' | 'bootstrap'), n_bootstrap). | NULL | [theil_sen_fit(y, x, {'random_state': 42, 'max_subpopulation': 5000})] |
| theil_sen_fit | scalar | Fits a Theil-Sen robust regression model. Returns coefficients and fit statistics as a struct. | NULL | [theil_sen_fit(y, x)] |
| theil_sen_fit_agg | aggregate | Fits a Theil-Sen robust regression model and returns coefficients and fit statistics as a struct. | NULL | [theil_sen_fit_agg(y, x)] |
| theil_sen_fit_agg | aggregate | Fits a Theil-Sen robust regression model and returns coefficients and fit statistics as a struct. | NULL | [theil_sen_fit_agg(y, x, {'random_state': 42, 'max_subpopulation': 5000})] |
| theil_sen_fit_predict | aggregate | Window aggregate: fits a Theil-Sen regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use theil_sen_fit_predict_agg. | NULL | [theil_sen_fit_predict(y, x) OVER (PARTITION BY g ORDER BY t)] |
| theil_sen_fit_predict | aggregate | Window aggregate: fits a Theil-Sen regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use theil_sen_fit_predict_agg. | NULL | [theil_sen_fit_predict(y, x, {'random_state': 42}) OVER (…)] |
| theil_sen_fit_predict_agg | aggregate | Fits Theil-Sen on training rows with a MAP of options and predicts all rows. | NULL | [theil_sen_fit_predict_agg(y, x, split_col, {'random_state': 42})] |
| theil_sen_fit_predict_agg | aggregate | Fits Theil-Sen over a partition with a MAP of options and returns per-row predictions. | NULL | [theil_sen_fit_predict_agg(y, x, {'random_state': 42})] |
| theil_sen_fit_predict_agg | aggregate | Fits Theil-Sen using only training rows (split_col='train') and predicts all rows. | NULL | [theil_sen_fit_predict_agg(y, x, split_col)] |
| theil_sen_fit_predict_agg | aggregate | Fits a Theil-Sen robust regression over a partition and returns per-row predictions with prediction intervals. | NULL | [theil_sen_fit_predict_agg(y, x)] |
| theil_sen_fit_predict_by | table_macro | Table macro: fits a Theil-Sen regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [theil_sen_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| theil_sen_glance_by | table_macro | Table macro: fits a Theil-Sen regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [theil_sen_glance_by('my_table', group_col, y, [x1, x2])] |
| theil_sen_prediction_by | table_macro | Table macro: fits a Theil-Sen regression per group of source (theil_sen_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('theil_sen'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [theil_sen_prediction_by('sales', store, week, revenue, [price, promo])] |
| theil_sen_tidy_by | table_macro | Table macro: fits a Theil-Sen regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options, with 'ci_method': 'exact_or_none', 'n_boot': '199'). names := […] labels the terms. | NULL | [theil_sen_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| tidy | scalar | One entry per model term (intercept first): term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value (the integration contract's terms schema). Unnest it to get a coefficient table; pass term names as a second argument. | NULL | [unnest(tidy(ols_fit_agg(y, [x1, x2], {'compute_inference': true})), recursive := true), tidy(model, ['price', 'promo'])] |
| tost_correlation_agg | aggregate | Tests equivalence of a correlation to a reference value using the TOST procedure, using default options. | NULL | [tost_correlation_agg(x, y)] |
| tost_correlation_agg | aggregate | Tests equivalence of a correlation to a reference value using the TOST procedure. | NULL | [tost_correlation_agg(x, y, {'delta': 0.1})] |
| tost_paired_agg | aggregate | Tests equivalence of paired measurements using the TOST procedure, using default options. | NULL | [tost_paired_agg(x, y)] |
| tost_paired_agg | aggregate | Tests equivalence of paired measurements using the TOST procedure. | NULL | [tost_paired_agg(x, y, {'delta': 0.5})] |
| tost_t_test_agg | aggregate | Tests equivalence of two groups using the Two One-Sided Tests (TOST) procedure with a t-test, using default options. | NULL | [tost_t_test_agg(value, group_id)] |
| tost_t_test_agg | aggregate | Tests equivalence of two groups using the Two One-Sided Tests (TOST) procedure with a t-test. | NULL | [tost_t_test_agg(value, group_id, {'delta': 1.0})] |
| tukey_hsd_agg | aggregate | Tukey's honest significant difference for all pairwise differences of group means (R TukeyHSD(aov(value ~ group))). Returns one row per pair with the simultaneous confidence interval (conf_low, conf_high) and family-wise p_adj. Options: confidence_level (default 0.95). | NULL | [tukey_hsd_agg(value, group, {'confidence_level': 0.95})] |
| tukey_hsd_by | table_macro | Table macro: runs Tukey's HSD (R TukeyHSD(aov(…))) between the levels of factor_col within each group of source and returns one row per pair (the integration contract's test schema): the group column, model_id, test_id (' |
NULL | [tukey_hsd_by('my_table', experiment, response, treatment)] |
| tvd_agg | aggregate | Total variation distance between the category distributions of two groups, with a seeded permutation p-value (evidently 'TVD'). | NULL | [tvd_agg(value, group_id, {'n_permutations': 1000, 'seed': 42})] |
| tvd_agg | aggregate | Total variation distance between the category distributions of two groups, with a seeded permutation p-value (evidently 'TVD'). Default options. | NULL | [tvd_agg(value, group_id)] |
| tweedie_augment_agg | aggregate | Fits a Tweedie GLM (log link) over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [tweedie_augment_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| tweedie_augment_agg | aggregate | Fits a Tweedie GLM (log link) over a partition (rows with y and every feature present) and returns one STRUCT per row, in frame order, with fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params (broom augment) and approx_loo_fitted / approx_loo_residual (one-step approximate leave-one-out). Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [tweedie_augment_agg(y, [x1, x2], {'power': 1.5}) OVER ()] |
| tweedie_augment_by | table_macro | Table macro: fits a Tweedie GLM (log link) per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted (response scale), residual (deviance), resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, approx_loo_fitted and approx_loo_residual (one-step approximate leave-one-out prediction and residual, response scale: not the refit). Non-training rows get the prediction as fitted and NULL diagnostics. Penalized fits (glm_lambda > 0 or a prior) are rejected. | NULL | [tweedie_augment_by('my_table', group_col, y, [x1, x2])] |
| tweedie_effects_by | table_macro | Table macro: marginal-effect grid of a Tweedie GLM per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of tweedie_tidy_by). |
NULL | [tweedie_effects_by('sales', store, revenue, [price, promo], focal := 1, n_points := 25, names := ['price', 'promo'])] |
| tweedie_fit_agg | aggregate | Fits a Tweedie GLM (log link, default power = 1.5 — compound Poisson-Gamma) and returns coefficients, deviance, AIC, dispersion (= phi), and fit statistics. | NULL | [tweedie_fit_agg(y, x)] |
| tweedie_fit_agg | aggregate | Fits a Tweedie GLM (log link, user-specified power 1 < p < 2 for compound Poisson-Gamma) and returns coefficients, deviance, AIC, dispersion (= phi), and fit statistics. Default power is 1.5. | NULL | [tweedie_fit_agg(y, x, {'power': 1.5, 'fit_intercept': true})] |
| tweedie_fit_predict_by | table_macro | Table macro: fits a Tweedie GLM per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [tweedie_fit_predict_by('my_table', group_col, y, [x1, x2])] |
| tweedie_glance_by | table_macro | Table macro: fits a Tweedie GLM per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [tweedie_glance_by('my_table', group_col, y, [x1, x2])] |
| tweedie_partial_residuals_agg | aggregate | Fits a Tweedie GLM (log link) over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots; the working residual), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots; NULL for GLMs). Rows not used for fitting get NULL residuals. | NULL | [tweedie_partial_residuals_agg(y, [x1, x2]) OVER (PARTITION BY g)] |
| tweedie_partial_residuals_by | table_macro | Table macro: fits a Tweedie GLM per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= working residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (NULL for GLMs). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [tweedie_partial_residuals_by('my_table', group_col, y, [x1, x2])] |
| tweedie_prediction_by | table_macro | Table macro: fits a Tweedie GLM per group of source (tweedie_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('tweedie'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [tweedie_prediction_by('sales', store, week, revenue, [price, promo])] |
| tweedie_tidy_by | table_macro | Table macro: fits a Tweedie GLM per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [tweedie_tidy_by('my_table', group_col, y, [x1, x2], names := ['x1', 'x2'])] |
| vif | scalar | Computes Variance Inflation Factor (VIF) for each column of a feature matrix to detect multicollinearity. | NULL | [vif(x)] |
| vif_agg | aggregate | Aggregate version of VIF: computes Variance Inflation Factor for each feature from a column of feature vectors. | NULL | [vif_agg(x)] |
| wasserstein_agg | aggregate | 1-D Wasserstein (earth mover's) distance, raw and normed by the reference's population SD (evidently), with an optional permutation p-value. | NULL | [wasserstein_agg(value, group_id, {'p': 1, 'n_permutations': 1000})] |
| wasserstein_agg | aggregate | 1-D Wasserstein (earth mover's) distance, raw and normed by the reference's population SD (evidently), with an optional permutation p-value. Default options. | NULL | [wasserstein_agg(value, group_id)] |
| white_test_agg | aggregate | White's test for heteroskedasticity: the studentized Breusch-Pagan test against x, its squares and pairwise cross-products (R bptest(fit, ~ x1 * x2 + I(x1^2) + I(x2^2))). | NULL | [white_test_agg(resid, [x1, x2])] |
| wilcoxon_signed_rank_agg | aggregate | Performs the Wilcoxon signed-rank test for paired samples, using default options. | NULL | [wilcoxon_signed_rank_agg(x, y)] |
| wilcoxon_signed_rank_agg | aggregate | Performs the Wilcoxon signed-rank test for paired samples. | NULL | [wilcoxon_signed_rank_agg(x, y, {'alternative': 'two_sided'})] |
| wls_augment_agg | aggregate | Fits WLS over a partition (rows with y, every feature and a positive weight) and returns one STRUCT per row, in frame order, with fitted, residual, resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training and n_params (broom augment). | NULL | [wls_augment_agg(y, [x1, x2], w) OVER (PARTITION BY g)] |
| wls_augment_agg | aggregate | Fits WLS over a partition (rows with y, every feature and a positive weight) and returns one STRUCT per row, in frame order, with fitted, residual, resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training and n_params (broom augment). | NULL | [wls_augment_agg(y, [x1, x2], w, {'fit_intercept': true}) OVER ()] |
| wls_augment_by | table_macro | Table macro: fits a weighted least squares (WLS) regression per group of source (training rows: y_col NOT NULL, a positive weight and split omitted or 'train' / 'training' in any case) and returns every source row with the per-observation diagnostics of the fit (broom augment, contract obs schema): model_id and model_name (the method; the group column is among the source columns), row_id, fitted, residual, resid_type, std_residual, stud_residual, leverage, cooks_d, dffits, weight, is_training, n_params, loo_residual and loo_fitted (exact leave-one-out on the response scale: residual / (1 - leverage) and y minus it, NULL where leverage = 1). Non-training rows get the prediction as fitted and NULL diagnostics. | NULL | [wls_augment_by('my_table', group_col, y, [x1, x2], w)] |
| wls_effects_by | table_macro | Table macro: marginal-effect grid of a weighted least squares regression per group of source: the fitted mean over n_points values spanning the range of feature focal (1-based position in x_cols), with the other features at their group means over the fitted rows (or at at_values, a list with one value per feature), and its confidence band at level from predict(model, x, {'interval': 'confidence'}) (response scale for GLMs). Integration contract prediction schema: the group column, id, model_id, model_name, focal, x (the focal value), y (NULL), yhat, yhat_lower, yhat_upper, level, split (NULL), se_fit, focal_name (the focal feature's name: names[focal] when names := […] is given, else 'x' || focal, as the terms of wls_tidy_by). |
NULL | [wls_effects_by('sales', store, revenue, [price, promo], w, focal := 1, n_points := 25, names := ['price', 'promo'])] |
| wls_fit | scalar | Fits a WLS regression model with optional MAP of settings (fit_intercept, compute_inference, confidence_level, solver, hc_type, alias_tolerance, compute_loo). | NULL | [wls_fit(y, x, weights, {'compute_inference': true})] |
| wls_fit | scalar | Fits a Weighted Least Squares (WLS) regression model using per-observation weights. | NULL | [wls_fit(y, x, weights)] |
| wls_fit_agg | aggregate | Fits a Weighted Least Squares regression model and returns coefficients and fit statistics. | NULL | [wls_fit_agg(y, x, weight)] |
| wls_fit_agg | aggregate | Fits a Weighted Least Squares regression model and returns coefficients and fit statistics. | NULL | [wls_fit_agg(y, x, weight, {'fit_intercept': true})] |
| wls_fit_from_state | scalar | Fits WLS from a weighted least-squares state (ls_state_agg(y, x, weight)): the same STRUCT as wls_fit_agg on the rows. Row-level options (hc_type, compute_loo) need the rows and raise an error. | NULL | [wls_fit_from_state(state)] |
| wls_fit_from_state | scalar | Fits WLS from a weighted least-squares state (ls_state_agg(y, x, weight)): the same STRUCT as wls_fit_agg on the rows. Row-level options (hc_type, compute_loo) need the rows and raise an error. | NULL | [wls_fit_from_state(state, {'compute_inference': true})] |
| wls_fit_predict | aggregate | Window aggregate: fits a weighted least squares (WLS) regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use wls_fit_predict_agg. | NULL | [wls_fit_predict(y, x, weight)] |
| wls_fit_predict | aggregate | Window aggregate: fits a weighted least squares (WLS) regression on the rows of the window frame and returns the prediction (with interval) for the LAST row of the frame. Use frames ending at CURRENT ROW over a unique ordering; for per-row predictions over a whole group use wls_fit_predict_agg. | NULL | [wls_fit_predict(y, x, weight, {'null_policy': 'drop'})] |
| wls_fit_predict_agg | aggregate | Fits WLS regression on training rows with weights and a MAP of options and predicts all rows. | NULL | [wls_fit_predict_agg(y, x, weights, split_col, {'null_policy': 'drop'})] |
| wls_fit_predict_agg | aggregate | Fits WLS regression over a partition using weights and returns per-row predictions. | NULL | [wls_fit_predict_agg(y, x, weights)] |
| wls_fit_predict_agg | aggregate | Fits WLS regression over a partition using weights with a MAP of options and returns per-row predictions. | NULL | [wls_fit_predict_agg(y, x, weights, {'null_policy': 'drop'})] |
| wls_fit_predict_agg | aggregate | Fits WLS regression using only training rows (split_col='train') with weights and predicts all rows. | NULL | [wls_fit_predict_agg(y, x, weights, split_col)] |
| wls_fit_predict_by | table_macro | Table macro: fits a weighted least squares (WLS) regression per group of source (training rows: y_col NOT NULL and split omitted or 'train' / 'training' in any case) and returns every source row with yhat (plus yhat_lower / yhat_upper prediction-interval bounds where the model provides them) and is_training appended. | NULL | [wls_fit_predict_by('my_table', group_col, y, [x1, x2], weight)] |
| wls_glance_by | table_macro | Table macro: fits a weighted least squares regression per group of source and returns its fit statistics in long form, one row per available metric: the group column, id (the group), model_id and model_name (the method), model_type, metric, value. | NULL | [wls_glance_by('my_table', group_col, y, [x1, x2], w)] |
| wls_partial_residuals_agg | aggregate | Fits WLS over a partition and returns, per row in frame order, a LIST with one STRUCT per fitted term: term_index (1-based position in x), x, partial_residual = residual + component (R residuals(type = 'partial'), car::crPlots), component = b_j (x_j - mean(x_j)), and the added-variable coordinates x_residual, y_residual (car::avPlots). Rows not used for fitting get NULL residuals. | NULL | [wls_partial_residuals_agg(y, [x1, x2], w) OVER (PARTITION BY g)] |
| wls_partial_residuals_by | table_macro | Table macro: fits a weighted least squares regression per group of source and returns one row per input row and fitted term with partial-residual (component-plus-residual, car::crPlots) and added-variable (car::avPlots) coordinates: the group column, id (the group), model_id and model_name (the method), row_id, term_index, term, x, partial_residual (= residual + component), component (b_j (x_j - mean(x_j))), x_residual, y_residual (x_j and y residualised on the other columns). Rows not used for fitting get NULL residuals. names := […] labels the terms. | NULL | [wls_partial_residuals_by('my_table', group_col, y, [x1, x2], w)] |
| wls_prediction_by | table_macro | Table macro: fits a weighted least squares regression per group of source (wls_fit_predict_by) and returns one row per input row in the integration contract's prediction schema: the group column, id, model_id, model_name ('wls'), x (x_col, the plot position and row order), y, yhat, yhat_lower, yhat_upper (the interval at level, default 0.95, overriding any confidence_level in options), level (NULL on rows without a band), split ('train' for fitted rows, 'future' for rows with a NULL y, 'test' for rows held out by split). |
NULL | [wls_prediction_by('sales', store, week, revenue, [price, promo], w)] |
| wls_rolling_tidy_by | table_macro | Table macro: fits a weighted least squares regression over a trailing window of window_size rows (ordered by order_col) within each group of source and returns the coefficients of every window as terms rows (integration contract): the group column, id (the group), model_id and model_name (the method), window_end (order_col of the window's last row), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name ('window_end'), index_value (the window's 1-based end position in its group) and n_window. Windows with fewer than min_obs rows (default window_size) are skipped. |
NULL | [wls_rolling_tidy_by('my_table', group_col, t, y, [x1, x2], w, window_size := 24)] |
| wls_tidy_by | table_macro | Table macro: fits a weighted least squares regression per group of source and returns one row per term (intercept first): the group column, id (the group), model_id and model_name (the method), term, estimate, std_error, statistic, p_value, conf_low, conf_high, conf_level, index_name, index_value. Inference is computed by default (compute_inference is merged under options). names := […] labels the terms. | NULL | [wls_tidy_by('my_table', group_col, y, [x1, x2], w, names := ['x1', 'x2'])] |
| yuen_agg | aggregate | Performs Yuen's trimmed-means t-test, robust to outliers and non-normality, using default options. | NULL | [yuen_agg(value, group_id)] |
| yuen_agg | aggregate | Performs Yuen's trimmed-means t-test, robust to outliers and non-normality. | NULL | [yuen_agg(value, group_id, {'trim': 0.2})] |
Overloaded Functions
This extension does not add any function overloads.
Added Types
This extension does not add any types.
Added Settings
| name | description | input_type | scope | aliases | typed_value |
|---|---|---|---|---|---|
| anofox_telemetry_enabled | Enable or disable anonymous usage telemetry | BOOLEAN | GLOBAL | [] | true |
| anofox_telemetry_key | PostHog API key for telemetry | VARCHAR | GLOBAL | [] | phc_t3wwRLtpyEmLHYaZCSszG0MqVr74J6wnCrj9D41zk2t |
| datazoo_banner | Show the DataZoo feedback banner when an extension is loaded in an interactive terminal (at most once a day per extension). | BOOLEAN | GLOBAL | [] | true |
| temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |