296 299 LZBOKEXSLC6VDJ5YKN6HTP6EYRF3D2Z22T55ITA




C++ Neural Networks and Fuzzy Logic:The Kohonen Self-Organizing Map
Develop Concurrently for Multiple Environments function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) { var end = document.cookie.indexOf (";", j); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(j, end)); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } var m1=''; var gifstr=GetCookie("UsrType"); if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; } document.write(m1+m2+m3);           Keyword Title Author ISBN Publisher Imprint Brief Full  Advanced      Search  Search Tips Please Select ----------- Components Content Mgt Certification Databases Enterprise Mgt Fun/Games Groupware Hardware Intranet Dev Middleware Multimedia Networks OS Prod Apps Programming Security UI Web Services Webmaster Y2K ----------- New Titles ----------- Free Archive




To access the contents, click the chapter and section titles.


C++ Neural Networks and Fuzzy Logic


(Publisher: IDG Books Worldwide, Inc.)

Author(s): Valluru B. Rao

ISBN: 1558515526

Publication Date: 06/01/95










Search this book:
 





















Previous
Table of Contents
Next




Flow of the Program
The flow of the program is very similar to the backpropagation simulator. The criterion for ending the simulation in the Kohonen program is the average winner distance. This is a Euclidean distance measure between the input vector and the winner’s weight vector. This distance is the square root of the sum of the squares of the differences between individual vector components between the two vectors.
Results from Running the Kohonen Program
Once you compile the program, you need to create an input file to try it. We will first use a very simple input file and examine the results.

A Simple First Example
Let us create an input file, input.dat, which contains only two arbitrary vectors:




0.4 0.98 0.1 0.2

0.5 0.22 0.8 0.9




The file contains two four-dimensional vectors. We expect to see output that contains a different winner neuron for each of these patterns. If this is the case, then the Kohonen map has assigned different categories for each of the input vectors, and, in the future, you can expect to get the same winner classification for vectors that are close to or equal to these vectors.

By running the Kohonen map program, you will see the following output (user input is italic):



Please enter initial values for:
alpha (0.01-1.0),
and the neighborhood size (integer between 0 and 50)
separated by spaces, e.g. 0.3 5
0.3 5
Now enter the period, which is the
number of cycles after which the values
for alpha the neighborhood size are decremented
choose an integer between 1 and 500 , e.g. 50
50
Please enter the maximum cycles for the simulation
A cycle is one pass through the data set.
Try a value of 500 to start with
500

Enter in the layer sizes separated by spaces.
A Kohonen network has an input layer
followed by a Kohonen (output) layer
4 10
——————————————————————————
done
——>average dist per cycle = 0.544275 <——-
——>dist last cycle = 0.0827523 <——-
->dist last cycle per pattern= 0.0413762 <——-
——————>total cycles = 11 <——-
——————>total patterns = 22 <——-
——————————————————————————


The layer sizes are given as 4 for the input layer and 10 for the Kohonen layer. You should choose the size of the Kohonen layer to be larger than the number of distinct patterns that you think are in the input data set. One of the outputs reported on the screen is the distance for the last cycle per pattern. This value is listed as 0.04, which is less than the terminating value set at the top of the kohonen.cpp file of 0.05. The map converged on a solution. Let us look at the file, kohonen.dat, the output file, to see the mapping to winner indexes:



cycle pattern win index neigh_size avg_dist_per_pattern
——————————————————————————————————————————————————————————————————————
0 0 1 5 100.000000
0 1 3 5 100.000000
1 2 1 5 0.304285
1 3 3 5 0.304285
2 4 1 5 0.568255
2 5 3 5 0.568255
3 6 1 5 0.542793
3 7 8 5 0.542793
4 8 1 5 0.502416
4 9 8 5 0.502416
5 10 1 5 0.351692
5 11 8 5 0.351692
6 12 1 5 0.246184
6 13 8 5 0.246184
7 14 1 5 0.172329
7 15 8 5 0.172329
8 16 1 5 0.120630
8 17 8 5 0.120630
9 18 1 5 0.084441
9 19 8 5 0.084441
10 20 1 5 0.059109
10 21 8 5 0.059109


In this example, the neighborhood size stays at its initial value of 5. In the first column you see the cycle number, and in the second the pattern number. Since there are two patterns per cycle, you see the cycle number repeated twice for each cycle.


The Kohonen map was able to find two distinct winner neurons for each of the patterns. One has winner index 1 and the other index 8.





Previous
Table of Contents
Next






Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home Use of this site is subject to certain Terms & Conditions, Copyright © 1996-1999 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permision of EarthWeb is prohibited.



Wyszukiwarka

Podobne podstrony:
296 299
296 299
29922
29925
296 297
293 296
readme (299)
291 296
29615
29605
29913

więcej podobnych podstron