MI                package:maigesPack                R Documentation

_C_a_l_c_u_l_a_t_e _M_u_t_u_a_l _I_n_f_o_r_m_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Function to calculate the mutual information of 2 random
     variables, or between all pairs of rows of a numerical matrix.

_U_s_a_g_e:

     MI(x, y=NULL, k=1)

_A_r_g_u_m_e_n_t_s:

       x: numerical matrix to calculate the MI between all pairs of
          rows from 'x'. Also, 'x' must be a numerical vector and 'y'
          must be specified as another numerical vector of same lenght
          as 'x' and the MI value between both them are calculated.

       y: optional numerical vector that must be specified if 'x' is a
          vector. Defaults to NULL.

       k: integer specifying the number of the neighbours to be used in
          the calculation of the MI value.

_D_e_t_a_i_l_s:

     This function implements an algorithm proposed by Kraskov et al.
     (2004) that don't use estimator of the entropy.

_V_a_l_u_e:

     If 'x' is a matrix, the function return a square matrix with
     lenght equal to the number of rows of 'x' with MI values between
     all pairs of rows from 'x'. If 'x' is a numerical vector, 'y' must
     be specified and the function returns a positive real number with
     the MI value between the two vectors.

_A_u_t_h_o_r(_s):

     Gustavo H. Esteves <gesteves@vision.ime.usp.br>

_R_e_f_e_r_e_n_c_e_s:

     Kraskov, A.; Stogbauer, H. and Grassberger, P. Estimating mutual
     information, *Physical Review E*, 69, 066138, 2004 (<URL:
     http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=PLEEE8000069000006066138000001&idtype=cvips&gifs=yes>).

_E_x_a_m_p_l_e_s:

     x <- runif(50, 0, 1)
     y <- rbeta(50, 1, 2)
     MI(x, y)

     z <- matrix(rnorm(100, 0, 1), 4, 25)
     MI(z)

