Learn R Programming

elmNN (version 1.0)

print.elmNN: Print a summary of the attributes of a trained neural network

Description

Print the attributes of a elmNN object.

Usage

"print"(x, ...)

Arguments

x
an object of class elmNN.
...
not used.

Value

Furthermore a list of the printed attributes.
nhid
number of hidden neurons selected
actfun
activation function used
inpweight
head of the matrix of input weights ( randomly calculated )
biashid
head of the vector of hidden layer bias ( randomly calculated )
outweight
head of the matrix of output weights ( calculated by the algorithm )
fitted(x)
head of the vector with the output prediction of the training set

References

see elmNN-package documentation.

See Also

elmtrain.default,elmtrain.formula,predict.elmNN,elmNN-package

Examples

Run this code
set.seed(1234)
Var1 <- runif(50, 0, 100) 
sqrt.data <- data.frame(Var1, Sqrt=sqrt(Var1))
model <- elmtrain.formula(Sqrt~Var1, data=sqrt.data, nhid=10, actfun="sig")
print(model)

## The function is currently defined as
function (x, ...) 
{
    cat("Call:\n")
    cat(paste(x$call, "\n"))
    cat("Number of hidden neurons:\n")
    cat(paste(x$nhid, "\n"))
    cat("Activation function:\n")
    cat(paste(x$actfun, "\n"))
    cat("Input arc weights:\n")
    cat(paste(head(x$inpweight), "...\n"))
    cat("Bias of hidden neurons:\n")
    cat(paste(head(x$biashid), "...\n"))
    cat("Output arc weights:\n")
    cat(paste(head(x$outweight), "...\n"))
    cat("Predictions on training set:\n")
    cat(paste(head(fitted(x)), "...\n"))
  }

Run the code above in your browser using DataLab