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

Description Usage Arguments Value See Also Examples

View source: R/grnn.optmiz_auc.R

Description

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

Usage

1
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’s method

Value

The best outcome

See Also

grnn.search_auc

Examples

1
2
3
4
5
6
7
8
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)

## End(Not run)

yager documentation built on Oct. 26, 2020, 1:06 a.m.

Related to grnn.optmiz_auc in yager...