parse_kernel_variable: Create Kernel Matrix

Description Usage Arguments Value Author(s)

View source: R/interface.R

Description

Create kernel matrix for each variable in the formula.

Usage

1
parse_kernel_variable(kern_var_name, kern_func, data, data_new = NULL)

Arguments

kern_var_name

(vector of characters) Names of variables in data to create the kernel matrix from. Must be a single term that is either of the form x (a single linear term) or k(x1, x2, …) (a kernel term that may contain multiple variables).

kern_func

(function) A kernel function. Will be overwritten to linear kernel if the variable doesn't contain 'k()'.

data

(data.frame, n*d) A data.frame, list or environment (or object coercible by as.data.frame to a data.frame), containing the variables in formula. Neither a matrix nor an array will be accepted.

data_new

(data.frame, n_new*d) New data for computing predictions.

Value

kernel_mat

(matrix, n*n) The kernel matrix corresponding to the variable being computed.

Author(s)

Jeremiah Zhe Liu


CVEK documentation built on Jan. 8, 2021, 5:42 p.m.