grnn.search_auc {yager} | R Documentation |
Search for the optimal value of GRNN smoothing parameter based on AUC
Description
The function grnn.search_auc
searches for the optimal value of GRNN smoothing parameter by cross-validation.
It is applicable to the classification.
Usage
grnn.search_auc(net, sigmas, nfolds = 4, seed = 1)
Arguments
net |
A GRNN object generated by grnn.fit() |
sigmas |
A numeric vector to search for the best smoothing parameter |
nfolds |
A scalar for the number of n-fold, 4 by default |
seed |
The seed value for the n-fold cross-validation, 1 by default |
Value
The list of all searching outcomes and the best outcome
Examples
data(iris, package = "datasets")
Y <- ifelse(iris[, 5] == "setosa", 1, 0)
X <- scale(iris[, 1:4])
gnet <- grnn.fit(x = X, y = Y)
grnn.search_auc(net = gnet, sigmas = c(3, 5, 7), nfolds = 2)
[Package yager version 0.1.1 Index]