Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES

 Documentation /  Neural Networks /  Changing the Neural Network Structure /  Accessing the values of the neurons /

The Neurons of an Feedforward NetworkPalettes

13.4.2 The Basis Functions of an RBF Network

To access the values of the basis functions of an RBF network is slightly more complicated than for an FF network since the output layer cannot be removed. Instead, you can change the output layer to an identity mapping. This is described here.

Load the Neural Networks package and a Mathematica standard add-on package.

In[1]:=

Load some test data.

In[3]:=

Initialize an RBF network with four hidden neurons.

In[4]:=

Out[4]=

It is convenient to express the RBF network using a less formal matrix notation:

First the distances between the input vector x and each column of are computed. These distances are multiplied with the square of their corresponding width in the vector Lambda before the basis function G is mapped over the vector. This forms the output of the hidden layer. A unit DC-level component is appended to the output of the hidden layer, and an inner product with gives the first term of the output. The second term is the linear submodel formed as an inner product between the inputs and the parameter matrix Chi.

You can access the values of the basis functions by changing the matrix to an identity matrix with dimension equal to the number of neurons plus a row of zeros for the DC-level parameters. You will then obtain a new RBF network with one output for each neuron. Also, if the original RBF network has a linear part, the linear part must be removed, and this can be done with NeuronDelete.

Check the number of neurons.

In[5]:=

Out[5]=

There are four neurons and this is the dimension of the identity mapping that is inserted.

Add a new matrix for w2.

In[6]:=

Out[6]=

Delete the linear part.

In[7]:=

Out[7]=

The newly obtained RBF network can be evaluated on input data. The output will be the values of the neurons of the original RBF network. Therefore, there will be one output for each neuron.

Check the values of the neurons for a numerical input value.

In[8]:=

Out[8]=

You can also plot the value of a single neuron.

Plot the fourth neuron.

In[9]:=

The Neurons of an Feedforward NetworkPalettes


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: