资源简介
利用matlab实现人工神经网络,程序清晰易懂,内涵多个程序可做为人工神经网络工具箱使用
代码片段和文件信息
function [W1W2PI_vectoriter]=batbp(NetDefW1W2PHIYtrparms)
%
% BATBP
% -----
% Batch version of the back-propagation algorithm.
%
% Given a set of corresponding input-output pairs and an initial network
% [W1W2critveciter]=batbp(NetDefW1W2PHIYtrparms) trains the
% network with backpropagation.
%
% The activation functions must be either linear or tanh. The network
% architecture is defined by the matrix ‘NetDef‘ consisting of two
% rows. The first row specifies the hidden layer while the second
% specifies the output layer.
%
% E.g. NetDef = [‘LHHHH‘
% ‘LL---‘]
%
% (L = Linear H = tanh)
%
% Notice that the bias is included as the last column in the weight
% matrices.
%
% See alternatively INCBP for an incremental version.
%
% INPUT:
% NetDef: Network definition
% W1 : Input-to-hidden layer weights. The matrix dimension is
% dim(W1) = [(# of hidden units) * (inputs + 1)] (the 1 is due to the bias)
% W2 : hidden-to-output layer weights.
% dim(W2) = [(outputs) * (# of hidden units + 1)]
% PHI : Input vector. dim(PHI) = [(inputs) * (# of data)]
% Y : Output data. dim(Y) = [(outputs) * (# of data)]
% trparms : Vector containing parameters associated with the training
% trparms = [max_iter eta alpha]
% max_iter : Max. number of iterations
% stop_crit : Stop learning if criterion is below this value
% eta : Step size
% alpha : Momentum (default is 0 (=off) )
%
% OUTPUT:
% W1 W2 : Weight matrices after training
% critvec : Vector containing the criterion evaluated at each iteration.
% iter : # of iterations
%
% Programmed by : Magnus Norgaard IAU/IMM DTU
% LastEditDate : July 16 1996
%----------------------------------------------------------------------------------
%-------------- NETWORK INITIALIZATIONS -------------
%----------------------------------------------------------------------------------
max_iter = trparms(1);
stop_crit = trparms(2);
eta = trparms(3);
if length(trparms)==4
alpha = trparms(4);
else
alpha = 0;
end
[outputsN] = size(Y); % # of outputs and # of data
[layersdummy] = size(NetDef); % Number of hidden layers
L_hidden = find(NetDef(1:)==‘L‘)‘; % Location of linear hidden units
H_hidden = find(NetDef(1:)==‘H‘)‘; % Location of tanh hidden units
L_output = find(NetDef(2:)==‘L‘)‘; % Location of linear output units
H_output = find(NetDef(2:)==‘H‘)‘; % Location of tanh output units
[hiddennet_inputs] = size(W1); % # of hidden units
PI_vector = zeros(max_iter1); % Vector containing the SSE for each iteration
y1 = zeros(hiddenN); % Hidden layer outputs
aug_y1=[y1;ones(1N)];
delta1 = y1;
y2 = zeros(outputsN); % Network output
delta2 = y2;
Y_
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4608 1997-10-30 23:41 .tnatr_intf
文件 5785 1997-10-30 20:18 batbp.m
文件 3270 1997-04-01 23:42 contents.m
文件 3258 1997-04-11 15:23 drawnet.m
文件 849 1997-04-01 23:42 dscale.m
文件 7238 1997-04-01 23:42 fpe.m
文件 10558 1997-04-11 17:23 getgrad.m
文件 7024 1997-04-02 21:57 ifvalid.m
文件 1586 1997-06-16 20:59 igls.m
文件 4957 1997-04-01 23:42 incbp.m
文件 4664 1997-04-02 21:58 ioleval.m
文件 5945 1997-10-17 18:32 kpredict.m
文件 6142 1997-04-01 23:42 lipschit.m
文件 8387 1997-04-01 23:42 loo.m
文件 132 1997-06-20 19:05 makemex.m
文件 1248550 1997-06-23 19:09 manual1.ps
文件 1243959 1997-06-23 19:10 manual2.ps
文件 3713 1997-04-10 21:03 marq.c
文件 11634 1997-04-01 23:42 marq.m
文件 8976 1997-04-01 23:42 marqlm.m
文件 3262 1997-04-01 23:42 matrix2.h
文件 43061 1997-04-10 20:27 matrix.c
文件 1295 1997-04-01 23:42 netstruc.m
文件 13311 1997-04-02 21:39 nnarmax1.m
文件 25999 1997-06-20 17:53 nnarmax2.c
文件 13423 1997-04-02 21:41 nnarmax2.m
文件 2744 1997-04-02 21:36 nnarx.m
文件 3248 1997-06-17 19:27 nnarxm.m
文件 2934 1997-06-16 20:59 nneval.m
文件 4672 1997-04-01 23:42 nnfpe.m
文件 2657 1997-06-17 19:27 nnigls.m
............此处省略34个文件信息
- 上一篇:平行束CT ART重建程序
- 下一篇:TCR仿真模型
相关资源
- 数字图像处理matlab版m文件
- 一个经典的MATLABgui界面的
- hmm算法matlab实现
- matlab代码-NRZ
- LM-BP神经网络的Matlab程序源代码
- 小波去噪 多种方法的matlab程序
- 去除粗大误差并插值的matlab函数
- 鲁棒控制matlab程序
- 随机信号及其自相关函数和功率谱密
- 量子遗传算法matlab代码.zip
- 蚁群算法算法的路径规划MATLAB实现
- 802.15.4协议matlab仿真
- MATLAB实现的M进制正交幅度调制(MQA
- 用Matlab绘制彩虹
- CT图像重建的MATLAB代码
- matlab mapminmax函数
- 雷达信号处理+Matlab程序
- psnr_mse的matlab代码实现
- Matlab人工鱼群原创程序
- MATLAB下料问题原创程序
- matlab图片批量预处理并保存为mat数据
- 地震滤波1.m
- 多层水平介质.m
- 基于天牛须搜索算法优化BP神经网络
- BUCK电路基于matlabpwm 闭环反馈
- 反激变换器基于matlab
- matlab实现中值滤波去除脉冲噪声
- 机器学习-线性回归matlab代码已检验正
- Matlab实现Hu不变矩特征
- retinex的matlab程序
评论
共有 条评论