inchol                package:kernlab                R Documentation

_I_n_c_o_m_p_l_e_t_e _C_h_o_l_e_s_k_y _d_e_c_o_m_p_o_s_i_t_i_o_n

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

     'inchol' computes the incomplete Cholesky decomposition of the
     kernel matrix from a data matrix.

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

     inchol(x, kernel="rbfdot", kpar=list(sigma=0.1), tol = 0.001, 
                 maxiter = dim(x)[1], blocksize = 50, verbose = 0)

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

       x: The data matrix indexed by row

  kernel: the kernel function used in training and predicting. This
          parameter can be set to any function, of class 'kernel',
          which computes the inner product in feature space between two
          vector arguments. kernlab provides the most popular kernel
          functions which can be used by setting the kernel parameter
          to the following strings:

             *  'rbfdot' Radial Basis kernel function "Gaussian"

             *  'polydot' Polynomial kernel function

             *  'vanilladot' Linear kernel function

             *  'tanhdot' Hyperbolic tangent kernel function

             *  'laplacedot' Laplacian kernel function

             *  'besseldot' Bessel kernel function

             *  'anovadot' ANOVA RBF kernel function

             *  'splinedot' Spline kernel 

          The kernel parameter can also be set to a user defined
          function of class kernel by passing the function name as an
          argument. 

    kpar: the list of hyper-parameters (kernel parameters). This is a
          list which contains the parameters to be used with the kernel
          function. Valid parameters for existing kernels are :

             *  'sigma' inverse kernel width for the Radial Basis
                kernel function "rbfdot" and the Laplacian kernel
                "laplacedot".

             *  'degree, scale, offset' for the Polynomial kernel
                "polydot"

             *  'scale, offset' for the Hyperbolic tangent kernel
                function "tanhdot"

             *  'sigma, order, degree' for the Bessel kernel
                "besseldot". 

             *  'sigma, degree' for the ANOVA kernel "anovadot".

          Hyper-parameters for user defined kernels can be passed
          through the kpar parameter as well. 

     tol: algorithm stops when remaining pivots bring less accuracy
          then 'tol' (default: 0.001)

 maxiter: maximum number of iterations and colums in Z

blocksize: add this many columns to matrix per iteration

 verbose: print info on algorithm convergence

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

     An incomplete cholesky decomposition calculates Z where K= ZZ' K
     being the kernel matrix. Since the rank of a kernel matrix is
     usually low, Z tends to be smaller then the complete kernel
     matrix. The decomposed matrix can be used to create memory
     efficient kernel-based algorithms without the need to compute and
     store a complete kernel matrix in memory.

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

     An S4 object of class "inchol" which is an extension of the class
     "matrix". The object is the decomposed kernel matrix along with 
     the slots : 

  pivots: Indices on which pivots where done

diagresidues: Residuals left on the diagonal

maxresiduals: Residuals picked for pivoting


     slots can be accessed either by 'object@slot' or by accessor
     functions with the same name (e.g. 'pivots(object))'

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

     Alexandros Karatzoglou (based on Matlab code by  S.V.N. (Vishy)
     Vishwanathan and Alex Smola)
      alexandros.karatzoglou@ci.tuwien.ac.at

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

     *  Francis R. Bach, Michael I. Jordan
         _Kernel Independent Component Analysis_
         Journal of Machine Learning Research  3, 1-48
         <URL: http://www.jmlr.org/papers/volume3/bach02a/bach02a.pdf>

_S_e_e _A_l_s_o:

     code{csi}, code{inchol-class}, 'chol'

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

     data(iris)
     datamatrix <- as.matrix(iris[,-5])
     # initialize kernel function
     rbf <- rbfdot(sigma=0.1)
     rbf
     Z <- inchol(datamatrix,kernel=rbf)
     dim(Z)
     pivots(Z)
     # calculate kernel matrix
     K <- crossprod(t(Z))
     # difference between approximated and real kernel matrix
     (K - kernelMatrix(kernel=rbf, datamatrix))[6,]

