kernelize | R Documentation |
Apply a kernel to your data.
kernelize(
x,
kernel,
standardize = TRUE,
rows_proportion = 0.8,
arc_cosine_deep = 1,
gamma = 1/NCOL(x),
coef0 = 0,
degree = 3
)
x |
( |
kernel |
( |
standardize |
( |
rows_proportion |
( |
arc_cosine_deep |
( |
gamma |
( |
coef0 |
( |
degree |
( |
You have to consider that before applying the kernel, the provided data is
converted to matrix with to_matrix()
function, see its documentation for
more details of how categorical variables are handled.
The different kernel transformations are described in the following mathematical expressions:
Linear:
Polynomial:
Radial:
Sigmoid:
A matrix
with the data after apply the kernel.
## Not run:
kernelize(iris, kernel = "linear")
kernelize(1:10, kernel = "polynomial")
kernelize(
matrix(rnorm(12), 3, 4),
kernel = "Sparse_polynomial",
rows_proportion = 0.5
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.