>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," />

黄色网页视频 I 影音先锋日日狠狠久久 I 秋霞午夜毛片 I 秋霞一二三区 I 国产成人片无码视频 I 国产 精品 自在自线 I av免费观看网站 I 日本精品久久久久中文字幕5 I 91看视频 I 看全色黄大色黄女片18 I 精品不卡一区 I 亚洲最新精品 I 欧美 激情 在线 I 人妻少妇精品久久 I 国产99视频精品免费专区 I 欧美影院 I 欧美精品在欧美一区二区少妇 I av大片网站 I 国产精品黄色片 I 888久久 I 狠狠干最新 I 看看黄色一级片 I 黄色精品久久 I 三级av在线 I 69色综合 I 国产日韩欧美91 I 亚洲精品偷拍 I 激情小说亚洲图片 I 久久国产视频精品 I 国产综合精品一区二区三区 I 色婷婷国产 I 最新成人av在线 I 国产私拍精品 I 日韩成人影音 I 日日夜夜天天综合

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

系統 2657 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條評論