Difference between revisions of "Plsrsgcv"

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Jeremy
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
 
===Purpose===
 
===Purpose===
  
Generates a matrix used to calculate residuals from a single data block using partial least squares regression models with cross vaildation.
+
Generates a PLS model for MSPC with cross-validation.
  
 
===Synopsis===
 
===Synopsis===
Line 10: Line 9:
 
===Description===
 
===Description===
  
coeff = plsrsgncv(data,lv,cvit,cvnum) calculates a matrix coeff from a single data block data. plsrsgncv calculates partial least squares regression models of each variable in the matrix data using the remaining variables and cross-validation with random test data blocks. The maximum number of latent variables to consider is lv, the number of test sets is cvit, and the number of samples in each test set is cvnum. Multiplying a new data matrix by the matrix coeff yields a matrix whose values are the difference between the new data and it's prediction based on the PLS regressions created by plsrsgncv.
+
This function constructs a matrix of PLS models that can be used like a PCA model for multivariate statistical process control (MSPC) purposes. Given a data matrix <tt>data</tt>, a PLS model is formed using a maximum of <tt>lv</tt> latent variables that relates each variable to all of the other variables. The PLS model regression vectors are collected in an output matrix <tt>coeff</tt>, which can be used like the <tt>I=PP'</tt> matrix in PCA.
 +
 
 +
Multiplying a new data matrix by the matrix <tt>coeff</tt> yields a matrix whose values are the difference between the new data and it's prediction based on the PLS regressions created by <tt>plsrsgncv</tt>.
 +
 
 +
'''Warning''': This function can take a long time to execute if you choose to do many cross-validations! Execution can be sped up by setting optional variable out=0.
 +
 
 +
====Inputs====
 +
 
 +
* '''data''' = input data matrix
 +
* '''lv''' = maximum number of latent variables to consider
 +
* '''cvit''' = the number of cross-validation test sets
 +
* '''cvnum''' = the number of samples in each cross validation test set
 +
 
 +
====Optional Inputs====
 +
 
 +
* '''out''' = allows the user to suppress intermediate output [out=0 suppresses output]
 +
 
 +
====Outputs====
 +
 
 +
* '''coeff''' = matrix of PLS regression coefficients
  
 
===See Also===
 
===See Also===
  
 
[[plsrsgn]], [[replace]]
 
[[plsrsgn]], [[replace]]

Latest revision as of 14:44, 10 October 2008

Purpose

Generates a PLS model for MSPC with cross-validation.

Synopsis

coeff = plsrsgcv(data,lv,cvit,cvnum,out)

Description

This function constructs a matrix of PLS models that can be used like a PCA model for multivariate statistical process control (MSPC) purposes. Given a data matrix data, a PLS model is formed using a maximum of lv latent variables that relates each variable to all of the other variables. The PLS model regression vectors are collected in an output matrix coeff, which can be used like the I=PP' matrix in PCA.

Multiplying a new data matrix by the matrix coeff yields a matrix whose values are the difference between the new data and it's prediction based on the PLS regressions created by plsrsgncv.

Warning: This function can take a long time to execute if you choose to do many cross-validations! Execution can be sped up by setting optional variable out=0.

Inputs

  • data = input data matrix
  • lv = maximum number of latent variables to consider
  • cvit = the number of cross-validation test sets
  • cvnum = the number of samples in each cross validation test set

Optional Inputs

  • out = allows the user to suppress intermediate output [out=0 suppresses output]

Outputs

  • coeff = matrix of PLS regression coefficients

See Also

plsrsgn, replace