bckprpnn.m

来自「偏最小二乘算法在MATLAB中的实现」· M 代码 · 共 23 行

M
23
字号
function [upred,usig]=bckprpnn(t,kin,beta);
%BCKPRPNN Calculates backpropagation network output for NNPLS
% The inputs are the input to the network (t), the input weights (kin)
% and the output weights and biases on the sigmoids (beta). Note that
% the first element of (beta) is the bias on the output. The outputs
% are the predictions from the model, upred, and outputs of the sigmoids
% plus the bias (usig). The I/O syntax is
% [upred,usig] = bckprpnn(t,kin,beta);

%  Copyright
%  Thomas Mc Avoy
%  1994
%  Distributed by Eigenvector Technologies
%  Modified by BMW 5-8-95
[m1,m2]=size(t);
T=[ones(m1,1),t];
Z=T*kin;
sig=[(1-exp(-Z))./(1+exp(-Z))];
usig=[ones(size(t),1),sig];
% usig equals the output of sigmoids plus a bias
upred=usig*beta;
% upred is the predicted u output

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?