kfm_exact {mildsvm} | R Documentation |
Create an exact kernel feature map
Description
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.
Usage
kfm_exact(kernel = "polynomial", degree = 2, const = 1)
Arguments
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 |
Details
Currently, the following kernels are supported:
-
'polynomial'
, withdegree
= d andconst
= c
Value
An object of class kfm_exact
with the following components,
returned from the inputs:
-
kernel
-
degree
-
const
Author(s)
Sean Kent
See Also
Other kernel feature map functions:
kfm_nystrom()
Examples
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)
[Package mildsvm version 0.4.0 Index]