I have installed the
Код: Выделить всё
tigramiteКод: Выделить всё
# Imports import numpy as np import matplotlib from matplotlib import pyplot as plt %matplotlib inline import sklearn import tigramite from tigramite import data_processing as pp from tigramite.toymodels import structural_causal_processes as toys from tigramite import plotting as tp from tigramite.pcmci import PCMCI from tigramite.lpcmci import LPCMCI from tigramite.independence_tests.parcorr import ParCorr from tigramite.independence_tests.robust_parcorr import RobustParCorr from tigramite.independence_tests.parcorr_wls import ParCorrWLS from tigramite.independence_tests.gpdc import GPDC from tigramite.independence_tests.cmiknn import CMIknn from tigramite.independence_tests.cmisymb import CMIsymb from tigramite.independence_tests.gsquared import Gsquared from tigramite.independence_tests.regressionCI import RegressionCI Код: Выделить всё
np.random.seed(42) # Fix random seed to make results reproducible links_coeffs = {0: [((0, -1), 0.7), ((1, -1), -0.8)], 1: [((1, -1), 0.8), ((3, -1), 0.8)], 2: [((2, -1), 0.5), ((1, -2), 0.5), ((3, -3), 0.6)], 3: [((3, -1), 0.4)], } #stores the coefficients of the SCM T = 1000 # time series length #generate the timeseries data, true_parents_neighbors = toys.structural_causal_process(links_coeffs, T=T) T, N = data.shape # Initialize dataframe object, specify time axis and variable names var_names = [r'$X^0$', r'$X^1$', r'$X^2$', r'$X^3$'] dataframe = pp.DataFrame(data, datatime = {0:np.arange(len(data))}, var_names=var_names) Код: Выделить всё
IndexError: tuple index out of rangeКод: Выделить всё
data, true_parents_neighbors = toys.structural_causal_process(links_coeffs, T=T)How can I solve it?
Источник: https://stackoverflow.com/questions/781 ... th-tigrami