計算智能筆記(四)

1、競爭學習神經網絡

一種無監督的學習方法。

1.1、網絡基礎知識

自組織網絡結構屬於層次型網絡
特點:都具有競爭層
在這裏插入圖片描述

1.2、競爭學習出現的由來

1.2.1、基本概念

在這裏插入圖片描述

1.2.3、學習規則

在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

1.3、競爭學習原理

在這裏插入圖片描述
在這裏插入圖片描述

1.4、matlab代碼

clear all
clc
close all

%bounds = [-1 1; -1 1];
%clusters = 4;
%points = 20;
%std_dev = 0.05;
%x = nngenc(bounds,clusters,points,std_dev);

[x(1,:),x(2,:)] = ginput();

plot(x(1,:),x(2,:),'+b');
title('Input Vertors');
xlabel('x(1)');
ylabel('x(2)');


net  = competlayer(4,.1); % 0.1 learning rate\
net = configure(net,x);
w = net.IW{1};
plot(x(1,:),x(2,:),'+b');
hold on
circles = plot(w(:,1),w(:,2),'og');

net.trainParam.epochs = 500;
net = train(net,x);
w = net.IW{1};

plot(w(:,1),w(:,2),'dr');


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章