Skip to contents

It is equivalent to compute `K` over centered data (i.e. the mean of each column is subtracted) in Feature Space.

Usage

centerK(K)

Arguments

K

Kernel matrix (class "matrix").

Value

Centered `K` (class "matrix").

Examples

dat <- matrix(rnorm(250),ncol=50,nrow=5)
K <- Linear(dat)
centerK(K)
#>            [,1]        [,2]        [,3]      [,4]       [,5]
#> [1,]  55.416177 -16.4721915 -11.5754084 -18.16437  -9.204204
#> [2,] -16.472192  31.8700324   0.5365542 -11.00640  -4.927995
#> [3,] -11.575408   0.5365542  34.6379065 -11.58782 -12.011232
#> [4,] -18.164373 -11.0064004 -11.5878202  51.47751 -10.718919
#> [5,]  -9.204204  -4.9279946 -12.0112320 -10.71892  36.862350