yager (version 0.1.0)

grnn.predone: Calculate a predicted value of GRNN

Description

The function grnn.predone calculates a predicted value of GRNN based on an input vector

Usage

grnn.predone(net, x, type = 1)

Arguments

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

Value

A scalar of the predicted value

References

Donald Specht. (1991). A General Regression Neural Network.

See Also

grnn.fit

Examples

Run this code
# 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 DataCamp Workspace