observed: Return observed target values.

Description Usage Arguments Details Value Examples

Description

Return observed target values used for fitting ‘ann’ or ‘nnet’ ANN models.

Usage

1
observed(object)

Arguments

object

an object of class ‘ann’ as returned by ann or of class ‘nnet’ as returned by nnet.

Details

This function can be invoked by calling observed(x) for an object x of class ‘ann’ or ‘nnet’.

Value

a 1-column matrix of observed target values.

Examples

1
2
3
4
5
6
7
8
9
# Get observed values of y used to train ann object `fit'.
# ---
data("ar9")
samp <- sample(1:1000, 200)
y <- ar9[samp, ncol(ar9)]
x <- ar9[samp, -ncol(ar9)]
x <- x[, c(1,4,9)]
fit <- ann(x, y, size = 1, act_hid = "tanh", act_out = "linear", rang = 0.1)
y_obs <- observed(fit)

Example output

initial  value 762.071426 
iter  20 value 315.436274
iter  40 value 181.076438
iter  60 value 176.465349
final  value 176.054850 
converged

validann documentation built on May 2, 2019, 8:01 a.m.

Related to observed in validann...