Faq import three-way data and Vipnway: Difference between pages

From Eigenvector Research Documentation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Bob
No edit summary
 
imported>Scott
No edit summary
 
Line 1: Line 1:
===Issue:===
===Purpose===


How do I import three-way data into Solo or PLS_Toolbox?
Calculate Variable Importance in Projection from NPLS model.


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


'''Solution 1) Built in EEM importers :'''
:vip_scores = vipnway(model)


If applicable to your file type, use one of the built in EEM importers. There are importers for EEM data from Hitachi, Shimazdu, Horiba and Jasco. Please see this wiki entry for more information on [[Data_Importing_Formats | Data Importing Formats]]
===Description===


EEM data needs be configured in a specific way such that:
Variable Importance in Projection (VIP) scores estimate the importance of each variable in the projection used in a NPLS model and is often used for variable selection. A variable with a VIP Score close to or greater than 1 (one) can be considered important in given model. Variables with VIP scores significantly less than 1 (one) are less important and might be good candidates for exclusion from the model. It works for X n-way and Y up to two-way and it assume samples are in the first mode.


* '''mode 1''' corresponds to '''samples'''
====Inputs====


* <div>'''mode 2''' corresponds to '''emission'''</div>
* '''model''' = A NPLS model structure from a NPLS model.


* <div>'''mode 3''' corresponds to '''excitation'''</div>
====Outputs====


The built-in EEM importers will handle this configuration automatically. When importing manually (see below), further manipulation will likely be necessary. Use the Transform &rarr; Permute modes and Transform &rarr; Reshape smenu items to modify your imported data as appropriate.
* '''vip_scores''' = a cell array with dimensions of: [modes 2 to n X # of columns in Y]. The first row in the cell array corresponds to VIP Scores for mode 2. The second row corresponds to VIP Scores for mode 3.


'''Solution 2) For three-way data with few slabs:'''
===See Also===


<ol style="list-style-type:lower-alpha">
[[selectvars]], [[genalg]], [[ipls]], [[plotloads]], [[pls]], [[plsda]], [[sratio]], [[rpls]], [[vip]]
  <li>Import the data slabs into the workspace (browser). The workspace browser is available from the main analysis user interface from the menu item FigBrowser.</li>
  <li>Each slab, i.e. each matrix of data is imported individually. Hence, if you have a '''10x8x3''' array, you will import three slabs each of size '''10x8'''.</li>
  <li>Use the mouse to drag slab two onto slab one. In the window that opens choose Augment and then choose augment in the Slabs direction.</li>
  <li>A two-slab three-way array has now replaced the first data matrix. More slabs can be added in the same fashion.</li>
</ol>
 
Alternatively, you may also open one slab in the dataset editor and then add additional slabs using File &rarr; Import. After selecting the next slab to import, answer the same questions as in step c above. Repeat for each slab.
 
'''Solution 3) For larger three-way data:'''
 
In the DataSet editor, you can import a full three-way array if you have it organized as a two-way matrix. Upon importing the two-way data, you can reshape to a three-way array using the menu item: Transform &rarr; Fold into 3-way.
 
For example, you have the above matrices (three slabs) in one table/matrix:
 
  [ Slab1;
  Slab2;
  Slab3 ]
 
hence have the three slabs below each other. Upon importing, use the menu option described above to "Fold into 3-way" and choose three as the number of slabs and the data will be rearranged accordingly. If you are familiar with the MATLAB function <code>reshape</code>, you may also use Transform &rarr; Reshape for other types of rearrangements.
 
Note: the result of this command will give you slabs in the 3rd mode of the DataSet. If these slabs are separate samples (such as with EEMs), you'll want to use the Transform &rarr; Permute menu to reorder the dimensions. For example, permuting to the order [3 2 1] would swap the order of the 1st and 3rd modes, putting slabs as the first mode.
 
 
'''Still having problems? Please contact our helpdesk at [mailto:helpdesk@eigenvector.com helpdesk@eigenvector.com]'''
 
[[Category:FAQ]]

Revision as of 17:06, 18 December 2018

Purpose

Calculate Variable Importance in Projection from NPLS model.

Synopsis

vip_scores = vipnway(model)

Description

Variable Importance in Projection (VIP) scores estimate the importance of each variable in the projection used in a NPLS model and is often used for variable selection. A variable with a VIP Score close to or greater than 1 (one) can be considered important in given model. Variables with VIP scores significantly less than 1 (one) are less important and might be good candidates for exclusion from the model. It works for X n-way and Y up to two-way and it assume samples are in the first mode.

Inputs

  • model = A NPLS model structure from a NPLS model.

Outputs

  • vip_scores = a cell array with dimensions of: [modes 2 to n X # of columns in Y]. The first row in the cell array corresponds to VIP Scores for mode 2. The second row corresponds to VIP Scores for mode 3.

See Also

selectvars, genalg, ipls, plotloads, pls, plsda, sratio, rpls, vip