C++ Neural Networks and Fuzzy Logic: Preface


C++ Neural Networks and Fuzzy Logic



Download 1,14 Mb.
Pdf ko'rish
bet160/443
Sana29.12.2021
Hajmi1,14 Mb.
#77367
1   ...   156   157   158   159   160   161   162   163   ...   443
Bog'liq
C neural networks and fuzzy logic

C++ Neural Networks and Fuzzy Logic

by Valluru B. Rao

MTBooks, IDG Books Worldwide, Inc.



ISBN: 1558515526   Pub Date: 06/01/95

Previous Table of Contents Next



Equations

Output of jth hidden layer neuron:

y

j

 = f( (£



i

 x

i



M

1

[ i ][ j ] ) + ¸j )



(7.1)

Output of jth output layer neuron:

z

j

 = f( (£



i

 y

i



M

2

[ i ][ j ] ) + Ä



j

 )

(7.2)



Ith component of vector of output differences:

desired value − computed value = P

i

 – z


i

Ith component of output error at the output layer:

e

i

 = ( P



i

 − z


i

)

(7.3)



Ith component of output error at the hidden layer:

t

i



 = y

i

 (1 − y



i

 ) (£j M


2

[ i ][ j ] e

j

)

(7.4)



Adjustment for weight between ith neuron in hidden layer and jth output neuron:

”M

2



[ i ][ j ] = ²

o

 y



i

e

j



(7.5)

Adjustment for weight between ith input neuron and jth neuron in hidden layer:

M

1

[ i ][ j ] = ²



h

x

i



t

j

(7.6)



C++ Neural Networks and Fuzzy Logic:Preface

Equations

121



Adjustment to the threshold value or bias for the jth output neuron:

” ¸


j

 = ²


o

 e

j



Adjustment to the threshold value or bias for the jth hidden layer neuron:

´¸

j



 = ²

h

 e



j

For use of momentum parameter ± (more on this parameter in Chapter 13), instead of equations 7.5 and 7.6,

use:

”M

2



[ i ][ j ] ( t ) = ²

o

 y



i

e

j



 + ±”M

2

[ i ][ j ] ( t − 1 )



(7.7)

and


”M

1

[ i ][ j ] ( t ) = ²



h

 x

i



t

j

 + ±”M



1

[ i ][ j ] (t − 1)

(7.8)

C++ Implementation of a Backpropagation Simulator

The backpropagation simulator of this chapter has the following design objectives:



1.  Allow the user to specify the number and size of all layers.

2.  Allow the use of one or more hidden layers.

3.  Be able to save and restore the state of the network.

4.  Run from an arbitrarily large training data set or test data set.

5.  Query the user for key network and simulation parameters.

6.  Display key information at the end of the simulation.

7.  Demonstrate the use of some C++ features.

A Brief Tour of How to Use the Simulator

In order to understand the C++ code, let us have an overview of the functioning of the program.

There are two modes of operation in the simulator. The user is queried first for which mode of operation is

desired. The modes are Training mode and Nontraining mode (Test mode).



Training Mode

Here, the user provides a training file in the current directory called training.dat. This file contains exemplar

pairs, or patterns. Each pattern has a set of inputs followed by a set of outputs. Each value is separated by one

or more spaces. As a convention, you can use a few extra spaces to separate the inputs from the outputs. Here

is an example of a training.dat file that contains two patterns:

     0.4 0.5 0.89           −0.4 −0.8

     0.23 0.8 −0.3          0.6 0.34

C++ Neural Networks and Fuzzy Logic:Preface

C++ Implementation of a Backpropagation Simulator

122



In this example, the first pattern has inputs 0.4, 0.5, and 0.89, with an expected output of –0.4 and –0.8. The

second pattern has inputs of 0.23, 0.8, and –0.3 and outputs of 0.6 and 0.34. Since there are three inputs and

two outputs, the input layer size for the network must be three neurons and the output layer size must be two

neurons. Another file that is used in training is the weights file. Once the simulator reaches the error tolerance

that was specified by the user, or the maximum number of iterations, the simulator saves the state of the

network, by saving all of its weights in a file called weights.dat. This file can then be used subsequently in

another run of the simulator in Nontraining mode. To provide some idea of how the network has done,

information about the total and average error is presented at the end of the simulation. In addition, the output

generated by the network for the last pattern vector is provided in an output file called output.dat.


Download 1,14 Mb.

Do'stlaringiz bilan baham:
1   ...   156   157   158   159   160   161   162   163   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish