Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
2015_for_stud_Практика_С.doc
Скачиваний:
16
Добавлен:
17.03.2016
Размер:
1.69 Mб
Скачать

Результат роботи:

Shape/Texture/Weight/Pineapple?=__1 1 -1 ;0

a=1 1 -1

W2=0 0 0

Shape/Texture/Weight/Pineapple?=__-1 1 -1 ;0

a=-1 1 -1

W2=0 0 0

Shape/Texture/Weight/Pineapple?=__1 1 -1 ;0

a=1 1 -1

W2=0 0 0

Shape/Texture/Weight/Pineapple?=__1 1 -1 ;0

a=1 1 -1

W2=0 0 0

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.2 -0.2 0.2

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.36 -0.36 0.36

Shape/Texture/Weight/Pineapple?=__-1 1 -1 ;0

a=-1 1 -1

W2=-0.36 -0.36 0.36

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.488 -0.488 0.488

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.5904 -0.5904 0.5904

Shape/Texture/Weight/Pineapple?=__1 1 -1 ;0

a=1 1 -1

W2=-0.5904 -0.5904 0.5904

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.67232 -0.67232 0.67232

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.73786 -0.73786 0.73786

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.79028 -0.79028 0.79028

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.83223 -0.83223 0.83223

Shape/Texture/Weight/Pineapple?=__1 1 -1 ;0

a=1 1 -1

W2=-0.83223 -0.83223 0.83223

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.86578 -0.86578 0.86578

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.89263 -0.89263 0.89263

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.9141 -0.9141 0.9141

Shape/Texture/Weight/Pineapple?=__1 -1 -1 ;0

a=1 -1 -1

W2=-0.9141 -0.9141 0.9141

Shape/Texture/Weight/Pineapple?=__-1 1 -1 ;0

a=-1 1 -1

W2=-0.9141 -0.9141 0.9141

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.93128 -0.93128 0.93128

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.94502 -0.94502 0.94502

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.95602 -0.95602 0.95602

Shape/Texture/Weight/Pineapple?=__1 -1 -1 ;0

a=1 -1 -1

W2=-0.95602 -0.95602 0.95602

Shape/Texture/Weight/Pineapple?=__-1 -1 1 ;1

a=-1 -1 1

W2=-0.96482 -0.96482 0.96482

%%%%%%%%%%%%%%% working=0 %%%%%%%%%%%%%%%

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;0

a=0 0 0

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;0

a=0 0 0

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;0

a=0 0 0

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;0

a=0 0 0

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;0

a=0 0 0

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;0

a=0 0 0

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

Shape/Texture/Weight/Pineapple?=__0 0 0 ;1

a=-0.96482 -0.96482 0.96482

W2=-0.96482 -0.96482 0.96482

5. Спроектувати мережу розпізнавання множини векторів-прототипів {p1, …, pQ} та визначити її параметри.Кількість нейронів S дорівнює кількості векторів-прототипів Q, які необхідно розпізнати (тобто S=Q).

% Instar hardlim

clc; close all; clear all;

q=2;r=3;

W=zeros(q,r) % W=[ 0 0 0; 0 0 0]

P(1,:)=[1.000 -1.000 -1.000]; %ORANGE

P(2,:)=[1.000 1.000 1.000]; %APPlE

b=-3; % ||p||*||p||>=-b

a=[0;0]; alfa=0.5;

p0=[1 0] % збуджуючий сигнал + не збуджуючий

w0=3; s1=abs(sum(W(1,:)-P(1,:)));

s2=abs(sum(W(2,:)-P(2,:)));

while (s1 > 10^(-10) && s2 > 10^(-10))

for i=1:2 % zb +(~zb)

a(1)=hardlim(p0(i)*w0+W(1,:)*P(1,:)'+b);

a(2)=hardlim(p0(i)*w0+W(2,:)*P(2,:)'+b);

W(1,:)=(W(1,:)'+alfa*a(1)*(P(1,:)'-W(1,:)'))';

W(2,:)=(W(2,:)'+alfa*a(2)*(P(2,:)'-W(2,:)'))';

end;

s1=abs(sum(W(1,:)-P(1,:)));

s2=abs(sum(W(2,:)-P(2,:)));

end; W

a=[0;0]; a(1)=hardlim(W(1,:)*P(1,:)'+b)

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]