.

Сравнительный анализ нейросетевых реализаций алгоритмов распознавания образов

Язык: русский
Формат: дипломна
Тип документа: Word Doc
0 1305
Скачать документ

IEIENOA?NOAI IAUAAI E I?IOANNEIIAEUeIIAI

IA?ACIAAIEss ?INNEENEIE OAAeA?AOeEE

?INOIANEEE AINOAeA?NOAAIIUE OIEAA?NEOAO

EAOAAe?A AEIOECEEE E AEIEEAA?IAOEEE

AUIONEIAss EAAEEOEEAOeEIIIAss ?AAIOA

ia oaio:N?aaieoaeueiue aiaeec iae?inaoaauo ?aaeecaoeee

aeai?eoiia ?aniiciaaaiey ia?acia.

Nooaeaio E.A.Oaiaeaa

Iao/iue ?oeiaiaeeoaeue A.E.Naia?ei

E CAUEOA AeIIONEATH

Caa. eaoaae?ie
ae.a.i,i?ioanni?

A.I.Aeaaeeie?neee

a.?inoia-ia-Aeiio

1998 a.

IAEAAEAIEA

No?.

Aaaaeaiea
2

Iauaa iienaiea enneaaeoaiuo iae?iiiuo naoae.

Iaeiineieiua naoe. Ia?naio?ii.

Iiiaineieiua naoe.

Naoe Oiioeeaea.

Iienaiea i?ia?aiiiuo iiaeaeae e aeai?eoiia eo iao/aiey.

Iaoiaeeea e ?acoeueoaou yenia?eiaioaeueiuo enneaaeiaaiee.

I?iaeaia ooieoeee ENEETH*ATHUAA EEE.

3.2 Enneaaeiaaiea i?aaenoaaeyaiinoe iaeiineieiie e aeaooneieiie
iae?iiiie naoe.

?aeaenaoeey noeioea.

Aicieeiiaaiea eiaeiiai ia?aca. Au?aaioea i?ioioeia.

Aenoaaeeueiinoue aini?eyoey.

Caeeth/aiea.

Eeoa?aoo?a.

I?eeiaeaiea 1.

I?eeiaeaiea 2.

Aaaaeaiea.

Iniiaiui iacia/aieai nenoaiu ?aniiciaaaiey ia?acia yaeyaony
iouneaiea ?aoaiey i i?eiaaeeaaeiinoe i?aaeuyaeyaiuo ae ia?acia
iaeioi?iio eeanno. Iaeei ec aaaeiuo iiaeoiaeia e caaea/a i?aaeiieaaaao
eniieueciaaiea ?acaeaeythueo ooieoeee. A oneiaeyo, eiaaea iu iaeaaeaai
eeoue iaiiiai/eneaiiuie ai?ei?iuie naaaeaieyie i ?aniiciaaaaiuo ia?acao,
i?e iino?iaiee ?aniiciathuae nenoaiu eo/oa anaai eniieueciaaoue
iao/athuoth i?ioeaaeo?o. Ia ia?aii yoaia auae?athony i?iecaieueiua
?acaeaeythuea ooieoeee e caoai a i?ioeanna auiieiaiey eoa?aoeaiuo oaaia
iao/aiey yoe ?acaeaeythuea ooieoeee aeiaiaeyony aei iioeiaeueiiai eeai
i?eaieaiiai aeaea.

E ii?aaeaeaieth ?acaeaeythueo ooieoeee a ianoiyuaa a?aiy nouanoaoao
ianeieueei iiaeoiaeia. A aeaiiie ?aaioa ?anniao?eaathony aeaa ec ieo,
eioi?ua eiatho niioaaonoaothuea iae?inaoaaua ?aaeecaoeee. Ia?aue ec ieo
– ia?naio?iiiue iiaeoiae.

A ia/aea 60o aiaeia Ieineee, ?icaiaeaoo, Oeiae?io e ae?oaea
?ac?aaioaee naoe, ninoiyuea ec iaeiiai neiy eneonnoaaiiuo iae?iiia.
*anoi iacuaaaiua ia?naio?iiaie, iie auee eniieueciaaiu aeey oe?ieiai
eeanna caaea/, a oii /enea e eneonnoaaiiiai c?aiey. Iaeiaei Ieineee e
Iaeia?o [2] aeieacaee, /oi eniieuecoaiua a oi a?aiy iaeiineieiua naoe
oai?aoe/anee ianiiniaiu ?aoeoue iiiaea i?inoua caaea/e.

Naoe ia?aoiiai ?ani?ino?aiaiey – iaeaieaa oniaoiue, ii-aeaeeiiio,
ec nia?aiaiiuo aeai?eoiia, i?aiaeieaaaao ia?aie/aiey, oeacaiiua Ieineei.
Ia?aoiia ?ani?ino?aiaiea yaeyaony nenoaiaoe/aneei iaoiaeii aeey iao/aiey
iiiaineieiuo naoae.

Aoi?ie iiaeoiae i?e ii?aaeaeaiee ?acaeaeythueo ooieoeee eniieuecoao
iiiyoea iioaioeeaeueiie yia?aee. Oae Oiioeeaeii [7] a caaea/a i
?aeaenaoeee iaeioi?iai ia/aeueiiai ninoiyiey e iaeiiio ec onoie/eauo
ninoiyiee iae?iiiie naoe auei aaaaeaii iiiyoea iioaioeeaeueiie yia?aee,
eioi?ay oiaiueoaeanue a i?ioeanna ?aeaenaoeee. Niioaaonoaothuea
iae?iiiua naoe ecaanoiu a eeoa?aoo?a eae naoe Oiioeeaea. Yoi naoe n
ia?aoiuie naycyie, eioi?ua a nayce n yoei iaeaaeatho iaeioi?uie
naienoaaie, caneoaeeaathueie aieiaiey.

Ia yoaia aaeaeaa?neie ?aaiou oeaeue ninoiyea a nicaeaiee eiiiuethoa?iuo
iiaeaeae oeacaiiuo auoa iae?iiiuo naoae e aiaeeca iaeioi?uo naienoa,
naycaiiuo n eo iao/aieai e ?aniiciaaaieai eie ia?acia.

1.Iauaa iienaiea enneaaeoaiuo iae?iiiuo naoae.

Iaeiineieiua naoe. Ia?naio?ii.

A niioaaonoaee n [3] ia?naio?ii i?aaenoaaeyao niaie iiaeaeue
iao/aaiie ?aniiciathuae nenoaiu. Ii niaea?aeeo iao?eoeo
naaoi/oanoaeoaeueiuo yeaiaioia (S-yeaiaiou), annioeeaoeaiua yeaiaiou
(A-yeaiaiou) e ?aaae?othuea yeaiaiou (R-yeaiaiou). Ii nooe ia?naio?ii
ninoieo ec iaeiiai neiy eneonnoaaiiuo iae?iiia, niaaeeiaiiuo n iiiiuueth
aaniauo eiyooeoeeaioia n iiiaeanoaii aoiaeia.

A 60a aiaeu ia?naio?iiu aucaaee aieueoie eioa?an. ?icaiaeaoo [3]
aeieacae oai?aio ia iao/aiee ia?naio?iia e oai naiui iieacae, /oi
ia?naio?ii niiniaai iao/eoueny anaio, /oi ii niiniaai i?aaenoaaeyoue.
Oeae?io [12-15] aeae ?yae oaaaeeoaeueiuo aeaiiino?aoeee nenoai
ia?naio?iiiiai oeia. Enneaaeiaaiey aiciiaeiinoe yoeo nenoai iieacaee,
/oi ia?naio?iiu ia niiniaiu iao/eoueny ?yaeo i?inouo caaea/. Ieineee [2]
no?iai i?iaiaeece?iaae yoo i?iaeaio e iieacae, /oi eiathony aeanoeea
ia?aie/aiey ia oi, /oi iiaoo auiieiyoue iaeiineieiua ia?naio?iiu, e,
neaaeiaaoaeueii, ia oi, /aio iie iiaoo iao/aoueny.

Iaeei ec naiuo ianneienoe/aneeo ?acoeueoaoia Ieineiai iieacuaaao,
/oi iaeiineieiue ia?naio?ii ia iiaeao aini?iecaanoe oaeoth i?inooth
ooieoeeth eae ENEETH*ATHUAA EEE. Yoi – ooieoeey io aeaoo a?aoiaioia,
eaaeaeue ec eioi?uo iiaeao auoue ioeai eee aaeeieoeae. Iia i?eieiaao
cia/aiea aaeeieoeu, eiaaea iaeei ec a?aoiaioia ?aaai aaeeieoea (ii ia
iaa). Anee i?iaeaio i?aaenoaaeoue n iiiiuueth iaeiineieiie
iaeiiiae?iiiie nenoaiu, oi eaaei aeaeaoue, /oi i?e ethauo cia/aieyo
aania e ii?iaia iaaiciiaeii ?aniieiaeeoue i?yioth eeieth, ?acaeaeythuoth
ieineinoue (i?ino?ainoai ia?acia) oae, /oiau ?aaeeciauaaeanue ooieoeey
ENEETH*ATHUAA EEE. Eiaaony iaoe?iue eeann ooieoeee (ia?yaeo n ooieoeeae
ENEETH*ATHUAA EEE), ia ?aaeecoaiuo iaeiineieiie naoueth. Ia yoeo
ooieoeeyo aiai?yo, /oi iie yaeythony eeiaeii ia?acaeaeeiuie, e iie
iaeeaaeuaatho ii?aaeaeaiiua ia?aie/aiey ia aiciiaeiinoe iaeiineieiuo
naoae. Eeiaeiay ?acaeaeeiinoue ia?aie/eaaao iaeiineieiua naoe caaea/aie
eeanneoeeaoeee, a eioi?uo iiiaeanoaa oi/ae (niioaaonoaothueo aoiaeiui
cia/aieyi) iiaoo auoue ?acaeaeaiu aaiiao?e/anee. A neo/aa aeaoo aoiaeia
?acaeaeeoaeue yaeyaony i?yiie eeieae. A neo/aa o?ao aoiaeia ?acaeaeaiea
inouanoaeyaony ieineinoueth, ?annaeathuae o?aoia?iia i?ino?ainoai. Aeey
/aou?ao eee aieaa aoiaeia aecoaeecaoeey iaaiciiaeia e iaiaoiaeeii
iuneaiii i?aaenoaaeoue n-ia?iia i?ino?ainoai, ?annaeaaiia
‘‘aeia?ieineinoueth’’ – aaiiao?e/aneei iauaeoii, eioi?ue ?annaeaao
i?ino?ainoai /aou?ao eee aieueoaai /enea ecia?aiee. Eae iieacaii a [11],
aa?iyoiinoue oiai, /oi neo/aeii aua?aiiay ooieoeey ieaaeaony eeiaeii
?acaeaeeiie, aanueia iaea. Oae eae eeiaeiay ?acaeaeeiinoue ia?aie/eaaao
aiciiaeiinoe ia?naio?iiiiai i?aaenoaaeaiey, oi iaeiineieiua ia?naio?iiu
ia i?aeoeea ia?aie/aiu i?inouie caaea/aie.

*oiau naoue i?aaenoaaeyea i?aeoe/aneoth oeaiiinoue, ioaeai
nenoaiaoe/aneee iaoiae (aeai?eoi) aeey au/eneaiey cia/aiee aania e
ii?iaia. I?ioeaaeo?o iiaeno?ieee aania iau/ii iacuaatho iao/aieai.
Oeaeue iao/aiey ninoieo a oii, /oiau aeey iaeioi?iai iiiaeanoaa aoiaeia
aeaaaoue aeaeaaiia iiiaeanoai auoiaeia. Aeai?eoi iao/aiey ia?naio?iia
aue i?aaeeiaeai a [3] e eiaao iiiaeanoai iiaeeoeeaoeee. A ianoiyuae
?aaioa ?aaeeciaaiia iiaeaeue iaeiiai ec aa?eaioia.

Iiiaineieiua naoe.

Na?ueaciia ia?aie/aiea i?aaenoaaeyaiinoe iaeiineieiuie naoyie iiaeii
i?aiaeieaoue, aeiaaaea aeiiieieoaeueiua neie. Iiiaineieiua naoe iiaeii
iieo/eoue eaneaaeiui niaaeeiaieai iaeiineieiuo naoae, aaea auoiae
iaeiiai neiy yaeyaony aoiaeii aeey iineaaeothuaai neiy, i?e/ai oaeay
naoue iiaeao i?eaanoe e oaaee/aieth au/eneeoaeueiie iiuiinoe eeoue a oii
neo/aa, anee aeoeaaoeeiiiay ooieoeey iaaeaeo neiyie aoaeao iaeeiaeiie.

Iiiaineieiua naoe niiniaiu auiieiyoue iauea eeanneoeeaoeee, ioaeaeyy oa
oi/ee, eioi?ua niaea?aeaoueny a auioeeuo ia?aie/aiiuo eee iaia?aie/aiiuo
iaeanoyo. Anee ?anniio?aoue i?inooth aeaooneieioth naoue n aeaoiy
iae?iiaie a ia?aii neia, niaaeeiaiiuie n aaeeinoaaiiui iae?iiii ai
aoi?ii neia, oi eaaeaeue iae?ii ia?aiai neiy ?acaeaaao ieineinoue ia
aeaa iieoieineinoe, ia?acoy a i?ino?ainoaa ia?acia V-ia?acioth iaeanoue,
a iae?ii aoi?iai neiy ?aaeecoao ?acee/iua ooieoeee i?e iiaeoiaeyuai
auai?a aania e ii?iaa. Aiaeiae/ii ai aoi?ii neia iiaeao auoue
eniieueciaaii o?e iae?iia n aeaeueiaeoei ?acaeaieai ieineinoe e
nicaeaieai iaeanoe o?aoaieueiie oi?iu. Aeeth/aieai aeinoaoi/iiai /enea
iae?iiia ai aoiaeiie neie iiaeao auoue ia?aciaai auioeeue iiiaioaieueiee
ethaie aeaeaaiie oi?iu. Oi/ee, ia ninoaaeythuea auioeeie iaeanoe, ia
iiaoo auoue ioaeaeaiu i ae?oaeo oi/ae ieineinoe aeaooneieiie naoueth.

O?aoneieiay naoue yaeyaony aieaa iauae. Aa eeanneoeoee?othuea
aiciiaeiinoe ia?aie/aiu eeoue /eneii eneonnoaaiiuo iae?iiia e aania.
Ia?aie/aiey ia auioeeinoue ionoonoaotho. Oaia?ue iae?ii o?aoueaai neiy
i?eieiaao a ea/anoaa aoiaea iaai? auioeeuo iiiaioaieueieeia, e eo
eiae/aneay eiiaeiaoeey iiaeao auoue iaauioeeie. I?e aeiaaaeaiee iae?iiia
e aania /enei noi?ii iiiaioaieueieea iiaeao iaia?aie/aiii aic?anoaoue.
Yoi iicaieyao aii?ieneie?iaaoue iaeanoue ethaie oi?iu n ethaie
oi/iinoueth. A aeiaaaie ia ana auoiaeiua iaeanoe aoi?iai neiy aeieaeiu
ia?anaeaoueny. Aiciiaeii, neaaeiaaoaeueii, iauaaeeiyoue ?acee/iua
iaeanoe, auioeeua e iaauioeeua, auaeaaay ia auoiaea aaeeieoeo anyeee
?ac, eiaaea aoiaeiie aaeoi? i?eiaaeeaaeeo iaeiie ec ieo.

Aeey iao/aiey eneonnoaaiiuo iae?iiiuo naoae oe?iei i?eiaiyaony
i?ioeaaeo?a ia?aoiiai ?ani?ino?aiaiey. Ia?aoiia ?ani?ino?aiaiea auei
iacaaeneii i?aaeeiaeaii a o?ao ?acee/iuo ?aaioao [8, 9, 10]. A ?aaioa
i?ia?aiiii ?aaeeciaaiia aeaooneieiay naoue ia?aoiiai ?ani?ino?aiaiey.

1.3 Naoe Oiioeeaea.

Naoe, ?anniio?aiiua auoa, ia eiaee ia?aoiuo naycae, o.a. naycae, eaeoueo
io auoiaeia naoe e eo aoiaeai. Ionoonoaea ia?aoiuo naycae aa?aioe?oao
aaconeiaioth onoie/eainoue naoae. Oae eae naoe n ia?aoiuie naycyie
eiatho iooe io auoiaeia e aoiaeai, oi ioeeee oaeeo naoae yaeyaony
aeeiaie/aneei, o.a. iinea i?eeiaeaiey iiaiai aoiaea au/eneyaony auoiae
e, ia?aaeaaaynue ii naoe ia?aoiie nayce, iiaeeoeoee?oao aoiae. Caoai
auoiae iiaoi?ii au/eneyaony e i?ioeann iiaoi?yaony niiaa e niiaa. Aeey
onoie/eaie naoe iineaaeiaaoaeueiua eoa?aoeee i?eaiaeyo e ana iaiueoei
eciaiaieyi auoiaea, iiea a eiioea eiioeia auoiae ia noaiiaeony
iinoiyiiui. Aeey iiiaeo naoae i?ioeann ieeiaaea ia caeai/eaaaony, oaeea
naoe iacuaathony iaonoie/eauie. I?iaeaia onoie/eainoe noaaeea a ooiee
ia?auo enneaaeiaaoaeae. Ieeoi ia aue a ninoiyiee i?aaeneacaoue, eaeea ec
naoae aoaeoo onoie/eauie, a eaeea aoaeoo iaoiaeeony a iinoiyiiii
eciaiaiee. E n/anoueth, a ?aaioa [5] auea iieo/aia oai?aia, iienaaoay
iiaeiiiaeanoai naoae n ia?aoiuie naycyie, auoiaeu eioi?uo a eiioea
eiioeia aeinoeaatho onoie/eaiai ninoiyiey. Yoi caia/aoaeueiia
aeinoeaeaiea ioe?uei aei?iao aeaeueiaeoei enneaaeiaaieyi.

Aeae. Oiioeeae naeaeae aaaeiue aeeaae eae a oai?eth, oae e a i?eiaiaiea
nenoai n ia?aoiuie naycyie. A aai ?aaioa [7] i?e eieoaoeee iiaaaeaiey
ainaiaey iae?iiia eniieueciaaeenue ia?aiaiiua, iienuaathuea ninoiyiey
iae?iiia (aaeoi? ninoiyiey (), e ia?aiaiiua, iienuaathuea nayce iaaeaeo
iae?iiaie (iia?aoi? iaiyoe W),a oaeaea aeaa o?aaiaiey , ii?aaeaeythuea
eciaiaiea ( ni a?aiaiai. Iaeii ec yoeo o?aaiaiee i?aaenoaaeyao eciaiaiea
( iiae aeaenoaeai iia?aoi?a W (au?aaioea ?aaeoeee ia noeioe), a aoi?ia –
eciaiaiea iao?eoeu W, eaaae?aoe/iia ii ( (caiiieiaiea).I?e yoii aaeoi?
ninoiyiey ainaiaey iae?iiia i?aaenoaaeyao niaie aaeoi? a oaciaii
i?ino?ainoaa aeeiaie/aneie nenoaiu , a ‘‘iaiyoue’’ ?aaeeciaaia eae
nenoaia aoo?aeoi?ia. Caiiieiaiea iiaie eioi?iaoeee inouanoaeyaony iooai
oneiaeiaiey ii ii?aaeaeaiiiio aeai?eoio no?oeoo?u aoo?aeoi?ia. Oaeie
iiaeoiae aeiioneaao i?inooth iaoaie/aneoth aiaeiaeth, anee i?aaenoaaeoue
naaa aaeoi? ninoiyiey eae iieiaeaiea /anoeoeu, aeaeaeouaeny iiae
aeaenoaeai neeu oyaeanoe e o?aiey ii iaeioi?iio ?aeueaoo. I?e neaouaaiee
n ‘‘ai?u’’ a iaeio ec ‘‘iecei’’ iioaioeeaeueiay yia?aey nenoaiu
oiaiueoaaony, e a eiioea eiioeia iaoa?eaeueiay oi/ea inoaiaaeeaaaony
ec-ca o?aiey. Iieiaeaiea /anoeoeu a eiia/iii ninoiyiee (o.a. oa ec
iecei, a eioi?ie iia inoaiaaeeaaaony) caaeneo eae io oi?iu ?aeueaoa,
oae e io ia/aeueiiai ninoiyiey, n eioi?iai ia/aeinue neaouaaiea.
Ooieoeeiie?iaaiea naoe eaaei aecoaeece?oaony aaiiao?e/anee. A neo/aa
aeaoo aeia?iuo iae?iiia a auoiaeiii neia eaaeaeie aa?oeia eaaae?aoa
niioaaonoaoao iaeii ec /aou?ao ninoiyiee nenoaiu (00,01,10,11). A neo/aa
o?aoiae?iiiie nenoaiu i?ino?ainoai ia?acia i?aaenoaaeaii eoaii (a
o?aoia?iii i?ino?ainoaa), eiathuei 8 aa?oei, eaaeaeay ec eioi?uo
iiia/aia o?aoaeoiaui aeia?iui /eneii. A iauai neo/aa nenoaia n n
iae?iiaie eiaao 2n ?acee/iuo niniyiee e i?aaenoaaeyaony n – ia?iui
aeia?eoaii. Eiaaea iiaeaaony iiaue aoiaeiie aaeoi?, naoue ia?aoiaeeo ec
aa?oeiu a aa?oeio, iiea ia noaaeeece?oaony. Onoie/eaay aa?oeia
ii?aaeaeyaony naoaauie aanaie, oaeoueie aoiaeaie e aaee/eiie ii?iaa.
Anee aoiaeiie aaeoi? /anoe/ii iai?aaeeai eee iaiieii, oi naoue
noaaeeece?oaony e aa?oeia, aeeaeaeoae e aeaeaaiie.

A aeaiiie ?aaioa i?aaenoaaeaia i?ia?aiiiay ?aaeecaoeey naoe Oiioeeaea e
i?ieeethno?e?aaaiu ?yae aa naienoa.

2. Iienaiea i?ia?aiiiuo iiaeaeae e aeai?eoiia eo iao/aiey.

A ?aaioa iiaeaee?oaony ia?naio?ii n iineaaeiaaoaeueiuie
naycyie, eioi?ue i?aaenoaaeyao niaie ia?aaeathuoth naoue ninoiyuoth ec
aaia?aoi?ia neaiaea o?ao oeiia: naini?iuo yeaiaioia, annioeeaoeaiuo
yeaiaioia e ?aaae?othueo yeaiaioia. A ea/anoaa naini?iuo yeaiaioia
eniieuecothony y/aeee ecia?eoaeueiie nao/aoee. Nao/aoea ninoieo ec 35
yeaiaioia. S-yeaiaio auaeaao auoiaeiie neaiae Si=+1,anee
niioaaonoaothuay aio y/aeea nao/aoee cae?aoaia; Si=-1 a i?ioeaiii
neo/aa. Eaaeaeue S-yeaiaio naycai n niioaaonoaothuei A-yeaiaioii e
auoiaeiie neaiae A-yeaiaioa ?aaai auoiaeiiio neaiaeo S-yeaiaioa.
Oiiieiae/aneay no?oeoo?a ia?naio?iia n aeaoiy R-yeaiaioaie oaeiaa, /oi
eaaeaeue A-yeaiaio naycai ni anaie yeaiaioaie. Yoe nayce iaeaaeatho
aaniauie eiyooeoeeaioaie, eioi?ua iiaeeoeoee?othony iaoiaeii ei??aeoeee
ioeaie. Oaeay oiiieiae/aneay no?oeoo?a oaeiaia n oi/ee c?aiey aa
i?ia?aiiiie ?aaeecaoeee. Auoiae naoe i?aaenoaaeai aeaoiy R-yeaiaioaie,
oi oeaeaaua aaeoi?a eiatho aeae (-1,+1) e (1,-1) a caaeneiinoe io
i?aaeuyaeyaiie iao/athuae ia?u.

Iao/aiea ia?naio?iia i?ienoiaeeo ii neaaeothuae noaia:

Ana aana ?aiaeiiece?othony a aaee/eiu ec aeeaiaciia(-0.5,+0.5).

Ia aoiae naoe iiaeaaony iao/athuee aaeoi? e au/eneyaony auoiae eaaeaeiai
iae?iia eae aeaaa?ae/aneay noiia aai acaaoaiiuo aoiaeia .

A iiaeaee eniieueciaai iaoiae iao/aiey Oeae?io – Oiooa [15], aaea
eniieuecoaony iai?a?uaiue neaiae, /oiau au/eneeoue ioeaeo aeey eaaeaeiai
iae?iia, oi anoue au/eoaaony auoiaeiie neaiae, eae aeaaa?ae/aneay noiia
aai acaaoaiiuo aoiaeia, ec o?aaoaiiai auoiaea.

4.Ei??aeoe?oaony aana naoe oae, /oiau ieieiece?iaaoue ioeaeo. (ni.
I?eeiaeaiea 2. I?ia?aiia, iiaeaee?othuay iaeiineieioth naoue. )

5.Iiaoi?ythony oaae ni aoi?iai ii /aoaa?oue aei oao ii? iiea iauay
ioeaea naoe ia noaiao iaiueoa aeiionoeiie, caaeaiiie a aeaiiie iiaeaee.
Aaee/eia aeiionoeiie ioeaee eciaiyaony a oeaeyo yenia?eiaioa.

Aeaeaa ?aaioa iiaeaee?iaaeanue aeaooneieiay naoue ia?aoiiai
?ani?ino?aiaiey. Aeey iiaen/aoa eiee/anoaa neiaa eniieueciaaiu
neaaeothuea niia?aaeaiey: neie ninoieo ec iiiaeanoaa aania ni
neaaeothueie ca ieie iae?iiaie, noiie?othueie acaaoaiiua neaiaeu. Ia?aue
neie ninoieo ec aeaaaeoeaoe iae?iiia, aoi?ie (auoiaeiie) – ec aeaoo
iae?iiia.

A ea/anoaa aeoeaaoeeiiiie ooieoeee iae?iiia ia?aiai e aoi?iai neiy
eniieueciaaia neaiieaeaeueiay ooieoeey. Oae eae iiiaineieiua iae?iiiua
naoe iaeaaeatho aieueoae i?aaenoaaeythuae iiuiinoueth, /ai iaeiineieiua,
oieueei a neo/aa i?enoonoaey iaeeiaeiinoe, oi neaiieae iaania/eaaao yoi
o?aaiaaiea. Aeaiiay ooieoeey anthaeo aeeooa?aioee?oaia, /oi
eniieuecoaony a aeai?eoia ia?aoiiai ?ani?ino?aiaiey. Aa aeiiieieoaeueiua
i?aeiouanoai ninoieo a aaoiiaoe/aneii eiio?iea oneeaiey. Aeey neaauo
neaiaeia e?eaay aoiae – auoiae eiaao neeueiue iaeeii, aeathuee aieueoia
oneeaiea, a eiaaea aaee/eia neaiaea noaiiaeony aieueoa, oneeaiea
iaaeaao. Oaeei ia?acii aieueoea neaiaeu aini?eieiathony naoueth aac
ianuuaiey, a neaaua neaiaeu i?ioiaeyo ii naoe aac /?acia?iiai
ineaaeaiey.

Iao/aiea naoe ia?aoiiai ?ani?ino?aiaiey a iiaeaee i?ienoiaeeei ii
neaaeothuae noaia:

Anai aanai i?enaiaiu ia/aeueiua cia/aiey, aua?aiiua neo/aeiui ia?acii
ec aeeaiaciia (-0.5,+0.5) .

Auae?aaony i/a?aaeiay iao/athuay ia?a ec iao/athuaai iiiaeanoaa e
iiaeaaony aoiaeiie aaeoi? ia aoiae naoe.

I?ioiae aia?aae . Au/eneyaony auoiae naoe. Au/eneaiey auiieiythony
iineieii. Nia/aea au/eneythony auoiaeu ia?aiai iae?iiiiai neiy, caoai
iie eniieuecothony a ea/anoaa aoiaeia aoi?iai neiy; au/eneythony auoiaeu
iae?iiia aoi?iai neiy, eioi?ua e ia?acotho auoiaeiie aaeoi? naoe.

Au/eneyaony ?aciinoue iaaeaeo auoiaeii naoe e o?aaoaiui auoiaeii
(oeaeaaui aaeoi?ii iao/athuae ia?u), oi anoue eaaeaeue ec auoiaeia naoe
au/eoaaony ec niioaaonoaothuae eiiiiiaiou oeaeaaiai aaeoi?a, /oiau
iieo/eoue ioeaeo.

Ia?aoiue i?ioiae . Ei??aeoe?oaony aana naoe oae, /oiau ieieiece?iaaoue
ioeaeo. Oae eae aeey eaaeaeiai iae?iia auoiaeiiai neiy caaeaii oeaeaaia
cia/aiea, oi ioeaea iaoiaeeony n eniieueciaaieai iiaeeoeoee?iaaiiiai
aeaeueoa-i?aaeea aeey ia?naio?iia. Auoiaeu iae?iiia ne?uoiai neiy ia
eiatho oeaeaauo cia/aiee aeey n?aaiaiey, oi aeey iienea ioeaee (e
ei??aeoeee aania) aeaeaaony ?yae oaaia, ninoaaeythuea aeai?eoiu
iiaeno?ieee aania auoiaeiiai e ne?uoiai neiaa (ni. I?eeiaeaiea 2.
I?ia?aiia, iiaeaee?othuay naoue ia?aoiiai ?ani?ino?aiaiey ).

Iiaoi?ythony oaae ni aoi?iai ii iyoue aeey eaaeaeiai aaeoi?a
iao/athuaai iiiaeanoaa aei oao ii?, iiea ioeaea ia anai iiiaeanoaa ia
aeinoeaiao i?eaieaiiai o?iaiy. Aaee/eia i?aaeaeueiie ioeaee eciaiyaony a
oeaeyo yenia?eiaioa.

A iiaeaee naoe eniieuecoaony iaoiae onei?aiey iao/aiey aeey
aeai?eoia ia?aoiiai ?ani?ino?aiaiey, i?aaeeiaeaiiue a [9],
oaaee/eaathuee oaeaea onoie/eainoue i?ioeanna. Yoio iaoiae, iacaaiiue
eiioeuenii, caeeth/aaony a aeiaaaeaiee e ei??aeoeee aana /eaia,
i?iii?oeeiiaeueiiai aaee/eia i?aaeuaeouaai eciaiaiey aana. Eiyooeoeeaio
eiioeuena aua?ai ?aaiui 0.5.

A aeieacaoaeuenoaa aeai?eoiia iao/aiey ia?naio?iia [3] e
i?ioeaaeo?u ia?aoiiai ?ani?ino?aiaiey [9] ie/aai ia aiai?eony i oii,
neieueei oaaia o?aaoaony aeey iao/aiey naoe. A aeaiiie ?aaioa aeey
eiio?iey inoaiiaee i?ioeanna iao/aiey yoeo naoae aaaaeaia aaee/eia
aeiionoeiie ioeaee naoe, eioi?ay eciaiyaony a yenia?eiaioao n iiaeaeyie,
/oiau ii?aaeaeeoue oneiaea ?acaeaeeiinoe aeey eiie?aoiiai iao/athuaai
iiiaeanoaa.

Aeey enneaaeiaaiey naoe n ia?aoiuie naycyie a ?aaioa iiaeaee?oaony
i?aaeeiaeaiiue Oiioeeaeii a [7] ?aeo??aioiue aeai?eoi aiaeeca aeeiaieee
ainaiaey iae?iiia.

Ninoiyiea naoe iienuaaaony iiiaeanoaii oaeoueo cia/aiee neaiaeia io anao
iae?iiia. Ia eaaeaeii oaaa aeai?eoia iaiyaony ninoiyiea eeoue iaeiiai
iae?iia. Iiia? iae?iia auae?aaony neo/aeiui ia?acii. Ii noiie?oao n
aanaie Wij neaiaeu, iinooiathuea io auoiaeia iae?iiia naoe ii
ia?aoiui naycyi e eciaiyao naia ninoiyiea a niioaaonoaee ni cia/aieai
ii?iaiaie ooieoeee. Ninoiyiea aea inoaeueiuo iae?iiia niaiaaeaao n
ninoiyieai ia i?aaeuaeouai oaaa. Ii?iae aicaoaeaeaiey iae?iiia aua?aiu
?aaiuie ioeth. Ninoiyiea aeoeaiiai iae?iia ia oaeouai oaaa aeai?eoia
?aaii 1, iaaeoeaiiai – -1. Aeai?eoi eniieuecoao iiaeaeue iao/aiey,
i?aaeeiaeaiioth Oyaaii [6] (ni. I?eeiaeaiea 2. I?ia?aiia, iiaeaee?othuay
naoue Oiioeeaea.). Yoi – iiaeaeue iao/aiey aac o/eoaey, a eioi?ie aan
aic?anoaao, anee aeoeae?iaaiu iaa iae?iia, enoi/iee e i?eaiiee. Oaeei
ia?acii, /anoi eniieuecoaiua iooe a naoe oneeeaathony, /oi iauyniyao
oaiiiai iao/aiey naoe.

A i?ioeanna ?aeaenaoeee e iaeiiio ec onoie/eauo ninoiyiee, naoe n
ia?aoiuie naycyie eeethno?e?otho ?yae naienoa, eioi?ua iiaoo auoue
eioa?i?aoe?iaaiu eae ?aeaenaoeey noeioea, au?aaioea i?ioioeia,
aenoaaeeueiinoue aini?eyoey , eioi?ua iieacaiu a aeaiiie ?aaioa ia
?aaeeciaaiiie iiaeaee.

Ana i?ia?aiiu nicaeaiu a DELPHI e ?aaioatho a iia?aoeeiiiie n?aaea
Windows.

3. Iaoiaeeea e ?acoeueoaou yenia?eiaioaeueiuo enneaaeiaaiee.

I?iaeaia ooieoeee ENEETH*ATHUAA EEE.

Eae auei neacaii, iaeei ec naiuo ianneienoe/aneeo ?acoeueoaoia
Ieineiai iieacuaaao, /oi iaeiineieiue ia?naio?ii ia iiaeao aini?iecaanoe
oaeoth i?inooth ooieoeeth eae ENEETH*ATHUAA EEE.

Aeey oiai, /oiau i?ieeethno?e?iaaoue yoo i?iaeaio, ia?naio?iio
i?aaeinoaaeyee /aou?a iao/athueo ia?u. E iaeiiio eeanno ia?acia
ioiineee, iiaeaaaaiia ia ecia?eoaeueioth nao/aoeo 5o7, oaoiaoiia iiea e
oaeia aea iiea, ii n eiaa?oe?oaiui oeaaoii. E ae?oaiio eeanno –
aoeaaiiua neiaieu E e F (ni. ?en.1 I?eeiaeaiea 1.). A ?acoeueoaoa
?aniiciaaaiey ia?naio?ii eeanneoeoee?iaae ia?aue ec oeacaiiuo ia?acia
eae ioiinyueeny e ia?aiio eeanno, a aoi?ie, o?aoee e /aoaa?oue – ei
aoi?iio. O. a. ia?naio?ii ioeany ia aoi?ii ia?aca.

Yoe aea iao/athuea ia?u i?aaeinoaaeee aeey iao/aiey e ?aniiciaaaiey
iiaeaee aeaooneieiie naoe. A ?acoeueoaoa naoue ana ia?acu
eeanneoeoee?iaaea i?aaeeueii. Yoe ?acoeueoaou niaeanothony n oai?eae
i?aaenoaaeyaiinoe ia?naio?iia e aeaooneieiuo naoae.

Enneaaeiaaiea i?aaenoaaeyaiinoe iaeiineieiie e aeaooneieiie iae?iiiie
naoe.

Enneaaeiaaiea i?aaenoaaeyaiinoe iaeiineieiie e aeaooneieiie
iae?iiiuo naoae i?iecaiaeeeenue ia niioaaonoaothueo iiaeaeyo.

?acoeueoaou yenia?eiaioa n iiaeaeueth ia?naio?iia iieacaee, /oi
ia?naio?ii niiniaai iiaeaee?iaaoue ooieoeeth, ?acaeaeythuoth
ecia?aaeaiey oeeo? 1, 2, 3, 4, 5, 6, 7, 8 e 9, iiaeaaaaiuo ia nao/aoeo,
ia aeaa eeanna – /aoiua e ia/aoiua (ni. ?en. 2. I?eeiaeaiea 1.).
Aaee/eia aeiionoeiie ioeaee naoe auea ?aaia 0.001.

Neaaeothuee yenia?eiaio aue iinoaaeai aeey auyniaiey niiniaiinoe
ia?naio?iia e aeaooneieiie naoe ia?aoiiai ?ani?ino?aiaiey
eeanneoeoee?iaaoue aoeaaiii-oeeo?iaua ecia?aaeaiey (aeanyoue oeeo? e
aeaaaeoeaoue oanoue aoea eaoeineiai aeoaaeoa) ia aeaa eeanna – oeeo?u e
aoeau (ni. ?en. 3. I?eeiaeaiea 1.). I?e o?iaia aeiionoeiie ioeaee 0.001
ia?naio?ii iooae eeannaie oeeo?u 1, 3, 7 e aoeao A. Naoue ia?aoiiai
?ani?ino?aiaiey i?e oii aea o?iaia aeiionoeiie ioeaee 0.001 iooaea
eeannaie oeeo?u 3, 4, 5 e aoeau S, I. Aeaeaa aaee/eia ioeaee
oiaiueoaeanue ia ii?yaeie. Ia?naio?ii iooae eeann oeeo?u 1, naoue
ia?aoiiai ?ani?ino?aiaiey – eeannaie oeeo?o 3 e aoeau S, I. I?e o?iaia
aeiionoeiie ioeaee 0.00001 ia?naio?ii iooae eeannaie oeeo?o 1 . Naoue
ia?aoiiai ?ani?ino?aiaiey i?e oii aea o?iaia aeiionoeiie ioeaee 0.00001
iooaea eeann aoeau S. I?e o?iaia aeiionoeiie ioeaee 0.000001 e
ia?naio?ii, e naoue ia?aoiiai ?ani?ino?aiaiey ioeaie a eeanneoeeaoeee
ia aeiioneaee.

?aeaenaoeey noeioea.

Eae aiai?eeinue ninoiyiea naoe Oiioeeaea iienuaaaony iiiaeanoaii oaeoueo
cia/aiee neaiaeia io anao iae?iiia, i?e/ai ia eaaeaeii oaaa aeai?eoia
iaiyaony ninoiyiea eeoue iaeiiai iae?iia, iiia? eioi?iai auae?aaony
neo/aeiui ia?acii. Ii noiie?oao n aanaie Wij neaiaeu, iinooiathuea io
auoiaeia iae?iiia naoe ii ia?aoiui naycyi e eciaiyao naia ninoiyiea a
niioaaonoaee ni cia/aieai ii?iaiaie ooieoeee. I?eia?
iineaaeiaaoaeueiinoe ninoiyiee, eioi?ua i?ioiaeeo nenoaia iae?iiia i?e
?aniiciaaaiee ia?acia a iiaeaee Oiioeeaea, i?eaaaeai ia ?en. 4.
I?eeiaeaiea 1, aaea iieacaiu i?iiaaeooi/iua ninoiyiey. Eaaay ea?oeiea
i?aaenoaaeyao niaie enoiaeiue noeioe, a e?aeiyy i?aaay – ia?ac,
caienaiiue a iaiyoe nenoaiu. I?e oaeie ?aeaenaoeee yia?aey nenoaiu
oiaiueoaaony, aeinoeaay n oa/aieai a?aiaie iaeiiai ec eieaeueiuo
ieieioiia.

Aicieeiiaaiea eiaeiiai ia?aca. Au?aaioea i?ioioeia.

Onoie/eauie ninoiyieyie naoe Oiioeeaea iiaoo auoue oaeaea ia?acu, ia
caienaiiua aa iaiyoue – eiaeiua ia?acu. Ia ?en. 5. I?eeiaeaiea 1.
iieacai i?eia? onoie/eaiai eiaeiiai ia?aca ((), aicieeathuee i?e
?aniiciaaaiee noeioeia naoueth, a iao?eoea naycae eioi?ie caienaiu
ia?acu a, b, c.

I?e oaaee/aiee /enea ia?acia, caienuaaaiuo a iaiyoue nenoaiu,
ioaa/athuea ei ieieioiu yia?aee iiaoo neeaaoueny. Ia ?en. 6. I?eeiaeaiea
1. iieacaia a?oiia ia?acia (iieo/athueony i?e iaaieueoeo eneaaeaieyo),
caienaiiua a iaiyoue naoe – a, b, c. I?e i?aaeuyaeaiee naoe yoeo ia?acia
aeey ?aniiciaaaiey, naoue i?eoiaeeo e ninoiyieth, niioaaonoaothuaai
au?aaioaiiiio i?ioioeio – d.

Iiaeaeue aeaiiino?e?oao i?ioeaaeo?o ?aciao/aiey, i?aaeiacia/aiioth aeey
ono?aiaiey ec iaiyoe eiaeiuo ia?acia. ?aciao/aiea ninoieo a
i?aaeuyaeaiee naoe ia?aca, e eioi?iio ?aeaene?iaae noeioe. I?e yoii ec
iao?eoeu nayce au/eoaaony oio /eai, eioi?ue i?e iao/aiee au i?eaaaeyeny.
A i?eiaiaiee e neo/ath i?ioioeia n o?aiy caienaiiuie a iaiyoe ia?acaie
(ni. ?en. 6. I?eeiaeaiea 1.), ?aciao/aiea i?eaiaeeo e en/aciiaaieth
i?ioioeia e e iiyaeaieth aianoi iaeiie iioaioeeaeueiie yiu,
niioaaonoaothuae i?ioioeio, o?ao iioaioeeaeueiuo yi, niioaaonoaothueo
eaaeaeiio ia?aco, caienaiiiio a iaiyoe naoe.

Aenoaaeeueiinoue aini?eyoey.

Yenia?eiaiou n iiaeaeueth naoe Oiioeeaea iieacaee (ni. ?en. 7.
I?eeiaeaiea 1.), /oi n?aaeiea noeioeu iineaaeiaaoaeueiinoe iiaoo
aini?eieiaoueny eeai eae eneaaeaiiue eaaue, eeai eae eneaaeaiiue i?aaue
ia?acu, o. a. eiaao ianoi aenoaaeeueiinoue aini?eyoey. Niaia onoie/eaiai
ninoiyiey i?ienoiaeeo iinea i?aaeuyaeaiey /aoaa?oie ea?oeiee.

TOC \o “1-3”

Caeeth/aiea.

A ?aaioa nicaeaiu i?ia?aiiiua iiaeaee o?ao iae?iiiuo naoae: ia?naio?ii,
naoue ia?aoiiai ?ani?in?aiaiey e naoue Oiioeeaea. Iiaeaee iicaieytho
i?ieeethno?e?iaaue iniiaiua aeinoieinoaa e iaaeinoaoee, a oaeaea ?yae
niaoeeoe/aneeo naienoa ?aaeeciaaiiuo iiaeaeae.

Ai anao iiaeaeyo aeey i?eeiaeaiey aiaoiaai noeioea eniieueciaaeanue,
niaoeeaeueii ?ac?aaioaiiay i?ia?aiiii, ecia?eoaeueiay nao/aoea.

?acoeueoaou na?ee yenia?eiaioia, i?iaaaeaiiuo ia iiaeaeyo,
iieacaee, /oi:

Niiniaiinoue ia?naio?iia e naoe ia?aoiiai ?ani?ino?aiaiey iiaeaee?iaaoue
ii?aaeaeaiioth ooieoeeth caaeneo io aeiionoeiie iauae ioeaee naoe.

Oiiieiae/aneay no?oeoo?a naoe Oiioeeaea iaoneaaeeaaao aa naienoaa,
eioi?ua iiaeii eioa?i?eoe?iaaoue eae ?aeaenaoeey noeioea, au?aaioea
i?ioioeia, aenoaaeeueiinoue aini?eyoey.

A aeaeueiaeoai ieaie?oaony ?ac?aaioea i?ia?aiiiuo iiaeaeae aieaa
neiaeiuo iae?iiiuo naoae e eo eiiaeiaoeee n oeaeueth iieo/aiey iaeaieaa
yooaeoeaiuo aeai?eoiia aeey caaea/e ?aniiciaaaiey ia?acia.

Eeoa?ao?a.

1.Ai?aaiue A.I.,?inneaa Ae.A..Iae?iiiua naoe ia ia?niiaeueiii
eiiiuetha?a.

2. Ieineee I.E.,Iaeia?o N..Ia?nai?iiu.I.: Ie?.1971

3. ?icaiaeaoo O.I?eioeeiu iae?iaeeiaieee.I.: Ie?.1965

4. Oinna?iai O.Iae?ieiiiuethoa?iay oaoieea.I.:
Ie?.1992.237N

Cohen M.A.,Grossberg S.G.Absoiute stability of global pattern formation
and parallel memory storage by compatitive neural networks.1983

Hebb D.O.Organization of behavior.New York:Science Edition

Hopfield J.J.Neural networks and physical systems with emergent
collective computational abilities. Proseedings of the National Academy
of Science 79.1982

Parker D.B. Learning-logic. Invention Report. 1982

Rumelhart D.E. Hinton G.E.,Williams R.J. Learning internal
representations by error propagation. In Parallel distributed
processing, vol.1986

Werbos P.G. Beyond regression: New tools for prediction and analysis in
the behavioral sciences. 1974

Wider R.O. Single-stage logic, Paper presented at the AIEE Fall General
Meeting. 1960

Windrow B. The speed of adaptetion in adaptive control system. 1961

Windrow B. A statistical theory of adaptetion. Adaptive control systems.
1963

Windrow B., Angell J.B. Reliable, trainable networks for computing and
control. 1962

Windrow B., Hoff N.E. Adaptive switching circuits. 1960

I?eeiaeaiea 1.

?en. 1.

?en. 2.

?en. 3.

?en. 3.

?en. 4.

?en. 5.

?en. 6.

?en. 7.

I?eeiaeaiea 2.

I?ia?aiia, iiaeaee?othuay iaeiineieioth naoue.

unit UPerc;

interface

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,

Percept_Field, StdCtrls, Buttons, ExtCtrls;

const InputLayerUnits=35;

OutputLayerUnits=2;

eta=0.05;

epsilon=0.000001;

numberpatterns=36;

type

TFrmPerceptron = class(TForm)

Percept_FieldPerc: TPercept_Field;

GroupBoxTrain: TGroupBox;

GroupBoxInit: TGroupBox;

ComboBoxABC: TComboBox;

ComboBoxDigits: TComboBox;

BtnNext: TButton;

BitBtnClose: TBitBtn;

EditNumPat: TEdit;

LabelNumPat: TLabel;

GroupBoxRec: TGroupBox;

LabelInput: TLabel;

BtnOutput: TButton;

LabelOdd: TLabel;

RadioGroupTarget: TRadioGroup;

RadioButtonOdd: TRadioButton;

RadioButtonEven: TRadioButton;

LabelOr: TLabel;

LabelEven: TLabel;

procedure ComboBoxABCChange(Sender: TObject);

procedure ComboBoxDigitsChange(Sender: TObject);

procedure Percept_FieldPercMouseDown(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

procedure BitBtnCloseClick(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure BtnNextClick(Sender: TObject);

procedure BtnOutputClick(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

FrmPerceptron: TFrmPerceptron;

var

w:array[1..OutputLayerUnits,1..InputLayerUnits] of real;

indexBtnNextClick:byte;

activation:array[1..OutputLayerUnits] of real;

OutputLayerOutput:array[1..OutputLayerUnits] of shortint;

target:array[1..numberpatterns,1..OutputLayerUnits] of shortint;

v:array[1..numberpatterns,1..InputLayerUnits] of shortint;

implementation

{$R *.DFM}

procedure TFrmPerceptron.Percept_FieldPercMouseDown(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var m,k:BYTE;

correctRect:shortint;

L,T,H,V:INTEGER;

begin

L:=0;

T:=0;

H:=Percept_FieldPerc.UnitHorizontal;

V:=Percept_FieldPerc.UnitVertical;

for m :=1 to Percept_FieldPerc.UnitRectVert do

begin

for k :=1 to Percept_FieldPerc.UnitRectHorz do

begin

if (XL) and (YT) then

begin

correctRect:=k+Percept_FieldPerc.UnitRectHorz*(m-1);

if (Button=mbLeft) and

(Percept_FieldPerc.Brushes[correctRect]=Percept_FieldPerc.BackGroundBrus
h) then

begin

Percept_FieldPerc.Brushes[correctRect]:=Percept_FieldPerc.RectBrush;

end

else

if (Button=mbRight) and

(Percept_FieldPerc.Brushes[correctRect]=Percept_FieldPerc.RectBrush)then

begin

Percept_FieldPerc.Brushes[correctRect]:=Percept_FieldPerc.BackGroundBrus
h;

end;

end;

inc(L,Percept_FieldPerc.UnitHorizontal);

inc(H,Percept_FieldPerc.UnitHorizontal);

end;

inc(T,Percept_FieldPerc.UnitVertical);

inc(V,Percept_FieldPerc.UnitVertical);

L:=0;

H:=Percept_FieldPerc.UnitHorizontal;

end;

end;

procedure TFrmPerceptron.BitBtnCloseClick(Sender: TObject);

begin

Close;

end;

procedure TFrmPerceptron.FormCreate(Sender: TObject);

var i,j:byte;

rand:real;

begin

//numberpatterns:=2;//10;

EditNumPat.Text:=inttostr(numberpatterns);

BtnNext.Font.Color:=clRed;

indexBtnNextClick:=0;

LabelInput.Visible:=False;

// *********************************************

Randomize;// neo/aeiua aana (-0.5,0.5)

for i := 1 to OutputLayerUnits do

begin

for j := 1 to InputLayerUnits do

begin

rand:=Random-0.5;

w[i,j]:=rand;

end;

end;

end;

procedure TFrmPerceptron.BtnNextClick(Sender: TObject);

var i,j,m:byte;

sum:real;

neterror,err:real;

error:array[1..OutputLayerUnits] of real;

stop:boolean;

krandom:integer;

begin

indexBtnNextClick:=indexBtnNextClick+1;

for m:=1 to InputLayerUnits do begin

if (Percept_FieldPerc.Brushes[m]=Percept_FieldPerc.RectBrush)
then

begin

v[indexBtnNextClick,m]:=1;

end

else

if
(Percept_FieldPerc.Brushes[m]=Percept_FieldPerc.BackGroundBrush) then

begin

v[indexBtnNextClick,m]:=-1;

end;

end;

// ******************ODD or EVEN*********************

if RadioButtonOdd.Checked then

begin

target[indexBtnNextClick,1]:=1;

target[indexBtnNextClick,2]:=-1;

end

else

if RadioButtonEven.Checked then

begin

target[indexBtnNextClick,1]:=-1;

target[indexBtnNextClick,2]:=1;

end;

// ***************************************************

if (indexBtnNextClick+1)=numberpatterns then

begin

BtnNext.Caption:=’last’;

end

else

begin

if (indexBtnNextClick)=numberpatterns then

begin

BtnNext.Font.Color:=clWindowText;

BtnNext.Caption:=’finished’;

LabelInput.Font.Color:=clRed;

LabelInput.Visible:=True;

end

else

begin

BtnNext.Caption:=’next’;

end;

end;

//*********************MAIN*******************************

if (indexBtnNextClick)=numberpatterns then

begin

repeat

stop:=false;

for m := 1 to numberpatterns do

begin

for i := 1 to OutputLayerUnits do

begin

sum:=0;

for j := 1 to InputLayerUnits do

begin

sum:=sum+w[i,j]*v[m,j];

end;

activation[i]:=sum;

if sum>=0 then

begin

OutputLayerOutput[i]:=1;

end

else

begin

OutputLayerOutput[i]:=-1;

end;

end;

neterror:=0;

for i := 1 to OutputLayerUnits do

begin

err:=target[m,i]-activation[i];

error[i]:=err;

neterror:=neterror+0.5*sqr(err);

end;

if neterror=0 then

begin

OutputLayerOutput[i]:=1;

end

else

begin

OutputLayerOutput[i]:=-1;

end;

end;

neterror:=0;

for i := 1 to OutputLayerUnits do

begin

err:=target[m,i]-activation[i];

error[i]:=err;

neterror:=neterror+0.5*sqr(err);

end;

for i := 1 to OutputLayerUnits do

begin

for j := 1 to InputLayerUnits do

begin

w[i,j]:=w[i,j]+eta*error[i]*v[m,j];

end;

end;

end;

end;//if

until stop;//end;

end; // if

end;

procedure TFrmPerceptron.BtnOutputClick(Sender: TObject);

var z:array[1..InputLayerUnits] of shortint;

m,i,j:byte;

Output:array[1..InputLayerUnits] of real;

sum:real;

begin

for m:=1 to InputLayerUnits do begin

if (Percept_FieldPerc.Brushes[m]=Percept_FieldPerc.RectBrush)
then

begin

z[m]:=1;

end

else

if
(Percept_FieldPerc.Brushes[m]=Percept_FieldPerc.BackGroundBrush) then

begin

z[m]:=-1;

end;

end;

for i := 1 to OutputLayerUnits do

begin

sum:=0;

for j := 1 to InputLayerUnits do

begin

sum:=sum+w[i,j]*z[j];

end;

Output[i]:=sum;

end;

if (Output[1]>Output[2]) then

begin

LabelOdd.Font.Color:=clRed;

LabelEven.Font.Color:=clWindowText;

end

else begin

if (Output[2]>Output[1]) then

begin

LabelEven.Font.Color:=clRed;

LabelOdd.Font.Color:=clWindowText;

end;

end;

end;

end.

I?ia?aiia, iiaeaee?othuay naoue ia?aoiiai ?ani?ino?aiaiey

unit UBack;

interface

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,

StdCtrls, Percept_Field, Buttons, ExtCtrls;

const FirstLayerUnits=35;

SecondLayerUnits=20;

ThirdLayerUnits=2;

numberpatterns=36;

NumLayers=3;

epsilon=0.000001;

eta=0.05;

alpha=0.5;

type

TFrmBack = class(TForm)

BitBtnClose: TBitBtn;

Percept_FieldBack: TPercept_Field;

GroupBoxTrain: TGroupBox;

ComboBoxABC: TComboBox;

ComboBoxDigits: TComboBox;

GroupBoxInit: TGroupBox;

EditNumPat: TEdit;

LabelNumPat: TLabel;

BtnNext: TButton;

GroupBoxRec: TGroupBox;

LabelInput: TLabel;

RadioGroupTarget: TRadioGroup;

RadioButtonLetter: TRadioButton;

RadioButtonFigure: TRadioButton;

ButtonOut: TButton;

LabelFigure: TLabel;

LabelOr: TLabel;

LabelLetter: TLabel;

procedure BitBtnCloseClick(Sender: TObject);

procedure ComboBoxABCChange(Sender: TObject);

procedure ComboBoxDigitsChange(Sender: TObject);

procedure Percept_FieldBackMouseDown(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

procedure FormCreate(Sender: TObject);

procedure BtnNextClick(Sender: TObject);

procedure ButtonOutClick(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

FrmBack: TFrmBack;

var

wFirstSecond:array[1..SecondLayerUnits,1..FirstLayerUnits] of real;

wSecondThird:array[1..ThirdLayerUnits,1..SecondLayerUnits] of real;

indexBtnNextClick:byte;

target:array[1..numberpatterns,1..ThirdLayerUnits] of real;

v:array[1..numberpatterns,1..FirstLayerUnits] of real;

implementation

{$R *.DFM}

procedure TFrmBack.BitBtnCloseClick(Sender: TObject);

begin

Close;

end;

procedure TFrmBack.Percept_FieldBackMouseDown(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var m,k:BYTE;

correctRect:shortint;

L,T,H,V:INTEGER;

begin

L:=0;

T:=0;

H:=Percept_FieldBack.UnitHorizontal;

V:=Percept_FieldBack.UnitVertical;

for m :=1 to Percept_FieldBack.UnitRectVert do

begin

for k :=1 to Percept_FieldBack.UnitRectHorz do

begin

if (XL) and (YT) then

begin

correctRect:=k+Percept_FieldBack.UnitRectHorz*(m-1);

if (Button=mbLeft) and

(Percept_FieldBack.Brushes[correctRect]=Percept_FieldBack.BackGroundBrus
h) then

begin

Percept_FieldBack.Brushes[correctRect]:=Percept_FieldBack.RectBrush;

end

else

if (Button=mbRight) and

(Percept_FieldBack.Brushes[correctRect]=Percept_FieldBack.RectBrush)then

begin

Percept_FieldBack.Brushes[correctRect]:=Percept_FieldBack.BackGroundBrus
h;

end;

end;

inc(L,Percept_FieldBack.UnitHorizontal);

inc(H,Percept_FieldBack.UnitHorizontal);

end;

inc(T,Percept_FieldBack.UnitVertical);

inc(V,Percept_FieldBack.UnitVertical);

L:=0;

H:=Percept_FieldBack.UnitHorizontal;

end;

end;

procedure TFrmBack.FormCreate(Sender: TObject);

var i,j:byte;

rand:real;

begin

EditNumPat.Text:=inttostr(numberpatterns);

BtnNext.Font.Color:=clRed;

indexBtnNextClick:=0;

LabelInput.Visible:=False;

// *********************************************

Randomize;// neo/aeiua aana (-0.5,0.5)

for i := 1 to SecondLayerUnits do

begin

for j := 1 to FirstLayerUnits do

begin

rand:=Random-0.5;

wFirstSecond[i,j]:=rand;

end;

end;

for i := 1 to ThirdLayerUnits do

begin

for j := 1 to SecondLayerUnits do

begin

rand:=Random-0.5;

wSecondThird[i,j]:=rand;

end;

end;

end;

procedure TFrmBack.BtnNextClick(Sender: TObject);

var i,j,m:byte;

sumFirstSecond,

sumSecondThird:real;

stop:boolean;

OutputSecond:array[1..SecondLayerUnits] of real;

OutputThird:array[1..ThirdLayerUnits] of real;

output,err,neterror:real;

OutLayerError:array[1..ThirdLayerUnits] of real;

SecondLayerError:array[1..SecondLayerUnits] of real;

FirstLayerError:array[1..FirstLayerUnits] of real;

dWeightSecondThird:array[1..ThirdLayerUnits,1..SecondLayerUnits]
of real;

dWeightFirstSecond:array[1..SecondLayerUnits,1..FirstLayerUnits]
of real;

dWeight:real;

krandom:integer;

begin

indexBtnNextClick:=indexBtnNextClick+1;

for m:=1 to FirstLayerUnits do begin

if (Percept_FieldBack.Brushes[m]=Percept_FieldBack.RectBrush)
then

begin

v[indexBtnNextClick,m]:=1;

end

else

if
(Percept_FieldBack.Brushes[m]=Percept_FieldBack.BackGroundBrush) then

begin

v[indexBtnNextClick,m]:=-1;

end;

end;

// ******************ODD or EVEN*********************

if RadioButtonFigure.Checked then

begin

target[indexBtnNextClick,1]:=0.9;//1;

target[indexBtnNextClick,2]:=0.1;//-1;

end

else

if RadioButtonLetter.Checked then

begin

target[indexBtnNextClick,1]:=0.1;//-1;

target[indexBtnNextClick,2]:=0.9;//1;

end;

// ***************************************************

if (indexBtnNextClick+1)=numberpatterns then

begin

BtnNext.Caption:=’last’;

end

else

begin

if (indexBtnNextClick)=numberpatterns then

begin

BtnNext.Font.Color:=clWindowText;

BtnNext.Caption:=’finished’;

LabelInput.Font.Color:=clRed;

LabelInput.Visible:=True;

end

else

begin

BtnNext.Caption:=’next’;

end;

end;

//***********************MAIN**************************

if (indexBtnNextClick)=numberpatterns then

begin

repeat

stop:=false;

for m := 1 to numberpatterns do

begin

for i := 1 to SecondLayerUnits do

begin

sumFirstSecond:=0;

for j := 1 to FirstLayerUnits do

begin

sumFirstSecond:=sumFirstSecond+wFirstSecond[i,j]*v[m,j];

end;

OutputSecond[i]:=1/(1+exp(-sumFirstSecond));

end;

for i := 1 to ThirdLayerUnits do

begin

sumSecondThird:=0;

for j := 1 to SecondLayerUnits do

begin

sumSecondThird:=sumSecondThird+wSecondThird[i,j]*OutputSecond[j];

end;

OutputThird[i]:=1/(1+exp(-sumSecondThird));

end;

neterror:=0;

for i := 1 to ThirdLayerUnits do

begin

output:=OutputThird[i];

err:=target[m,i]-output;

OutLayerError[i]:=output*(1-output)*err;

neterror:=neterror+0.5*sqr(err);

end;

if neterrorOutputThird[2]) then

begin

LabelFigure.Font.Color:=clRed;

LabelLetter.Font.Color:=clWindowText;

end

else begin

if (OutputThird[2]>OutputThird[1]) then

begin

LabelLetter.Font.Color:=clRed;

LabelFigure.Font.Color:=clWindowText;

end;

end;

end;

end.

I?ia?aiia, iiaeaee?othuay naoue Oiioeeaea

unit UHop;

interface

uses

Windows, Messages, SysUtils,

Classes, Graphics, Controls,

Forms, Dialogs, StdCtrls, Buttons, Percept_Field;

const numberneurons=35;

type

TFrmHop = class(TForm)

BitBtnClose: TBitBtn;

GrpBoxTraining: TGroupBox;

GrpBoxInitial: TGroupBox;

EditThres: TEdit;

EditNumPat: TEdit;

LabelThres: TLabel;

LabelNumPat: TLabel;

BtnNext: TButton;

GrpBoxRec: TGroupBox;

LabelInput: TLabel;

BtnOutput: TButton;

BitBtnCancel: TBitBtn;

ButtonDelay: TButton;

ComboBoxABC: TComboBox;

ComboBoxDigits: TComboBox;

Percept_FieldHop: TPercept_Field;

ButtonRetrain: TButton;

procedure Percept_FieldHopMouseDown(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

procedure BitBtnCloseClick(Sender: TObject);

procedure EditNumPatChange(Sender: TObject);

procedure EditThresChange(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure BtnNextClick(Sender: TObject);

procedure BtnOutputClick(Sender: TObject);

procedure BitBtnCancelClick(Sender: TObject);

procedure ButtonDelayClick(Sender: TObject);

procedure ComboBoxABCChange(Sender: TObject);

procedure ComboBoxDigitsChange(Sender: TObject);

procedure ButtonRetrainClick(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

FrmHop: TFrmHop;

var numberpatterns,threshold:shortint;

w:array[1..numberneurons,1..numberneurons] of shortint;

iindex,jindex,indexBtnNextClick:byte;

stop:boolean;

implementation

{$R *.DFM}

procedure TFrmHop.Percept_FieldHopMouseDown(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var m,k:BYTE;

correctRect:shortint;

L,T,H,V:INTEGER;

begin

L:=0;

T:=0;

H:=Percept_FieldHop.UnitHorizontal;

V:=Percept_FieldHop.UnitVertical;

for m :=1 to Percept_FieldHop.UnitRectVert do

begin

for k :=1 to Percept_FieldHop.UnitRectHorz do

begin

if (XL) and (YT) then

begin

correctRect:=k+Percept_FieldHop.UnitRectHorz*(m-1);

if (Button=mbLeft) and

(Percept_FieldHop.Brushes[correctRect]=Percept_FieldHop.BackGroundBrush)
then

begin

Percept_FieldHop.Brushes[correctRect]:=Percept_FieldHop.RectBrush;

end

else

if (Button=mbRight) and

(Percept_FieldHop.Brushes[correctRect]=Percept_FieldHop.RectBrush)then

begin

Percept_FieldHop.Brushes[correctRect]:=Percept_FieldHop.BackGroundBrush;

end;

end;

inc(L,Percept_FieldHop.UnitHorizontal);

inc(H,Percept_FieldHop.UnitHorizontal);

end;

inc(T,Percept_FieldHop.UnitVertical);

inc(V,Percept_FieldHop.UnitVertical);

L:=0;

H:=Percept_FieldHop.UnitHorizontal;

end;

end;

procedure TFrmHop.BitBtnCloseClick(Sender: TObject);

begin

Close;

end;

procedure TFrmHop.EditThresChange(Sender: TObject);

begin

threshold:=strtoint(EditThres.Text);

end;

procedure TFrmHop.EditNumPatChange(Sender: TObject);

begin

numberpatterns:=strtoint(EditNumPat.Text);

end;

procedure TFrmHop.FormCreate(Sender: TObject);

var i,j:byte;

begin

threshold:=0;

EditThres.Text:=inttostr(threshold);

numberpatterns:=3;

EditNumPat.Text:=inttostr(numberpatterns);

BtnNext.Font.Color:=clRed;

for i:=1 to numberneurons do begin

for j:=1 to numberneurons do begin

w[i,j]:=0;

end;

end;

indexBtnNextClick:=0;

LabelInput.Visible:=False;

end;

procedure TFrmHop.BtnNextClick(Sender: TObject);

var i,j,m:byte;

v:array[1..numberneurons] of shortint;

begin

indexBtnNextClick:=indexBtnNextClick+1;

for m:=1 to numberneurons do begin

if (Percept_FieldHop.Brushes[m]=Percept_FieldHop.RectBrush) then

begin

v[m]:=1;

end

else

if (Percept_FieldHop.Brushes[m]=Percept_FieldHop.BackGroundBrush)
then

begin

v[m]:=0;

end;

end;

for i:=1 to numberneurons-1 do begin

for j:=i+1 to numberneurons do begin

w[i,j]:=w[i,j]+(2*v[i]-1)*(2*v[j]-1);

w[j,i]:=w[i,j];

end;

end;

if (indexBtnNextClick+1)=numberpatterns then

begin

BtnNext.Caption:=’last’;

end

else

begin

if (indexBtnNextClick)=numberpatterns then

begin

BtnNext.Font.Color:=clWindowText;

BtnNext.Caption:=’finished’;

LabelInput.Font.Color:=clRed;

LabelInput.Visible:=True;

end

else

begin

BtnNext.Caption:=’next’;

end;

end;

end;

procedure TFrmHop.BtnOutputClick(Sender: TObject);

var i,j,m,indicator:byte;

y,z:array[1..numberneurons] of shortint;

wij,wijthres:shortint;

k:longint;

begin

for m:=1 to numberneurons do begin

if (Percept_FieldHop.Brushes[m]=Percept_FieldHop.RectBrush) then

begin

z[m]:=1;

end

else

if (Percept_FieldHop.Brushes[m]=Percept_FieldHop.BackGroundBrush)
then

begin

z[m]:=0;

end;

end;

for m := 1 to numberneurons do

begin

y[m]:=z[m];

end;

indicator:=0;

while indicator=0 do begin

for i:=1 to numberneurons do begin

wij:=0;

for j:=1 to numberneurons do begin

if i<>j then

wij:=wij+w[i,j]*z[j];

end;

wijthres:=wij-threshold;

if wijthres>=0 then

z[i]:=1

else

z[i]:=0;

end;

i:=1;

while i<=numberneurons do beginif z[i]=y[i] then beginy[i]:=z[i];indicator:=1;i:=i+1;endelse beginindicator:=0;repeaty[i]:=z[i];i:=i+1;until i>numberneurons;

end;

end;{while}

end;{while}

for m := 1 to numberneurons do

begin

if z[m]=1 then

begin

Percept_FieldHop.Brushes[m]:=Percept_FieldHop.RectBrush;

end

else

if z[m]=0 then

begin

Percept_FieldHop.Brushes[m]:=Percept_FieldHop.BackGroundBrush;

end;

stop:=false;

repeat

Application.ProcessMessages;

until stop;

end;

end;

procedure TFrmHop.BitBtnCancelClick(Sender: TObject);

var i,j:byte;

begin

BtnNext.Font.Color:=clRed;

for i:=1 to numberneurons do begin

for j:=1 to numberneurons do begin

w[i,j]:=0;

end;

end;

indexBtnNextClick:=0;

LabelInput.Visible:=False;

BtnNext.Caption:=’first’;

for i := 1 to numberneurons do

begin

Percept_FieldHop.Brushes[i]:=Percept_FieldHop.BackGroundBrush;

end;

end;

procedure TFrmHop.ButtonDelayClick(Sender: TObject);

begin

stop:=true;

end;

procedure TFrmHop.ButtonRetrainClick(Sender: TObject);

var i,j,m:byte;

v:array[1..numberneurons] of shortint;

begin

for m:=1 to numberneurons do begin

if (Percept_FieldHop.Brushes[m]=Percept_FieldHop.RectBrush) then

begin

v[m]:=1;

end

else

if (Percept_FieldHop.Brushes[m]=Percept_FieldHop.BackGroundBrush)
then

begin

v[m]:=0;

end;

end;

for i:=1 to numberneurons-1 do begin

for j:=i+1 to numberneurons do begin

w[i,j]:=w[i,j]-(2*v[i]-1)*(2*v[j]-1);

w[j,i]:=w[i,j];

end;

end;

end;

end.

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Оставить комментарий

avatar
  Подписаться  
Уведомление о
Заказать реферат
UkrReferat.com. Всі права захищені. 2000-2019