The function grnn.fit creates a general regression neural network (GRNN)
grnn.fit
grnn.fit(x, y, w = rep(1, length(y)), sigma = 1)
The matrix of predictors
The vector of response variable
The vector of weights with default = 1 for each record
The scalar of smoothing parameter
A general regression neural network object
Donald Specht. (1991). A General Regression Neural Network.
# 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) # }
Run the code above in your browser using DataLab