kernlab (version 0.9-13)

csi-class: Class "csi"

Description

The reduced Cholesky decomposition object

Arguments

Objects from the Class

Objects can be created by calls of the form new("csi", ...). or by calling the csi function.

Extends

Class "matrix", directly.

See Also

csi, inchol-class

Examples

Run this code
data(iris)

## create multidimensional y matrix
yind <- t(matrix(1:3,3,150))
ymat <- matrix(0, 150, 3)
ymat[yind==as.integer(iris[,5])] <- 1

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

Run the code above in your browser using DataCamp Workspace