causalcompass.datasets.missing.generate_missing_lorenz_96
- causalcompass.datasets.missing.generate_missing_lorenz_96(p, T, F=10.0, delta_t=0.1, sd=0.1, burn_in=1000, seed=0, missing_config=None, interp='zoh')[source]
Generate Lorenz-96 data with missing values and interpolation.
References
https://github.com/jarrycyx/UNN
- Parameters:
p (int) – Number of variables
T (int) – Number of time points
F (float, default 10.0) – Forcing parameter
delta_t (float, default 0.1) – Time step for the Lorenz-96 simulator
sd (float, default 0.1) – Noise standard deviation
burn_in (int, default 1000) – Burn-in period
seed (int, default 0) – Random seed
missing_config (dict, default None) –
Configuration for the missing pattern.
Example
missing_config = {"random_missing": {"missing_prob": 0.2, "missing_var": "all"}}means each entry is missing with probability0.2. Therandom_missingpattern represents completely random missingness. Here,missing_probis the missing probability andmissing_varspecifies which variables are allowed to be masked. Settingmissing_varto"all"applies random missingness to all variables; alternatively, you can pass a list of variable indices such as[0, 2, 4]to mask only selected variables.interp (str, default 'zoh') – Interpolation method. Supported values are ‘zoh’, ‘linear’, and ‘GP’.
- Returns:
(data_interp, data_masked, mask, GC, original_data) — interpolated time series of shape (T, p, 1), masked time series of shape (T, p), missing data mask of shape (T, p) where 1 indicates observed and 0 indicates missing, ground-truth causal graph of shape (p, p), and original complete time series of shape (T, p).
- Return type:
tuple