grnn.search_rsq: Search for the optimal value of GRNN smoothing parameter...

Description Usage Arguments Value Examples

View source: R/grnn.search_rsq.R

Description

The function grnn.search_rsq searches for the optimal value of GRNN smoothing parameter by cross-validation. It is applicable to the functional approximation

Usage

1
grnn.search_rsq(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

1
2
3
4
5
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_rsq(net = gnet, sigmas = seq(3), nfolds = 2)

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

Related to grnn.search_rsq in yager...