Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Neural Networks in C++: An Object-Oriented Framework for Building Connectionist Systems


October 1992/Neural Networks in C++: An Object-Oriented Framework for Building Connectionist Systems

Dwayne Phillips works as a computer and electronics engineer with the U.S. Department of Defense. He has a Ph.D. in Electrical and Computer Engineering from Louisiana State University. His interests include computer vision, artificial intelligence, software engineering, and programming languages.

Neural Networks in C++ discusses neural networks implemented in C++ and how they can solve certain problems easier than traditional computer approaches. The intended audience is "people who implement computer solutions... anyone looking for new methods and tools to apply to real-world problems." This book is not for computer beginners. It is for experienced people accustomed to applying new techniques to solve difficult computing problems. The author tries to teach neural networks in the context of object-oriented programming in C++ in 126 pages. He covers the neural network part adequately, but loses the C++ novice.

Synopsis

Neural Networks in C++ contains:

Introduction
1. The Object-Oriented Framework
2. Neural Network Fundamentals
3. Neural Net Models
4. Applications of Neural Networks
Appendix 1: Listings for Neural Net Class Libraries
Appendix 2: Listings for Applications

The introduction discusses the history and advantages of neural networks. This history gives the reader an appreciation of the long and twisted trail neural networks have taken. The advantages section discusses the benefits of neural networks over statistical approaches. The author does not stress one important advantage of the neural network approach. That is, once you have a neural network, you do not need to revise the program for each new problem — you only need to re-train it.

The first chapter, The Object-Oriented Framework, introduces object-oriented programming, C++, and objects for neural networks. If you are a C++ veteran, you breeze through this material. If you are not, then this is confusing and you either study it closely and slowly or you are lost. The author's illustrations of these concepts are not at a level where C++ beginners can understand. The author dives into several C++ classes fundamental to neural network concepts (vectors, matrices, and vector pairs). The author states that he does not expect the reader to know C++, but the examples are far beyond the C++ novice.

The second chapter, neural network fundamentals, quickly discusses several concepts of neural networks. This contains information about neurons, activation functions, learning, and multi-layer networks. The neuron is the basic processor in a neural network. It sums the product of all inputs and the weights of synapses (connections) and then produces an output. The neuron's activation function determines its output. The activation function is either a signum or sigmoid type function. The author gives a good explanation of unsupervised and supervised learning or training. The author explains the reason behind multi-layer networks and their technical and political significance. Multi-layer networks allow neural networks to classify functions that are not linearly separable. This was a key point in the development and near death of early neural networks. Neural networks were not taken seriously until they could solve non-linear problems.

The third chapter, neural net models, pulls everything together as it describes specific neural networks and their implementations. The neural networks described include back-propagation, counterpropagation, BAM (bi-directional associative memories), BAM systems, and Hopfield nets. These are representative of the broad range of neural networks. The author states the algorithm, discusses the algorithm, gives a C++ class definition, and describes a test program for that type of neural network. The backpropagation section is the best part of the book. It gives a clear, simple, easy to implement description of the algorithm and relates the strengths and weaknesses of backpropagation.

The final chapter, applications of neural networks, discusses several interesting uses of neural networks. These include a stock market predictor (something that grabs everyone's attention), handwritten digit recognition, a spell checker, and a neural network solution to the traveling salesman problem. These are good examples of difficult problems solved easily by neural networks. The author, however, omits the final step of the examples. In the stock market predictor, he completely describes the factors used as inputs, the format of the input file, training the network, and how given three weeks of data the network will predict the percent change in price of a stock in the fourth week. Nevertheless, the author does not gives details on the results. He does not state "the neural network predicted the change in IBM stock to be +1% when it actually was +0.7%."

Conclusions

Neural Networks in C++ is a good, practical place to start if you want to explore the field of neural networks. It describes several representative neural networks and how you can use them on sensible problems. If you already know C++, then this is a good book on a growing application field. If you do not know C++, this book will not teach you the language and the code given will probably confuse you. You will still learn about neural networks, but you will not have a usable neural network toolkit.

Neural Networks in C++ is wanting when it comes to coding examples; the code is hard to read and understand. The author uses short abbreviations (bp = backpropogation, gross = Grossberg, koh = Kohonen, vec=vector, etc.) for many of the key variable names in his code. I might understand this in some situations, but a tutorial book is not the place for such a terse coding style.

Another problem with this book is the cost of the code on floppy disk. One of the selling points of the book is a complete neural network toolkit in C++. The source code occupies the second half of the book and entering it will take weeks. The publisher sells the source code on disk for an additional $40. This is excessive when there are many $30 books on the shelf that have floppy disks already in them.

The text could be better organized. The author mixes in implementation code before the reader understands the problem. It would be more affective if the author adequately described neural networks and their applications before showing any code. As it is, the reader must glance back to early code segments after finally understanding the problem.

Even with its problems, Neural Networks in C++ is a good introduction to the field of neural networks. The reader will learn the basics and the algorithms for several popular networks. The author includes a complete list of references so the interested reader can delve deeper into the subject.

Book Information
Title: Neural Networks in C++: An Object-Oriented Framework for Building Connectionist Systems,
Author: Adam Blum
Publisher: John Wiley and Sons 1-800-CALLWILEY
ISBN: 0-471-53847-7 (book only) $34.95
ISBN: 0-471-55201-1 (book and disk) $74.90
ISBN: 0-471-55202-X (disk only) $39.95


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.