Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: nn
See also: nnrnet ann nnrpredict2

Quantlet: nnrpredict
Description: estimates the response for a given net and a dataset

Reference(s):

Usage: yh = nnrpredict(x, net)
Input:
x n x p matrix, input variables
net list, composed object from nnrnet
Output:
yh list, composed from yh.result and yh.hess
yh.result n x q matrix, result variables
yh.hess matrix, the hessian matrix

Example:
library("nn")
x = read("kredit")
t = read("tkredit")
randomize(55)
y = x[,1]
x = x[,2:21]
x =(x-min(x))./(max(x)-min(x))
net = nnrnet(x, y, matrix(rows(x)), 10)
yh  = nnrpredict(x, net)
yh.result

Result:
runs a neural network with 10 hidden units for the kredit
data of Fahrmeier and Hammerle and computes the predicted
values.

Contents of ts
[1,] "A 20 - 10 - 1 network:"
[2,] "# weights     : 221"
[3,] "linear output : no"
[4,] "error function: least squares"
[5,] "log prob model: no"
[6,] "skip links    : no"
[7,] "max. weight   : 0.70"
[8,] "decay         : 0"
[9,] "max. Iterat   : 100"

Contents of result
[   1,]  0.71751
[   2,]        1
[   3,]        1
[   4,]        1
[   5,]  0.99967
...
[ 996,]  5.4697e-06
[ 997,]        0
[ 998,]        1
[ 999,]        1
[1000,]        0



Author: S. Klinke, 19970523 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006