Learn R Programming

kkmeans (version 0.1.3)

get_kernel_matrix: Get the kernel matrix for a dataset

Description

Given a dataset, kernel function, and tuning parameter, will return the n x n kernel matrix

Usage

get_kernel_matrix(data, kern = "g", param1 = 1, param2 = 1)

Value

An n x n matrix for data given by the specified kernel. The value in position (i, j) corresponds to the kernel function evaluated at data[i, ]

and data[j, ].

Arguments

data

data vector

kern

the kernel to use, one of ('gaussian', 'poly', 'sigmoid', 'laplacian'), can use first letter

param1

first parameter to pass to kernel function.

param2

second parameter to pass to kernel function.