>P=[02315062907100]P=02315062907100>>t=[0101100]t=0101100>>plotpv(P,T)2)>>P=[023150629071000921809]P=023150629071000921809>>T=[1000010]T=1000010>>plotpv(P,T)>>3、plotpc返回分界線控點,根據權W和閾值B的輸入繪制一條分界線plotpc(W," />

欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

matlab-神經網絡-感知器(2)

系統 2377 0

顯示函數plotpv的2個參數是輸入向量和目標函數

1)

>> P=[0 2 3 1 5 0 6
????? 2 9 0 7 1 0 0]

P =

???? 0???? 2???? 3???? 1???? 5???? 0???? 6
???? 2???? 9???? 0???? 7???? 1???? 0???? 0

>> t=[0 1 0 1 1 0 0]

t =

???? 0???? 1???? 0???? 1???? 1???? 0???? 0

?

>>plotpv(P,T)


matlab-神經網絡-感知器(2)
?

?

?

2)

>> P=[0 2 3 1 5 0 6
2 9 0 7 1 0 0
0 9 2 1 8 0 9]

P =

???? 0???? 2???? 3???? 1???? 5???? 0???? 6
???? 2???? 9???? 0???? 7???? 1???? 0???? 0
???? 0???? 9???? 2???? 1???? 8???? 0???? 9

>> T=[1 0 0 0 0 1 0]

T =

???? 1???? 0???? 0???? 0???? 0???? 1???? 0

>> plotpv(P,T)
>>


matlab-神經網絡-感知器(2)

?

?

3、plotpc返回分界線控點,根據權W和閾值B的輸入繪制一條分界線

?

plotpc(W,B)

plotpc(W,B,H)包含從前一次調用中返回的控點,在繪制新分界線之前,刪除舊線


?P=[ -0.3 -0.5 +0.6 -0.1 -0.8
-0.5 +0.6 -0.2 +0.5 -0.6 ]
T=[0 1 1 1 0]
plotpv(P,T)
net=newp([-10 2; -5 20],1)
hold on
linehandle=plotpc(net.iw{1},net.b{1})
net.adaptParam.passes=3
linehandle=plotpc(net.iw{1},net.b{1})
for a=1:25
[net,Y,E]=adapt(net,P,T)
linehandle=plotpc(net.iw{1},net.b{1},linehandle)
drawnow
end

?

?

關于 PLOTPC

?Plot a classification line on a perceptron vector plot.

繪制一個分類線,根據權矩陣W和閾值矩陣B
?
?? Syntax
?
???? plotpc(W,b)
???? plotpc(W,b,h)
?
?? Description
?
???? PLOTPC(W,B) takes these inputs,
?????? W - SxR weight matrix (R must be 3 or less).
?????? B - Sx1 bias vector.
???? and returns a handle to a plotted classification line.
??
???? PLOTPC(W,B,H) takes these inputs,
?????? H - Handle to last plotted line.
???? and deletes the last line before plotting the new one.
??
???? This function does not change the current axis and is intended
???? to be called after PLOTPV.
?

?


?? Example
?
???? The code below defines and plots the inputs and targets for a
???? perceptron:
?
?????? p = [0 0 1 1; 0 1 0 1];
?????? t = [0 0 0 1];
?????? plotpv(p,t)
?下面的代碼創建一個感知器,感知器是單層神經元,采用閾值激活函數,對一組輸入向量的響應達到 元素為0或1的目標輸出,實現對輸入向量進行分類,下面這個代碼創建了這個分類線
???? The following code creates a perceptron with inputs ranging
???? over the values in P, assigns values to its weights
???? and biases, and plots the resulting classification line.
?
?????? net = newp(minmax(p),1);
?????? net.iw{1,1} = [-1.2 -0.5];
?????? net.b{1} = 1;
?????? plotpc(net.iw{1,1},net.b{1})

?

我們把這個程序改一下

P=[0 1 0 1 1;1 1 1 0 0]
T=[0 1 0 0 0]
net = newp(minmax(P),1)

plotpv(P,T)

hold on


matlab-神經網絡-感知器(2)
?

生成1個神經元的感知器,其中P是輸入向量,T是目標函數

>> net.b{1}

ans =

???? 0

>> net.iw{1,1}

ans =

???? 0???? 0

>>

?

>> plotpc(net.iw{1,1},net.b{1})

此時執行沒有意義,因為權值和閾值初始化為0

?

我們指定一個正確的權值和閾值

net.b{1}=-2

net.iw{1,1} =[1 1]

?plotpc(net.iw{1,1},net.b{1})

注意plotpc必須要在plotpv函數后執行,可以看到分界線正確顯示出來

凡在分界線左側的都是反例,右側的是正例,即輸出值>0
matlab-神經網絡-感知器(2)
?

matlab-神經網絡-感知器(2)


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 日韩五码在线 | www.男插女b免费视频 | 国内精品视频区在线2021 | 久久久久国产一区二区三区 | 黄网站免费在线 | 国产色网址| 特黄特色大片免费视频观看 | 成人久草 | 欧美不卡一区二区三区在线观看 | 久久久久久一级毛片免费野外 | 日本精品久久久久中文字幕 | 少妇的肉体的满足毛片 | 欧美精品色 | 欧美无玛 | 免费观看黄色小视频 | 欧美精品在线一区 | 亚洲视频一区二区 | 久久久久久一级毛片免费野外 | 亚洲欧洲精品一区二区 | 国产 欧美 日本 | 国产在线精品观看 | 锵锵锵锵锵锵锵锵锵好大好湿软件 | 日本人视频jizz页码69 | 欧美影院推理片免费看 | 久久精彩| 国产熟妇另类久久久久XYZ | 日本VA在线视频播放 | 午夜免费 | 久久精品国产99国产 | 国内精品美女久久久久 | 一区二区三区久久 | 国产激情偷乱视频一区二区三区 | 日韩精品一区二区三区视频播放 | 成熟自由日本语热亚洲人 | 日韩欧美国产一区二区 | 免费国产一区二区在免费观看 | 男女爽爽无遮挡午夜动态图 | 亚洲精品国产偷自在线观看 | 999久久久免费精品国产 | 色操插| 亚洲成aⅴ人在线观看 |