grnn.fit {yager} | R Documentation |
The function grnn.fit
creates a general regression neural network (GRNN)
grnn.fit(x, y, sigma = 1, w = rep(1, length(y)))
x |
The matrix of predictors |
y |
The vector of response variable |
sigma |
The scalar of smoothing parameter |
w |
The vector of weights with default = 1 for each record |
A general regression neural network object
Donald Specht. (1991). A General Regression Neural Network.
data(iris, package = "datasets")
Y <- ifelse(iris[, 5] == "setosa", 1, 0)
X <- scale(iris[, 1:4])
gnet <- grnn.fit(x = X, y = Y)