Skip to content

LorenzoF6/PLS_Algorithm_Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation in MATLAB of the PLS algorithm for classification

GitHub repo size GitHub top language GitHub GitHub release (latest by date)

Authors

  • FERRARI Lorenzo, postgraduate in Computer Engineering at University of Bergamo.
  • LEONI Lorenzo, postgraduate in Computer Engineering at University of Bergamo.

Description

Implementation of the discriminant PLS algorithm through a MATLAB class. It provides the following features:

  • estimation of a PLS model by using the NIPALS algorithm, both PLS1 and PLS2 versions;
  • validation of the estimated model by providing not only the test MCE for each class, but also the test confusion matrix;
  • cross-validation to find the best reduction order;
  • graphing of the matrix T for orders 1, 2, and 3;
  • classification of new data;

Moreover, PLS.m can also estimate a PCA model, therefore it is possible to compare it with PLS.

Installation

It is enough to put PLS.m in your working directory and methods of this MATLAB class will be ready to be called in your script.

Coding example

Data_analysis.mlx contains an example of how this MATLAB class can be used to solve a classification problem by using the PLS algorithm. In particular, the covered problem deals with steel plates fault detection. The source dataset is available on Kaggle.

Results plotting

The following graphs summarize some results of the data analysis:

plot1

plot2

plot3

plot4