CausalDiscoveryToolbox
CausalDiscoveryToolbox copied to clipboard
ValueError when running VarLiNGAM
When I run VarLiNGAM on Finance dataset (http://www.skleinberg.org/data/FinanceCPT.tar.gz), I meet a ValueError.
df_data = pd.read_csv(datafile) model = VarLiNGAM(lag=3) result = model.create_graph_from_data(df_data)
The error is as follows
File "
File "D:_work\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)
File "D:_work\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "F:/work_python_d_2/TimeSeriesCausalDiscovery/VARLiNGAM/VARLiNGAM_Finance.py", line 31, in
File "D:_work\Anaconda3\lib\site-packages\cdt\timeseries\graph\VARLiNGAM.py", line 75, in create_graph_from_data inst, lagged = self._run_varLiNGAM(data.values, verbose=self.verbose)
File "D:_work\Anaconda3\lib\site-packages\cdt\timeseries\graph\VARLiNGAM.py", line 109, in run_varLiNGAM Bhat = np.dot((Ident - Bo_), Mt_)
ValueError: shapes (25,25) and (75,25) not aligned: 25 (dim 1) != 75 (dim 0)
Hi, The data might not be in the good format; Let's ask @koutrgor for more details;