lazy.nntools {lazy.nntools}R Documentation

lazynntools: Some neuralnet tools for lazy boys and girls
(Alpha Version)

Description

This package provides some useful tools for learning supervised feed forward neural networks, which can be regarded as a non-linear regression or supervised classification models.

 The first layer is the input matrix, X.
 The last layer is the output matrix, Yhat.
 In between the first and the last layers, there are hidden layers.

The size of the network is given as a vector of the # of layers, nn, where nn[k] is the # of neurons of layer k.
nlayer is the # of layers: nlayer=length(nn)

Using the list of output matrices, O, and the list of weight matrices, W,
the output of the k-th layer will be calculated as:

  O[[k]] <- Psi( cbind( 1, O[[k-1]] ) %*% W[[k]] )

where Psi is the logistic function.

The Weight Matrices are stored in a list W of length nlayer.

 W[[k]] is nn[k-1]+1 x nn[k].
 W[[1]] is NULL.
 W[[2]] is nn[1]+1 x nn[2].
 W[[k]] is nn[k-1] x nn[k].
 W[[nlayer]] is nn[nlayer-1] x nn[nlayer].
 

The Output of each layer are stored in O, a list of length nlayer.

 O[[k]] is n x nn[k].
 O[[1]] = X.
 O[[k]] is n x nn[k].
 O[[nlayer]] is referred to as Yhat.
 



At the beginning of the session,
initialize_nn
must be called to create the storage lists for the output O and the weight W.

Tools

Test Data and Examples


[Package lazy.nntools version 0.0.1 Index]