rbfpls.m

% --------------------------------------------------------------------------------
% Function: [yp,ytp,final,RBFmodels,x]=rbfpls(xm,ym,xt,yt,sigma,scale,h,iter,lout)
% --------------------------------------------------------------------------------
% Aim:
% Radial Basis Functions Partial Least Squares, RBF-PLS 
% --------------------------------------------------------------------------------
% Input: 
% xm, matrix (n,p), predictor matrix
% ym, vector (n,1), predictand
% xt, matrix (nt,p), predictor matrix (test set, if available, else [])
% yt, vector (nt,1), predictand (test set, if available, else [])
% sigma, vector (1,3), specifying widths of Gaussians to test 
% (e.g. [0.1 0.1 1] starting from 0.1 with step 0.1 till 1)
% scale, scalar, scaling the data (1/Yes or 0/No)
% h, scalar, maximal number of factors in RBF-PLS (e.g. 10)
% iter, scalar, number of iteration for Cross-Validation. If ~=0 then Monte
% Carlo Cross-Validation is performed, if empty or equal to 1, classical
% leave-(lout)-Cross-Validation
% lout, scalar, number of objects left out in the Cross-Validation course
% --------------------------------------------------------------------------------
% Output: 
% yp, vector (n,1), predicted response for model set
% ytp, vector (nt,1), predicted response for test set
% final, vector, 
% -> calibration settings: 
% model set [sigma h rms rmsecv]
% test set [sigma h rms rmsecv rmsep]
% -> classification settings:
% model set [sigma h rms rmsecv cmm ccrcv]
% test set [sigma h rms rmsecv rmsep cmm ccrcv ccrtest]
%   where:
%   - sigma is the Gaussian width
%   - h is the number of factors in the model
%   - rms is the Root Mean Squared Error
%   - rmsecv is the Root Mean Squared Error of Cross-Validation
%   - rmsep is the Root Mean Squared Error of Prediction
%   - cmm is percent of correctly classified objects from model set
%   - ccrcv is percent of correctly classified objects from model set based
%   on Cross-Validation
%   - ccrtest is percent of correctly classified objects from test set
% RBFmodels, matrix (nm,3), containing the results for all RBF-PLS models
% x, matrix (n,n), activation of the RBFs
% --------------------------------------------------------------------------------
% Example: 
% [yp,ytp,final,RBFmodels,x]=rbfpls(xm,ym,xt,yt,[.1 .1 1],1,10,200,100)
% --------------------------------------------------------------------------------
% Reference:
% [1] B. Walczak, D. L. Massart, The Radial Basis Functions - Partial Least
% Squares approach as a flexible non-linear regression technique, Analytica 
% Chimica Acta 331 (1996) 177-185
% [2] B. Walczak, D. L. Massart, Application of Radial Basis Functions - Partial 
% Least Squares to non-linear pattern recognition problems: diagnosis of process
% faults, Analytica Chimica Acta 331 (1996) 187-193
Valid CSS! Valid HTML 4.01!