Appendix

Examples of Learning by Neural Networks

Learning errors by back propagation, competitive learning, and the Boltzmann machines explained in Chapter 10 are the most popular learning algorithms using neural networks. In this Appendix we will show sample programs written in C for each of these algorithms. Each program describes only the basic algorithm. Although an interface that shows the execution process and the input-output data of a program using neural networks for learning is important, we have not included the program for such interfaces here. The following programs can easily be executed on a personal computer running MS-DOS.

The examples of back propagation error learning and competitive learning are for the following problem:

Problem 1 (back propagation error learning and competitive learning)

Construct a neural network that learns how to distinguish the four training patterns shown in Figure A.1.

image

Figure A.1 Four training patterns.

Next, input the eight test patterns shown in Figure A.2 to the resulting neural network and check which test patterns belong to each of the categories of the training patterns.

image

Figure A.2 Eight test patterns.

The results for both programs are

test patterns 5, 6 ⇒ training pattern 1

test patterns 7, 8 ⇒ training pattern 2

test patterns 9, 10 ⇒ training pattern 3

test patterns 11, 12 ⇒ training pattern 4

The example of a Boltzmann machine is for the following problem:

Problem 2 (Boltzmann machine)

Suppose we have the neural network shown in Figure A.3. Construct the neural network that outputs (0, 1), (1, 0) for the input (0, 1), (1, 0), respectively. (This problem is called the 2-1-2 symbolization problem.)

image

Figure A.3 A neural network.

Program A.l (Back propagation error learning)

image

image

image

image

image

Execution Example A.l

image

image

image

Program A.2 (Competitive learning)

image

image

image

image

Execution Example A.2

(The two columns on the right are the numbers of the units that output 1 at the output clusters 1 and 2.)

image

image

Program A.3 (Boltzmann machine)

image

image

image

image

image

image

image

Execution Example A.3

image

How the sum of the errors in the probability of occurence changes for each pattern (the vertical axis shows the learning cycle; the horizontal axis shows the sum of the errors).

image

The weights of a unit and the threshold after learning (the rows show the unit number; the columns show the weight of each link and the input bias value (with thresholds in reverse).

image

The probability of the occurence of the output pattern for each input pattern after learning (the rows show the input pattern number; the columns show the output pattern number; error shows the error from the ideal output result).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.103.204