estimate_gamma | R Documentation |
This function returns an estimation of the optimum value for the gamma hyperparameter (required by the RBF kernel function) using different heuristics:
It returns the inverse of the number of features in X.
It returns the inverse of the number of features, normalized by the total variance of X.
A range of values, computed with the function 'kernlab::sigest()'.
estimate_gamma(X)
X |
Matrix or data.frame that contains real numbers ("integer", "float" or "double"). |
A list with the gamma value estimation according to different criteria.
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.