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

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

系統 1765 0

在人工神經網絡領域中,感知機也被指為單層的人工神經網絡,以區別于較復雜的多層感知機(Multilayer Perceptron)。 作為一種線性分類器,(單層)感知機可說是最簡單的前向人工神經網絡形式。盡管結構簡單,感知機能夠學習并解決相當復雜的問題。感知機主要的本質缺陷是它不能處理線性不可分問題。

?

感知機使用特征向量來表示的前饋式人工神經網絡,它是一種二元分類器,把矩陣上的輸入(實數值向量)映射到輸出值上(一個二元的值)。

是實數的表式權重的向量,是點積。是偏置,一個常數不依賴于任何輸入值。偏置可以認為是激勵函數的偏移量,或者給神經元一個基礎活躍等級。

(0 或 1)用于對進行分類,看它是肯定的還是否定的,這屬于二元分類問題。如果是否定的,那么加權后的輸入必須產生一個肯定的值并且大于,這樣才能令分類神經元大于閾值0。從空間上看,偏置改變了決策邊界的位置(雖然不是定向的)。

由于輸入直接經過權重關系轉換為輸出,所以感知機可以被視為最簡單形式的前饋式人工神經網絡。

?

>> P=[0 1 0 1 1;1 1 1 0 0]

P =

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

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

T =

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

>> net = newp(minmax(P),1)


net =

??? Neural Network object:

??? architecture:

???????? numInputs: 1
???????? numLayers: 1
?????? biasConnect: [1]
????? inputConnect: [1]
????? layerConnect: [0]
???? outputConnect: [1]

??????? numOutputs: 1? (read-only)
??? numInputDelays: 0? (read-only)
??? numLayerDelays: 0? (read-only)

??? subobject structures:

??????????? inputs: {1x1 cell} of inputs
??????????? layers: {1x1 cell} of layers
?????????? outputs: {1x1 cell} containing 1 output
??????????? biases: {1x1 cell} containing 1 bias
????? inputWeights: {1x1 cell} containing 1 input weight
????? layerWeights: {1x1 cell} containing no layer weights

??? functions:

????????? adaptFcn: 'trains'
???????? divideFcn: (none)
?????? gradientFcn: 'calcgrad'
?????????? initFcn: 'initlay'
??????? performFcn: 'mae'
????????? plotFcns: {'plotperform','plottrainstate'}
????????? trainFcn: 'trainc'

??? parameters:

??????? adaptParam: .passes
?????? divideParam: (none)
???? gradientParam: (none)
???????? initParam: (none)
????? performParam: (none)
??????? trainParam: .show, .showWindow, .showCommandLine, .epochs,
??????????????????? .goal, .time

??? weight and bias values:

??????????????? IW: {1x1 cell} containing 1 input weight matrix
??????????????? LW: {1x1 cell} containing no layer weight matrices
???????????????? b: {1x1 cell} containing 1 bias vector

??? other:

????????????? name: ''
????????? userdata: (user information)

>> net.iw{1,1}

ans =

???? 0???? 0

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

net =

??? Neural Network object:

??? architecture:

???????? numInputs: 1
???????? numLayers: 1
?????? biasConnect: [1]
????? inputConnect: [1]
????? layerConnect: [0]
???? outputConnect: [1]

??????? numOutputs: 1? (read-only)
??? numInputDelays: 0? (read-only)
??? numLayerDelays: 0? (read-only)

??? subobject structures:

??????????? inputs: {1x1 cell} of inputs
??????????? layers: {1x1 cell} of layers
?????????? outputs: {1x1 cell} containing 1 output
??????????? biases: {1x1 cell} containing 1 bias
????? inputWeights: {1x1 cell} containing 1 input weight
????? layerWeights: {1x1 cell} containing no layer weights

??? functions:

????????? adaptFcn: 'trains'
???????? divideFcn: (none)
?????? gradientFcn: 'calcgrad'
?????????? initFcn: 'initlay'
??????? performFcn: 'mae'
????????? plotFcns: {'plotperform','plottrainstate'}
????????? trainFcn: 'trainc'

??? parameters:

??????? adaptParam: .passes
?????? divideParam: (none)
???? gradientParam: (none)
???????? initParam: (none)
????? performParam: (none)
??????? trainParam: .show, .showWindow, .showCommandLine, .epochs,
??????????????????? .goal, .time

??? weight and bias values:

??????????????? IW: {1x1 cell} containing 1 input weight matrix
??????????????? LW: {1x1 cell} containing no layer weight matrices
???????????????? b: {1x1 cell} containing 1 bias vector

??? other:

????????????? name: ''
????????? userdata: (user information)

>> net.b{1}

ans =

???? 0

>> net.b{1}=-2

net =

??? Neural Network object:

??? architecture:

???????? numInputs: 1
???????? numLayers: 1
?????? biasConnect: [1]
????? inputConnect: [1]
????? layerConnect: [0]
???? outputConnect: [1]

??????? numOutputs: 1? (read-only)
??? numInputDelays: 0? (read-only)
??? numLayerDelays: 0? (read-only)

??? subobject structures:

??????????? inputs: {1x1 cell} of inputs
??????????? layers: {1x1 cell} of layers
?????????? outputs: {1x1 cell} containing 1 output
??????????? biases: {1x1 cell} containing 1 bias
????? inputWeights: {1x1 cell} containing 1 input weight
????? layerWeights: {1x1 cell} containing no layer weights

??? functions:

????????? adaptFcn: 'trains'
???????? divideFcn: (none)
?????? gradientFcn: 'calcgrad'
?????????? initFcn: 'initlay'
??????? performFcn: 'mae'
????????? plotFcns: {'plotperform','plottrainstate'}
????????? trainFcn: 'trainc'

??? parameters:

??????? adaptParam: .passes
?????? divideParam: (none)
???? gradientParam: (none)
???????? initParam: (none)
????? performParam: (none)
??????? trainParam: .show, .showWindow, .showCommandLine, .epochs,
??????????????????? .goal, .time

??? weight and bias values:

??????????????? IW: {1x1 cell} containing 1 input weight matrix
??????????????? LW: {1x1 cell} containing no layer weight matrices
???????????????? b: {1x1 cell} containing 1 bias vector

??? other:

????????????? name: ''
????????? userdata: (user information)

我們這個感知器的任務就是完成 and?運算,即只有輸入的2個元素都為?1,輸出才為1

sim是仿真函數,對神經網絡進行仿真,可以理解為進行測試
>> sim(net,[0;1])

ans =

???? 0

>> sim(net,[1;1])

ans =

???? 1

>> sim(net,[1;0])

ans =

???? 0

>> sim(net,[1;0])

ans =

???? 0

>> y=sim(net,[1;0])

y =

???? 0

mae為計算平均誤差,e為誤差矩陣,因為人為的設置了正確的權值,所以沒有誤差,t為正確輸出,y為感知機的實際輸出

>> y=sim(net,[1 0 1;0 1 1])

y =

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

t =

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

>> e=t-y

e =

???? 0???? 0???? 0

>> perf=mae(3)

perf =

???? 3

>> perf=mae(e)

perf =

???? 0

>>

?

注意上面的輸入方式是1;0為一組樣本,然后0;1為另一組樣本,1;1為最后一組樣本,共3 組樣本,見下面示例

ans(1,1)和ans(2,1)是一組輸入數據


>> [1 0 1;0 1 1]

ans =

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

?

?我們把權值修改成一個錯的,來看看誤差矩陣和平均誤差

>> y=sim(net,[1 0 1;0 1 1])

y =

???? 0???? 0???? 0

>> e=t-y

e =

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

>> perf=mae(e)

perf =

??? 0.3333

>> t

t =

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

>>

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


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

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

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

【本文對您有幫助就好】

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

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 日韩在线一区二区三区 | 99pao成人国产永久免费视频 | 亚洲一区二区三区四区五区中文 | 久草免费电影 | 91亚洲国产成人久久精品网站 | 欧美在线精品一区二区在线观看 | 亚洲一区二区av | 久久久免费的精品 | 狠狠操天天操夜夜操 | 99只有精品| 狠狠综合久久av一区二区小说 | 日韩中文字幕在线播放 | 国产精品亚洲第一区二区三区 | 成年人在线看片 | 中文字幕精品一区二区三区精品 | 国产精品九九久久99视频 | 奇米影视在线 | 麻豆av网站 | 蜜桃91麻豆 | 毛片av网| 奇米奇米777 | 国产精品区免费视频 | 国产精品久久久久久搜索 | 久草中文在线 | 韩国资源视频一区二区三区 | 国产在线精品一区 | 一道本不卡视频 | 日本三级香港三级人妇99 | jizzjizz日本人| 欧美 中文字幕 | 91网站免费观看直播 | 日本免费不卡在线一区二区三区 | 电影长安道无删减免费看 | 国产无遮挡一级毛片 | 黄色一级小视频 | 小明永久成人一区二区 | 草草影院网站 | 欧美亚洲国产日韩 | 午夜视频久久 | 日本黄页网站免费 | 久久久网站亚洲第一 |