.. currentmodule:: minepy

Python API
==========

.. class:: MINE(alpha=0.6, c=15)
   
   Maximal Information-based Nonparametric Exploration.         
   
   :Parameters:
	alpha : float (0, 1.0]
	      the exponent in B(n) = n^alpha
        c : float (> 0)
              determines how many more clumps there will be than
              columns in every partition. Default value is 15, meaning
              that when trying to draw Gx grid lines on the x-axis,
              the algorithm will start with at most 15*Gx clumps

   .. automethod:: score(x, y)
   .. automethod:: mic()
   .. automethod:: mas()
   .. automethod:: mev()
   .. automethod:: mcn()
   .. automethod:: get_score()
   .. automethod:: get_alpha()
   .. automethod:: get_c()
   .. automethod:: computed()

Example
-------

>>> import numpy as np
>>> from minepy import MINE
>>> x = np.linspace(0, 1, 1000)
>>> y = np.sin(10 * np.pi * x) + x
>>> mine = MINE(alpha=0.6, c=15)
>>> mine.score(x, y)
>>> mine.mic()
1.0
>>> np.random.seed(0)
>>> y +=np.random.uniform(-1, 1, x.shape[0]) # add some noise
>>> mine.score(x, y)
>>> mine.mic()
0.50571669341737124