 |
[6 * 9 = 42] whileTrue: [World run]
Stopařův průvodce jedním převážně neškodným programovacím jazykem
|
 |
|
Neuronová síť RCE a příklad použití
Jako projekt do předmětu o neuronových sítích jsem si vybral implementaci Restricted Coloumb Energy sítě. Slouží především pro klasifikaci a asociaci.
Základní algoritmus RCE sítě:
Síť obsahuje:
- 1 Skrytou vrstvu: neurony s radiální bázovou funkcí (RBF) a se skokovou aktivační funkcí:
- u(k) = odmocnina( suma_od_1_do_n((i(ii) - µ(ki))^2) )
- y(k) = 1 pro u(k) <= R; 0 pro u(k) > R.
- 1 výstupní vrstvu: neurony s funkcí logického OR
Poloformální popis algoritmu učení RCE sítě, algoritmus je převzat z poznámek od Doc. Ing. Františka Zbořila, CSc.:
Algorithm RCE;
begin
Create the input layer of the RCE; number of input neuron must be
the same as the length of input vectors. Hidden and output layers are
empty;
repeat
Clear the modif variable (modif:=False);
for each input vector from the training set do begin
Clear the hit variable (hit:=False);
for each hidden neuron (hypersphere) do
begin
Calculate distance between a
center of the hypersphere and
the input vector;
if the distance is less than or equal to a
radius of the
hypersphere
then if the hypersphere represents the same class as the
class of the input pattern is
then Set the hit variable (
hit:=True)
else Shrink the radius of the hypersphere to be less than
calculated distance and set the modif variable (modif:=True);
end; { for each hidden neuron}
if not hit then
begin
Create new hidden neuron (hypersphere) with the center
equals to the input vector and with maximal value of the
radius;
Set the modif variable (modif:=True);
if an output neuron for the class of the input vector exists
then Connect new hidden neuron with this output neuron
else Create new output neuron that will represent new
class and connect new hidden neuron with this new output neuron;
end;
end; { for each input vector }
until not modif
end;
Popis projektu:
Projekt, způsob implementace, příklady spuštění a výsledky jsou shrnuty v dokumentaci ve formátu PDF.
Při implementaci jsem vycházel z obecného frameworku pro neuronové sítě (originál najdete zde). Tento framework jsem patřičně rozšířil a poupravil pro využití i pro další typy neuronových sítí, takže pokud budete mít nějakou další implementaci této sítě, tak budu velmi rád, pokud ji dáte opět k dispozici i s popisem na našem SWIKI.
Download
- NN.zip - 3 soubory, které je potřeba "file-INovat" v pořadí jak jsou pojmenovány (číslo - obsah.st)
- Dokumentace
Odkazy na tuto stránku
|
|