amber0309 / IGCI

Python code of information geometric causal inference

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Information Geometric Causal Inference (IGCI)

Python version of the original MATLAB code of Information Geometric Causal Inference (IGCI).

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • NumPy
  • SciPy

We test the code using Anaconda 4.3.30 64-bit for python 2.7 on windows. Any later version should still work perfectly.

Apply on your data

Usage

Import IGCI using

from IGCI import igci

Apply IGCI on your data

f = igci(x, y, refMeasure=1, estimator=2)

Description

Input of function igci()

Argument Description
x Obeservations of the first variable. L by 1 numpy array.
y Obeservations of the second variable. L by 1 numpy array.
refMeasure 1 - uniform reference measure;
2 - Gaussian reference measure
estimator 1 - entropy;
2 - integral approximation

Output of function igci()

Argument Description
f f < 0 - x causes y;
f > 0 - y causes x;
None - incorrect inputs

Authors

  • Shoubo Hu - shoubo DOT sub AT gmail DOT com

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python code of information geometric causal inference

License:MIT License


Languages

Language:MATLAB 52.9%Language:Python 47.1%