5.0

5.0 | 5 ratings Rate this file 53 Downloads (last 30 days) File Size: 32.35 KB File ID: #18760
image thumbnail

Partial Least-Squares and Discriminant Analysis

by Yi Cao

 

15 Feb 2008 (Updated 19 Feb 2008)

A tutorial and tool using PLS for discriminant analysis.

| Watch this File

File Information
Description

Patial Least-Squares (PLS) is a widely used technique in various areas. This package provides a function to perform the PLS regression using the Nonlinear Iterative Partial Least-Squares (NIPALS) algorithm. It consists of a tutorial function to explain the NIPALS algorithm and the way to perform discriminant analysis using the PLS function.

The difference between the total least squares regression and partial least squares regression can be explained as follows:

For given independent data X and dependent data Y, to fit a model

Y = X*B + E

the total least squares regression solves the problem to minimize the error in least squares sense:

J = E'*E

Instead of directly fitting a model between X and Y, the PLS decomposes X and Y into low-dimensional space (so called laten variable space) first:

X = T*P' + E0, and
Y = U*Q' + F0

where P and Q are orthogonal matrices, i.e. P'*P=I, Q'*Q=I, T and U has the same number of columns, a, which is much less than the number of columns of X. Then, a least squares regression is performed between T and U:

U = T*B + F1

At the end, the overall regression model is

Y = X*(P*B*Q') + F

i.e. the overall regression coefficient is P*B*Q'.

The reason to perform PLS instead of total LS regression is that the data sets X and Y may contain random noises, which should be excluded from regression. Decomposing X and Y into laten space can ensure the regression is performed based on most reliable variation.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
14 Mar 2008 fielen cathnic

good

23 Jul 2008 kevin chen

it is excellent for a PLS algorithm beginner like me, but, is this non-linear PLS algorithm? or only PLS1?

23 Jul 2008 kevin chen

Are you also interested in the convolution algorithms in Reading's Modulated Differential Scanning Calorimetry? -- I read a lot of books and technical articles, but only got confusion: how to deconvolute the modulated profile into reversible and non-reversible parts?

18 Dec 2008 Su

I have a general question regarding PLS regression that confused me;

Suppose the response variables Y is binary, can we run a PLS regression on it directly? or we need to resort to logistic version?

Thanks

11 Jan 2009 Paul

Su, I believe you can use the PLS algorithm directly. Look at the example discussed in the HTML file - the IRIS data set - where the Y responses are all binary.

05 Apr 2009 V. Poor  
18 Nov 2010 Matlabus Ach

I just did that I have two questions:
what does the number ncomp means and how can we define it?
Then how can use the results to define which variable is important twards the output as I get a matrix with weights.
my X is 220 * 33
my Y is 220 * 1

19 Nov 2010 Yi Cao

ncomp? No such variable in my code.

Yi

18 Apr 2011 Ramy Baly

Hi, I am really wondering how to use this code to predict the response variable. Is it like that:
- I get the BETA values from applying PLS on some training data
- I multiply the BETA with the testing data to get the predicted (Y) ??

or there is a kind of iterations, such as picking only the components with higher BETAs?

Please login to add a comment or rating.
Updates
15 Feb 2008

update description

15 Feb 2008

update the example file.

18 Feb 2008

update description

18 Feb 2008

update pls function

19 Feb 2008

update description

Tag Activity for this File
Tag Applied By Date/Time
linear algebra Yi Cao 22 Oct 2008 09:47:40
pls Yi Cao 22 Oct 2008 09:47:40
pca Yi Cao 22 Oct 2008 09:47:40
nipals Yi Cao 22 Oct 2008 09:47:40
discriminant analysis Yi Cao 22 Oct 2008 09:47:40
linear algebra kiwon Lee 08 Oct 2009 04:31:16
pls Julien 05 Dec 2009 21:55:52
pca alkan alkaya 28 Jan 2010 09:26:44
pls Courosh 02 Sep 2010 19:27:21
pca Yang Kuiyuan 16 Dec 2011 01:35:41

Contact us at files@mathworks.com