yager (version 0.1.0)

grnn.optmiz_auc: Optimize the optimal value of GRNN smoothing parameter based on AUC

Description

The function grnn.optmiz_auc optimize the optimal value of GRNN smoothing parameter by cross-validation. It is applicable to the classification.

Usage

grnn.optmiz_auc(net, lower = 0, upper, nfolds = 4, seed = 1, method = 1)

Arguments

net

A GRNN object generated by grnn.fit()

lower

A scalar for the lower bound of the smoothing parameter

upper

A scalar for the upper bound of the 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

method

A scalar referring to the optimization method, 1 for Golden section searc and 2 for Brent<U+2019>s method

Value

The best outcome

See Also

grnn.search_auc

Examples

Run this code
# NOT RUN {
data(iris, package = "datasets")
Y <- ifelse(iris[, 5] == "setosa", 1, 0)
X <- scale(iris[, 1:4])
gnet <- grnn.fit(x = X, y = Y)
# }
# NOT RUN {
grnn.optmiz_auc(net = gnet, lower = 3, upper = 7, nfolds = 2)
# }

Run the code above in your browser using DataLab