DetectionCausalRelationshipsTimeSeries
Code for paper "A method for detecting causal relationships between industrial alarm variables using Transfer entropy and K2-Algorithm"
Install / Use
/learn @ruteee/DetectionCausalRelationshipsTimeSeriesREADME
Detection of Causal Relationships between time series
Code for paper "A method for detecting causal relationships between industrial alarm variables using Transfer Entropy and K2-Algorithm"
About
This repository provides all the codes for the implementation of the method of detection of causality between time series, using a modified version of the K2-Algorithm and Transfer Entropy. It also provides a notebook and script (Methodology.ipynb) where the case study, described in the paper, using the simulated chemical process Tennesee Eastman can be reproduced by the use of function "apply_methodology"
Content
-
Data - Folder containing the following datasets, that can be used to reproduce the results of the paper.
- alarms_m5.csv - The dataset of industrial alarms used in the case study
- df_te.csv - Dataset with entropies already computed for the study case
- df_lag.csv - Dataset with the lags computed in the transfer entropy - corresponds to the 'h' parameter that produced the high amount of entropy
-
K2_utils.py - Python script with K2-algorithm basic functions implemented
-
TransferEntropy.py Python script with Transfer Entropy basic functions implemented
-
Utils.py - Python script with basic functions used in the proposed method
-
Methodology.py - Python script containing the implementation of all the algorithms needed to use the proposed method, along with the function "apply_methodology" which does reproduce all the stages of the method and reproduces the result presented on the paper.
-
Methodology.ipynb - Jupyter notebook of the Methodology script, it can be used for study purposes.
Final Graph of causal relationships produced by the application of the method

How to reproduce the results and test with other datasets
To reproduce the result of the paper
By using the function "apply_methodology" present in the Methodology.ipynb or in the script Methodology.py, the given datasets and the setting proposed in the paper, you can reproduce the result. Note that these settings are already specified in the notebook and in the script.
To run with other datasets
You can use the apply_methodology function, using the desired dataset and desired settings (l, k, h, t).
Related Skills
proje
Interactive vocabulary learning platform with smart flashcards and spaced repetition for effective language acquisition.
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
API
A learning and reflection platform designed to cultivate clarity, resilience, and antifragile thinking in an uncertain world.
openclaw-plugin-loom
Loom Learning Graph Skill This skill guides agents on how to use the Loom plugin to build and expand a learning graph over time. Purpose - Help users navigate learning paths (e.g., Nix, German)
