Learn R Programming

kerntools (version 1.2.0)

estimate_gamma: Gamma hyperparameter estimation (RBF kernel)

Description

This function returns an estimation of the optimum value for the gamma hyperparameter (required by the RBF kernel function) using different heuristics:

D criterion

It returns the inverse of the number of features in X.

Scale criterion

It returns the inverse of the number of features, normalized by the total variance of X.

Quantiles criterion

A range of values, computed with the function `kernlab::sigest()`.

Usage

estimate_gamma(X)

Value

A list with the gamma value estimation according to different criteria.

Arguments

X

Matrix or data.frame that contains real numbers ("integer", "float" or "double").

Examples

Run this code
data <- matrix(rnorm(150),ncol=50,nrow=30)
gamma <- estimate_gamma(data)
gamma
K <- RBF(data, g = gamma$scale_criterion)
K[1:5,1:5]

Run the code above in your browser using DataLab