guess: Guess

Description Usage Arguments See Also Examples

View source: R/guess.r

Description

Infers the value of a new observation.

Usage

1
  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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)

chasset/grnn documentation built on May 12, 2017, 2:22 a.m.