GithubHelp home page GithubHelp logo

im-pek / mutual-information Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rmaestre/mutual-information

0.0 1.0 0.0 104 KB

In probability theory and information theory, the mutual information of two random variables is a quantity that measures the mutual dependence of the two random variables. This script performs MI over Mutual Information over discrete random variables

Python 100.00%

mutual-information's Introduction

Roberto maestre - [email protected]
Bojan Mihaljevic - [email protected]

https://controls.engin.umich.edu/wiki/index.php/Correlation_and_Mutual_Information

Mutual information (also referred to as transinformation) is a quantitative measurement of how much one random variable (Y) tells us about another random variable (X). In this case, information is thought of as a reduction in the uncertainty of a variable. Thus, the more mutual information between X and Y, the less uncertainty there is in X knowing Y or Y knowing X. For our purposes, within any given process, several parameters must be selected in order to properly run the process. The relationship between variables is integral to correctly determine working values for the system. For example, adjusting the temperature in a reactor often causes the pressure to change as well. Mutual information is most commonly measured in logarithms of base 2 (bits) but is also found in base e (nats) and base 10 (bans).


data:
[ (0, 0, 1, 1, 0, 1, 1, 2, 2, 2),
  (3, 4, 5, 5, 3, 2, 2, 6, 6, 1),
  (7, 2, 1, 3, 2, 8, 9, 1, 2, 0),
  (7, 7, 7, 7, 7, 7, 7, 7, 7, 7),
  (0, 1, 2, 3, 4, 5, 6, 7, 1, 1) ]


./it_tool.py

Entropy(X_1): 0.759176
Elapsed time: 0.000941

Entropy(X_3): 0.000000
Elapsed time: 0.000046

Entropy(X_4): 0.856864
Elapsed time: 0.000247

Entropy(X_0, X_1): 0.759176
Elapsed time: 0.000639

Entropy(X_3, X_3): 0.000000
Elapsed time: 0.000082

MI(X_0, X_1): 0.472903
Elapsed time: 0.001174

MI(X_1, X_2): 0.555834
Elapsed time: 0.002696

mutual-information's People

Contributors

rmaestre avatar

Watchers

James Cloos 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.