📄 perf6.m
字号:
function [pin]=perf6(coefs,x,y,s1,s2,s3);
%
% Calculates the performance index for all
% members of the population
%
% [out]=perf(coefs,x,y,s1,s2,s3);
%
% coefs = decoded parameters
% x = x data
% y = target y data
% s1 = size of input layer
% s2 = size of first hidden layer
% s3 = size of output layer
% pin = matrix of performance indices
%
%
% establish the size of the population
%
[popsize L]=size(coefs);
%
% Go through each population member
%
for i = 1:popsize
%
% Extract the network from the coefficients
%
[w1 b1 w2 b2 f1 f2 f3]=exnet(coefs(i,:),s1,s2,s3);
%
% Filter the inputs
%
net=fil(x,f1);
%
% Propagate the inputs
% SIGMOIDAL TRANSFER
%
net=prop1(net,w1,b1,2,f2);
%
% Propagate through to the ouput layer
% LINEAR TRANSFER
%
net=prop1(net,w2,b2,1,f3);
%
% Evaluate the performance
%
pin(i)=sse(net,y);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -