>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條評論
主站蜘蛛池模板: 男女啪啪高清无遮挡 | 一区二区三区高清在线观看 | 夜夜狠狠操 | 日本三级香港三级网站 | gogo全球大胆高清人露出91 | 久久精品一 | 三级a做爰大乳在线观看 | 欧美午夜一区二区三区免费大片 | 天天插夜夜 | 久久精品99久久 | 亚洲一区二区三区高清 | 成人欧美日韩一区二区三区 | 久久综合亚洲一区二区三区 | 国产电影一区二区三区 | 国产永久视频 | 天天操天天操天天 | 日韩一区二区三区视频 | 东京一热本色道久久爱 | 毛片免费在线视频 | 日韩成人 | av在线网站观看 | 国产免费中文字幕 | 一区二区三区四区国产精品视频 | 免费a视频在线观看 | 欧美影院久久 | 国产精品成人一区二区 | 久久亚洲精品国产精品黑人 | 国产精品亚洲va在线观看 | 久久这里是精品 | 欧美日韩精品乱国产 | 欧美高清在线精品一区二区不卡 | 国产精品久久久久秋霞影视 | 又黄又爽免费无遮挡在线观看 | 王骏迪的个人资料 | 亚洲v日本v欧美v综合v | 欧美九九| 99久久99视频 | 观看毛片| 99re视频 | 91精品国产日韩91久久久久久 | 欧美午夜精品一区二区蜜桃 |