observed {validann} | R Documentation |
Return observed target values.
Description
Return observed target values used for fitting ‘ann’ or ‘nnet’ ANN models.
Usage
observed(object)
Arguments
object |
an object of class ‘ann’ as returned by |
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
# 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)
[Package validann version 1.2.1 Index]