gramm: Gramm Matrices

Description Usage Arguments Value Examples

View source: R/gramm.R

Description

This function creates a single gramm matrix for traning set based upon several types of kernels.

Usage

1
gramm(x, kernel, sigma, degree, scale)

Arguments

x

Matrix of predictors

kernel

Type of kernel used to compute a gramm matrix

sigma

Hyperparameters for radial kernels

degree, scale

Hyperparameter for polynomial kernel

Value

Gramm matrix

Examples

1
2
3
4
5
6
7
library(kernlab)
data(benchmark.data)
example.data=benchmark.data[[1]]
#Generate linear kernel matrix
gramm(example.data[,1:2],'linear',0,0,0)
#Generate radial kernel matrices with different values for the hyperparameter.
gramm(example.data[,1:2],'radial',2^seq(-3:0),0,0)

RMKL documentation built on May 2, 2019, 7:55 a.m.

Related to gramm in RMKL...