View source: R/kernel_functions.R
Linear | R Documentation |
'Linear()' computes the inner product between all possible pairs of rows of a matrix or data.frame with dimension NxD.
Linear(X, cos.norm = FALSE, coeff = NULL)
X |
Matrix or data.frame that contains real numbers ("integer", "float" or "double"). |
cos.norm |
Should the resulting kernel matrix be cosine normalized? (Defaults: FALSE). |
coeff |
(optional) A vector of length D that weights each one of the features (columns). When cos.norm=TRUE, 'Linear()' first does the weighting and then the cosine-normalization. |
Kernel matrix (dimension: NxN).
dat <- matrix(rnorm(250),ncol=50,nrow=5)
Linear(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.