Neural Network Toolbox Previous page   Next Page

Graphical User Interface

Introduction to the GUI

The graphical user interface (GUI) is designed to be simple and user friendly, but we will go through a simple example to get you started.

In what follows you bring up a GUI Network/Data Manager window. This window has its own work area, separate from the more familiar command line workspace. Thus, when using the GUI, you might "export" the GUI results to the (command line) workspace. Similarly you may want to "import" results from the command line workspace to the GUI.

Once the Network/Data Manager is up and running, you can create a network, view it, train it, simulate it and export the final results to the workspace. Similarly, you can import data from the workspace for use in the GUI.

The following example deals with a perceptron network. We go through all the steps of creating a network and show you what you might expect to see as you go along.

Create a Perceptron Network (nntool)

We create a perceptron network to perform the AND function in this example. It has an input vector p= [0 0 1 1;0 1 0 1] and a target vector t=[0 0 0 1]. We call the network ANDNet. Once created, the network will be trained. We can then save the network, its output, etc., by "exporting" it to the command line.

Input and target

To start, type nntool. The following window appears.

Click on Help to get started on a new problem and to see descriptions of the buttons and lists.

First, we want to define the network input, which we call p, as having the particular value [0 0 1 1;0 1 0 1]. Thus, the network had a two-element input and four sets of such two-element vectors are presented to it in training. To define this data, click on New Data, and a new window, Create New Data appears. Set the Name to p, the Value to [0 0 1 1;0 1 0 1], and make sure that Data Type is set to Inputs.The Create New Data window will then look like this:

Now click Create to actually create an input file p. The Network/Data Manager window comes up and p shows as an input.

Next we create a network target. Click on New Data again, and this time enter the variable name t, specify the value [0 0 0 1], and click on Target under data type. Again click on Create and you will see in the resulting Network/Data Manager window that you now have t as a target as well as the previous p as an input.

Create Network

Now we want to create a new network, which we will call ANDNet. To do this, click on New Network, and a CreateNew Network window appears. Enter ANDNet under Network Name. Set the Network Type to Perceptron, for that is the kind of network we want to create. The input ranges can be set by entering numbers in that field, but it is easier to get them from the particular input data that you want to use. To do this, click on the down arrow at the right side of Input Range. This pull-down menu shows that you can get the input ranges from the file p if you want. That is what we want to do, so click on p. This should lead to input ranges [0 1;0 1].We want to use a hardlim transfer function and a learnp learning function, so set those values using the arrows for Transfer function and Learning function respectively. By now your Create New Network window should look like:

Next you might look at the network by clicking on View. For example:

This picture shows that you are about to create a network with a single input (composed of two elements), a hardlim transfer function, and a single output. This is the perceptron network that we wanted.

Now click Create to generate the network. You will get back the Network/Data Manager window. Note that ANDNet is now listed as a network.


Previous page  Outliers and the Normalized Perceptron Rule Train the Perceptron Next page

© 1994-2005 The MathWorks, Inc.