powered by
The function grnn.predone calculates a predicted value of GRNN based on an input vector
grnn.predone
grnn.predone(net, x, type = 1)
The GRNN object generated by grnn.fit()
The vector of input predictors
A scalar, 1 for euclidean distance and 2 for manhattan distance
A scalar of the predicted value
Donald Specht. (1991). A General Regression Neural Network.
grnn.fit
# 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) for (i in seq(5)) print(grnn.predone(gnet, X[i, ])) # }
Run the code above in your browser using DataLab