Batchalign and Faq how are T contributions calculated: Difference between pages

From Eigenvector Research Documentation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Scott
 
imported>Lyle
(Created page with "===Issue:=== How are T-contributions calculated? ===Possible Solutions:=== In PCA, T-contributions represent how the original variables contribute to give each sample its T...")
 
Line 1: Line 1:
===Purpose===
===Issue:===


Convert data columns based on matching ref col to target vector.
How are T-contributions calculated?


===Synopsis===
===Possible Solutions:===


:aligned = batchalign(data,ref_column,target,options)
In PCA, T-contributions represent how the original variables contribute to give each sample its T^2 value in a given model. They are calculated as if you are reconstructing the data (relative to the mean of the calibration data) except that each factor is first normalized by the variance it captured in the original data. This gives the reconstruction of the data as if all principal components captured equal amounts of variance in the original data. In other words: this is how the original variables project into the normalized multivariate space of the model.


===Description===
To calculate the T-contributions for a given sample in a PLS_Toolbox PCA model, use the tconcalc function. Given the sample's data in variable data and the model in variable model, the following will calculate T-contributions.


Stretch or contract data columns based on a reference (target) using given 'method'. Savgol options can be used to exaggerate transitions in data prior to cow.
[[Category:FAQ]]
 
====Inputs====
 
* '''data''' = (nsample, nvar) dataset or double array containing data columns to align.
 
* '''ref_column''' =  scalar indicating the column # of data that we are going to match OR ref_vector which is a vector to use in match.
 
* '''target''' = (nsample, 1) vector or dataset to which we are trying to match the ref_column or ref_vector.
 
====Outputs====
 
* '''aligned''': dataset or double array (depending on input data type) containing the aligned data. If it is a dataset of different number of rows from input then the class, axisscale and labels are set according to the closest row in input dataset.
 
===Options===
''options'' =  a structure array with the following fields:
 
* '''method''': [ 'linear' | {'cow'} | 'padwithnan' ] Alignment method.
 
* '''savgolwidth''': Number of points in savgol filter.
* '''savgolorder''': Order of savgol polynomial.
* '''savgolderiv''': [0,1,2...] Order of derivative to take of target and ref_column before doing alignment (default = 0).
[[cow|Cow]] only options.
* '''cow.segments ''': number of segments.
* '''cow.slack''': max range of warping.
* '''cow.plots''': Governs plotting with COW (0 = no plots).
* '''cow.correlationpower''': correlation power.
* '''cow.forceequalsegs''': Force equal segment lengths in "xt" and "xP".
* '''cow.fixmaxcorrection''': Fix maximum correction.
 
===See Also===
 
[[alignmat]], [[cow]], [[matchrows]]

Revision as of 08:57, 21 November 2018

Issue:

How are T-contributions calculated?

Possible Solutions:

In PCA, T-contributions represent how the original variables contribute to give each sample its T^2 value in a given model. They are calculated as if you are reconstructing the data (relative to the mean of the calibration data) except that each factor is first normalized by the variance it captured in the original data. This gives the reconstruction of the data as if all principal components captured equal amounts of variance in the original data. In other words: this is how the original variables project into the normalized multivariate space of the model.

To calculate the T-contributions for a given sample in a PLS_Toolbox PCA model, use the tconcalc function. Given the sample's data in variable data and the model in variable model, the following will calculate T-contributions.