Computes the Gram Matrix for a user-specified kernel using the library kernlab
. Note that
this function automatically standardizes the columns of the data entered.
compute_gram_matrix(X, kernel_type, params = c())
The n x n
gram matrix for the given kernel on the given data.
The design matrix with $n$ rows (one for each subject) and $p$ columns (one for each measurement on the subject). This is the design matrix you wish to search for a more optimal design.
One of the following: "vanilla", "rbf", "poly", "tanh", "bessel", "laplace", "anova" or "spline".
A vector of numeric parameters. Each kernel_type
has different numbers of
parameters required. For more information see documentation for the kernlab
library.
Adam Kapelner