TiMINoAlgorithm<T>

Models & Types · AiDotNet.CausalDiscovery.TimeSeries

TiMINo — Time series Models with Independent Noise (TiMINo causality, linear model class).

Inheritance: CausalDiscoveryBase<T> → TimeSeriesCausalBase<T> → TiMINoAlgorithm<T>

For Beginners

TiMINo checks if the “leftover noise” after predicting one variable from the others is truly unrelated to everything used for the prediction. Only the true causal direction leaves such independent noise, so the variable whose noise looks most independent is placed last in the causal order, and the search repeats on the rest.

How It Works

TiMINo assumes each series follows a restricted structural equation model whose noise is independent of the past of all series and of the present of its parents: x_k[t] = f_k(x_pa[t-p..t], x_k[t-p..t-1]) + n_k[t]. This class fits f_k by least squares with an intercept (the linear TiMINo model class) and decides independence with the HSIC test.

Algorithm (Peters, Janzing and Schölkopf 2013, Algorithm 1):

  • S := all variables. For every k in S, regress x_k[t] on x_k[t-1..t-p] and on x_i[t..t-p] for

every other i in S, and test whether the residuals are independent of each regressor series.

  • The k with the weakest dependence (the largest p-value) is a sink of S: remove it from S and

make the variables left in S its parents. Repeat until one variable is left.

  • Remove unnecessary parents: drop parent i of k when the residuals of the model without i are

still independent of every series of the model with i (p-value of at least the significance level).

The output has an edge i → k (weight 1) for every remaining parent i of k: TiMINo returns parent sets, not effect sizes.

Independence test: the HSIC test of Gretton et al. (2008) with Gaussian kernels whose width is the median heuristic (σ² = median of the positive squared distances / 2) and the gamma approximation of the null distribution. A regression is tested against each of its regressor series (the lags 0..p of the other variables and the lags 1..p of the target); the smallest p-value is Bonferroni corrected by the number of tests.

Bad model fit: when even the best sink candidate rejects independence at the significance level, the paper stops with “I do not know”. This implementation still completes the order search and pruning (the ordering by weakest dependence is the best available guess) and reports the rejection through ModelFitRejected, so a caller can discard the graph.

Options:MaxLag is the model order p (default 3) and SignificanceLevel the test level α (default 0.05, as in the paper). The kernel matrices make each test O(m²) in the m = n - p usable time steps.

Reference: Peters, Janzing and Schölkopf (2013), “Causal Inference on Time Series using Restricted Structural Equation Models”, NeurIPS. HSIC test: Gretton et al. (2008), “A Kernel Statistical Test of Independence”, NeurIPS.

Constructors

Constructor Summary
TiMINoAlgorithm(CausalDiscoveryOptions options)

Properties

Property Summary
bool ModelFitRejected { get; set; } True when the last DiscoverStructure call selected a sink whose residuals were still dependent at the significance level: the paper’s “I do not know - bad model fit” outcome, meaning the linear TiMINo model class does not fit.
bool SupportsNonlinear { get; }
string Name { get; }