Learn R Programming

grnn (version 0.1.0)

guess: Guess

Description

Infers the value of a new observation.

Usage

guess(nn, X)

Arguments

nn
A trained and smoothed General regression neural network.
X
A vector describing a new observation.

See Also

grnn-package

Examples

Run this code
n <- 100
set.seed(1)
x <- runif(n, -2, 2)
y0 <- x^3
epsilon <- rnorm(n, 0, .1)
y <- y0 + epsilon
grnn <- learn(data.frame(y,x))
grnn <- smooth(grnn, sigma=0.1)
guess(grnn, -2)
guess(grnn, -1)
guess(grnn, -0.2)
guess(grnn, -0.1)
guess(grnn, 0)
guess(grnn, 0.1)
guess(grnn, 0.2)
guess(grnn, 1)
guess(grnn, 2)

Run the code above in your browser using DataLab