⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nnplsprd.m

📁 偏最小二乘算法在MATLAB中的实现
💻 M
字号:
function ynpred=nnplsprd(W12,W23,B2,B3,x)
%NNPLSPRD Predictions using collapsed NNPLS model
% This program uses the collapsed NNPLS model to predict the responses
% of a new x block. The inputs are the the input to hidden layer weights 
% (W12), hidden layer to output weigts (W23), hidden layer biases (B2), 
% output bias (B3) and new x-block (x). The output is the new y-block
% predictions (ynpred). The I/O syntax is:
% ynpred=nnplspred(W12,W23,B2,B3,x)
[nx,mx]=size(x);
for i=1:nx
	yt(i,:)=(x(i,:)*W12'+B2);
end;
yt=[(1-exp(-yt))./(1+exp(-yt))];
for i=1:nx
	ynpred(i,:)=(yt(i,:)*W23+B3);
end;



⌨️ 快捷键说明

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