Coder Social home page Coder Social logo

forassk / detectioncausalrelationshipstimeseries Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruteee/detectioncausalrelationshipstimeseries

0.0 0.0 0.0 319 KB

Code for paper "A method for detecting causal relationships between industrial alarm variables using Transfer entropy and K2-Algorithm"

Python 39.86% Jupyter Notebook 60.14%

detectioncausalrelationshipstimeseries's Introduction

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

graph of causal relationships

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).

detectioncausalrelationshipstimeseries's People

Contributors

ruteee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.