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)

