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: rbftrain rbftest rbfpredict rbfsave rbfload rbfinfo

Quantlet: rbftrain2
Description: trains a radial basis function neural network

Reference(s):

Usage: {inp,net,err} = rbftrain2(x,y,clusters,learn,epochs,mMSE{,activ})
Input:
x (n x p) matrix, predictor variables
y (n x q) matrix, response variables
clusters scalar, number of clusters to be built in the hidden layer
learn (3 x 1) vector, minimum learning rate and maximum learning rate for building the clusters respectively, learn[3] is the learning rate for training the output layer. learn must be from (0,1)
epochs (2 x 1) vector, number of epochs to train the cluster and output units respectively
mMSE scalar, minimum value of the mean squared error to stop the training
activ optional scalar, 0 for binary (default) or 1 for bipolar activation sigmoid function
Output:
inp list of input parameters which define the network; it consists of elements inputs (scalar, number of predictors), clusters (see Input), outputs (scalar, number of responses), samples (scalar, number of samples), learn, epochs, mMSE and activ (see Input).
net list of network characteristics containing: clustersWeights ((clusters x inputs) matrix, weights of the hidden layer), trFonDev ((clusters x 1) vector, deviance of the transfer function), outputsWeights ((outputs x clusters) matrix, weights of the output layer) and bias ((outputs x 1) vector, weights of the bias).
err list of output error functions containing: MSE ((epochs[2] x 1) vector, mean squared error for the network in each training epoch), maxDiff ((epochs[2] x outputs) matrix, maximum difference between the real and predicted output in each output unit for each training epoch) and meanDiff ((epochs[2] x outputs) matrix, mean differences in every training epoch).

Note:

Example:
library("nn")		; load the library
; training set
randomize(2020)
n  = 10
xt = normal(n,2)+#(-1,-1)' | normal(n,2)+#(+1,+1)'
yt =(matrix(n)-1)|matrix(n)
; build the RBF network
clusters = 2
learn    = 0.1|0.2|0.1
epochs   = 5|5
mMSE     = 0.05
activ    = 0
rbfnet = rbftrain2(xt,yt,clusters,learn,epochs,mMSE,activ)

Result:
Runs a RBF neural network with two hidden units for generated data.

Contents of t
[1,] " An  2 - 2 - 1 RBF-network"
[2,] " training epochs: 5 - 5"
[3,] " cluster's learning rates: 0.2000 - 0.1000"
[4,] " output's learning rate: 0.1000"
[5,] " minimum mean squared error: 0.050"
[6,] " BINARY sigmoid activation function"
[7,] " after     5 epochs reached the MSE: 0.095827 "



Author: K. Komorad, 20021212 license MD *Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006