KLdiv                package:flexmix                R Documentation

_K_u_l_l_b_a_c_k-_L_e_i_b_l_e_r _D_i_v_e_r_g_e_n_c_e

_D_e_s_c_r_i_p_t_i_o_n:

     Estimate the Kullback-Leibler divergence of several distributions.

_U_s_a_g_e:

     KLdiv(object, ...)
     ## S4 method for signature 'matrix':
     KLdiv(object, eps=1e-4, ...)

_A_r_g_u_m_e_n_t_s:

  object: see Methods section below

     eps: probabilities below this treshold are discarded for numerical
          stability

     ...: Passed to the matrix method.

_D_e_t_a_i_l_s:

     Estimates 

                  int f(x) (log f(x) - log g(x)) dx

     for distributions with densities f() and g().

_V_a_l_u_e:

     A matrix of of KL divergences where the rows correspond to using
     the respective distribution as f() in the formula above.

_M_e_t_h_o_d_s:

     _o_b_j_e_c_t = "_m_a_t_r_i_x": Takes as input a matrix of density values with
          one row per observation and one column per distribution.

     _o_b_j_e_c_t = "_f_l_e_x_m_i_x": Returns the Kullback-Leibler divergence of the
          mixture components.

_A_u_t_h_o_r(_s):

     Friedrich Leisch

_R_e_f_e_r_e_n_c_e_s:

     S. Kullback and R. A. Leibler. On information and sufficiency. The
     Annals of Mathematical Statistics 22(1), pages 79-86, 1951.

     Friedrich Leisch. Exploring the structure of mixture model
     components. In Jaromir Antoch, editor, Compstat 2004 - Proceedings
     in Computational Statistics, pages 1405-1412. Physika Verlag,
     Heidelberg, Germany, 2004. ISBN 3-7908-1554-3.

_E_x_a_m_p_l_e_s:

     x = (1:100)/100
     ## Gaussian and Student t are much closer to each other than
     ## to the uniform:
     KLdiv(cbind(u=dunif(x), n=dnorm(x), t=dt(x, df=10)))

