Data Mining: Practical Machine Learning Tools and Techniques, Second Edition

(Brent) #1
attribute (colored green); a hidden layer next to it (red) to which all the input
nodes are connected; and an output layer at the right (orange). The labels at the
far right show the classes that the output nodes represent. Output nodes for
numeric classes are automatically converted to unthresholded linear units.
Before clicking Startto run the network, you can alter its structure by adding
nodes and connections. Nodes can be selected or deselected. All six nodes in the
hidden and output layers in Figure 10.20(a) are deselected, indicated by the gray
color of their center. To select a node, simply click on it. This changes the color
of its center from gray to bright yellow. To deselect a node, right-click in an
empty space. To add a node, ensure that none is selected and left-click anywhere
in the panel; the new node will be selected automatically. In Figure 10.20(a), a
new node has been added at the lower center. To connect two nodes, select the
start node and then click on the end one. If several start nodes are selected, they
are all connected to the end node. If you click in empty space instead, a new
node is created as the end node. Notice that connections are directional
(although the directions are not shown). The start nodes remain selected; thus
you can add an entire hidden layer with just a few clicks, as shown in Figure
10.20(b). To remove a node, ensure that no nodes are selected and right-click
it; this also removes all connections to it. To remove a single connection, select
one node and right-click the node at the other end.
As well as configuring the structure of the network, you can control the learn-
ing rate, its momentum (Section 6.3), and the number of passes it will take
through the data, called epochs.The network begins to train when you click
Start,and a running indication of the epoch and the error for that epoch is
shown at the lower left of the panel in Figure 10.20. Note that the error is based
on a network that changes as the value is computed. For numeric classes the
error value depends on whether the class is normalized. The network stops when
the specified number of epochs is reached, at which point you can accept the
result or increase the desired number of epochs and press Startagain to con-
tinue training.
MultilayerPerceptronneed not be run through the graphical interface. Several
parameters can be set from the object editor to control its operation. If you are
using the graphical interface they govern the initial network structure, which
you can override interactively. With autoBuildset, hidden layers are added and
connected up. The default is to have the one hidden layer shown in Figure
10.20(a), but without autoBuildthis would not appear and there would be no
connections. The hiddenLayersparameter defines the hidden layers present and
how many nodes each one contains. Figure 10.20(a) is generated by a value of
4 (one hidden layer with four nodes), and although Figure 10.20(b) was created
by adding nodes interactively, it could have been generated by setting hidden-
Layersto 4,5(one hidden layer with four nodes and another with five). The value
is a comma-separated list of integers; 0 gives no hidden layers. Furthermore,

412 CHAPTER 10 | THE EXPLORER

Free download pdf