Description Usage Arguments Value References See Also Examples
View source: R/grnn.predone.R View source: R/grnn.predonev1.R
The function grnn.predone
calculates a predicted value of GRNN based on an input vector
The function grnn.predone
calculates a predicted value of GRNN based on an input vector
1 2 3 | grnn.predone(net, x, type = 1)
grnn.predone(net, x, type = 1)
|
net |
The GRNN object generated by grnn.fit() |
x |
The vector of input predictors |
type |
A scalar, 1 for euclidean distance and 2 for manhattan distance |
A scalar of the predicted value
A scalar of the predicted value
Donald Specht. (1991). A General Regression Neural Network.
Donald Specht. (1991). A General Regression Neural Network.
1 2 3 4 5 6 7 8 9 10 | 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, ]))
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, ]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.