estimate_gamma {kerntools} | R Documentation |
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)
Arguments
X |
Matrix or data.frame that contains real numbers ("integer", "float" or "double"). |
Value
A list with the gamma value estimation according to different criteria.
Examples
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]
[Package kerntools version 1.0.2 Index]