observed: Return observed target values.

Description Usage Arguments Details Value Examples

View source: R/ann.R

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)

gbhumphrey1/validann documentation built on May 16, 2019, 10:11 p.m.