資源簡介
最簡單的三層神經(jīng)網(wǎng)絡Matlab實現(xiàn),帶注釋,有不明白的可以參考我的博客:http://blog.csdn.net/ranchlai
代碼片段和文件信息
%function?output?=?ANN_Training(X?t?H?max_iter)
%Train?ANN?with?one?hidden?layer?and?one?output?unit?for?classification
%input?:
%X:??attributes.?Every?column?represents?a?sample.
%y:??target.?should?be?0?or?1.??length(y)?==?size(X2)?is?assumed.
%H:?size?of?hidden?layer.
%max_iter:?maximum?iterates
%tol:?convergence?tolerate
%output:
%?output:?a?structure?containing?all?network?parameters.
%Created?by?Ranch?Y.Q.?Lai?on?Mar?22?2011
%yqlai@comp.hkbu.edu.hk
function?output?=?ANN_Training(X?t?H?max_itertol)
[nN]?=?size(X);
if?N~=?length(t)
????error(‘inconsistent?sample?size‘);
end
W?=?randn(nH);?%?weight?for?hidden?layer?W(:i)?is?the?weight?vector?for?unit?i
b?=?randn(H1);?%?bias?for?hidden?layer
wo?=?randn(H1);?%weight?for?output?layer
bo?=?rand
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-09-07?12:48??ANN\
?????文件????????3006??2013-09-07?11:58??ANN\ANN_Training.m
?????文件?????????607??2013-09-07?12:58??ANN\demo_ann.asv
?????文件?????????608??2013-09-07?12:47??ANN\demo_ann.m
?????文件????????4808??2013-09-07?12:48??ANN\error.png
?????文件??????????76??2012-03-22?08:38??ANN\s.m
?????文件????????1019??2013-09-07?09:26??ANN\set1.mat
?????文件????????1043??2013-09-07?09:27??ANN\set2.mat
?????文件?????????811??2013-09-07?11:57??ANN\test_correct_classification.m
評論
共有 條評論