kfm_exact | R Documentation |
For some kernels, it is possible to create the exact features from given data. This function stores the information needed to build those exact features.
kfm_exact(kernel = "polynomial", degree = 2, const = 1)
kernel |
A character determining the kernel to use. Currently, only
|
degree |
A numeric value (default 2) that provides the degree for
|
const |
A numeric value (default 1) for the constant term when |
Currently, the following kernels are supported:
'polynomial'
, with degree
= d and const
= c
An object of class kfm_exact
with the following components,
returned from the inputs:
kernel
degree
const
Sean Kent
Other kernel feature map functions:
kfm_nystrom()
df <- data.frame( X1 = c(2, 3, 4, 5, 6, 7, 8), X2 = c(1, 1.2, 1.3, 1.4, 1.1, 7, 1), X3 = rnorm(7) ) fit <- kfm_exact(kernel = "polynomial", degree = 2, const = 1) fm <- build_fm(fit, df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.