C++ Neural Networks and Fuzzy Logic: Preface


Input/Output for percept.cpp



Download 1,14 Mb.
Pdf ko'rish
bet90/443
Sana29.12.2021
Hajmi1,14 Mb.
#77367
1   ...   86   87   88   89   90   91   92   93   ...   443
Bog'liq
C neural networks and fuzzy logic

Input/Output for percept.cpp

There are two data files used in this program. One is for setting up the weights, and the other for setting up the

input vectors. On the command line, you enter the program name followed by the weight file name and the

input file name. For this discussion (also on the accompanying disk for this book) create a file called

weight.dat, which contains the following data:

  2.0 3.0 3.0 2.0

  3.0 0.0 6.0 2.0

These are two weight vectors. Create also an input file called input.dat with the two data vectors below:

  1.95 0.27 0.69 1.25

  0.30 1.05 0.75 0.19

During the execution of the program, you are first prompted for the number of vectors that are used (in this

case, 2), then for a threshold value for the input/weight vectors (use 7.0 in both cases). You will then see the

following output. Note that the user input is in italic.

  percept weight.dat input.dat

THIS PROGRAM IS FOR A PERCEPTRON NETWORK WITH AN INPUT LAYER OF 4

NEURONS, EACH CONNECTED TO THE OUTPUT NEURON.

THIS EXAMPLE TAKES REAL NUMBERS AS INPUT SIGNALS

please enter the number of weights/vectors

2

this is vector # 1



please enter a threshold value, eg 7.0

7.0


weight for neuron 1 is  2           activation is 3.9

weight for neuron 2 is  3           activation is 0.81

C++ Neural Networks and Fuzzy Logic:Preface

Comments on Your C++ Program

71



weight for neuron 3 is  3           activation is 2.07

weight for neuron 4 is  2           activation is 2.5

activation is  9.28

the output neuron activation exceeds the threshold value of 7

 output value is 1

this is vector # 2

please enter a threshold value, eg 7.0

7.0


weight for neuron 1 is  3           activation is 0.9

weight for neuron 2 is  0           activation is 0

weight for neuron 3 is  6           activation is 4.5

weight for neuron 4 is  2           activation is 0.38

activation is  5.78

the output neuron activation is smaller than the threshold value of 7

output value is 0

Finally, try adding a data vector of (1.4, 0.6, 0.35, 0.99) to the data file. Add a weight vector of ( 2, 6, 8, 3) to

the weight file and use a threshold value of 8.25 to see the result. You can use other values to experiment also.


Download 1,14 Mb.

Do'stlaringiz bilan baham:
1   ...   86   87   88   89   90   91   92   93   ...   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