Bayesian regularization of neural network (Effective # param)

3 次查看(过去 30 天)
I wrote a code to perform Bayesian regularization of neural network using the neural network material by Martin T Hagan.
My code gives similar results with that of matlab for performance, sum squared parameter, but fails to give the same value for Effective number of parameter.
The formular i used for effective number of parameter is n - 2(alpha * trace_of_inverse_of_hessian_matrix) as described in the book.
My question is: what equation or formular does matlab use in estimating the effective number of parameter?
  1 个评论
uhunoma
uhunoma 2019-2-19
%%The matlab test to verify my code is given below:
x = -1:0.05:1;
t = sin(2*pi*x);% + 0.1*randn(size(x));
net = feedforwardnet(1,'trainbr');
net.trainParam.epochs = 1;
net.trainParam.mu = 0.01;
net = configure(net, x, t );
wb = getwb(net);
Nw=net.numWeightElements;
net = setwb(net,ones(Nw,1));
net.divideParam.trainRatio = 1;
net.divideParam.valRatio = 0;
net.divideParam.testRatio = 0;
net.iw{1,1}
net.b{1}
net.layers{1}.transferFcn = 'logsig';
net.layers{2}.transferFcn = 'logsig';
net = train(net,x,t)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Pattern Recognition and Classification 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by