Clsti model builder: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
Line 114: Line 114:
==Applying a CLSTI Model==
==Applying a CLSTI Model==


A CLSTI model can be applied to new data by loading it into the CLSTI Analysis interface.
A CLSTI model can be applied to new data by loading it into the CLSTI Analysis interface. The model can be loaded by:
 
*Right clicking on the Model block and selecting Load model
*Using the '''Send to Analysis window''' icon in the CLSTI Model Builder interface
 
Hovering over the model block will show some details of the CLSTI model. For example, the number of pure components, the pure component names, and the included variables.
 
[[Image: Clsti_analysis_model_loaded.png | 500px]]
 
A CLSTI model differs from other model types in that the calibrated CLSTI model has no scores or loadings to plot, thus those buttons are disabled when the model has not been applied and there is no prediction object.
 
===Load Test Data===
 
Test data can be formatted in various ways:
 
#'''In the X Block:''' A DataSet Object of test spectra and the corresponding temperatures in the axis scale set 1 for the rows (mode 1), or
#'''In the X Block:''' A DataSet Object of test spectra, and '''In the Temp Block: '''a vector of corresponding temperatures
 
Once test data has been loaded, click on the '''Gears''' icon or Prediction block to apply the model to the test data.
 
[[Image: Clsti_analysis_prediction_ready.png | 600px]]


==Load CLSTI Model==
==Load CLSTI Model==

Revision as of 14:34, 6 December 2023

CLSTI Model Builder How To

This page describes how to use the CLSTI Model Builder interface.

Empty CLSTI Model Builder interface

This interface can be accessed by:

  • From the MATLAB command line, use the commands:
    • clsti('builder'), or
    • clsti_gui
  • From the CLSTI Analysis interface:
    • Click on the Open CLSTI Model Builder button

CLSTI Analysis Interface.png

Load Data

Follow these steps to load pure component data to use to build a CLSTI model:

  1. Use the CLSTI Model Builder plus.png button to add an empty Component tab.
  2. Right click on the new tab and choose the appropriate format to load your data. Choose from:
    • Definition file, or
    • DataSet Object

CLSTI Model Builder load data cropped.png

Definition File

Definition files must be formatted in a specific way for the import to work correctly. They must be in .csv, .txt, or .xlsx format and consist of two columns, where the fist column contains in the file names corresponding the data files and the second column contains the temperatures at which that pure component spectrum was collected. Here is an example definition file for Acetone in .csv format:

  Acetone,
  Acetone_25C.spc,25
  Acetone_40C.spc,40
  Acetone_55C.spc,55
  Acetone_70C.spc,70

Important things to note:

  • The pure component name should be in the fist element (row 1, column 1) of the definition file
  • It is recommended that the data files (Acetone_25C.spc, etc.) be in the same folder as the definition file
    • If not in the same folder then the file names should include the full path to the data file (example: myFolder1/myFolder2/Acetone_25C.spc)

DataSet Object

DataSet Objects must also be configured in a specific way for importing to work correctly. It is expected that the pure component temperatures are in the first axis scale set of the rows (mode 1). Example:

Clsti pureAcetone DSO.png

Important note: If variable selection is not performed using the Variable Selection button, then the variables used in the model will correspond to the included variables in the first DSO that is loaded.

Successfully Loaded Pure Component Tab

When pure component data has been successfully loaded, the interface will look like this:

Clsti model builder acetone loaded.png

where the Build Model, Variable Selection, and Clsti model builder minus.png buttons are enabled. Use the Clsti model builder minus.png button to remove the currently selected tab. The Overview tab cannot be removed.

The Open button can be used to open the pure component data in a DataSet Editor which can be useful for plotting.

Overview Tab

The Overview tab shows all loaded pure components and included temperatures. Here is an example of the Overview tab after loading a second component, Ethanol:

Clsti overview tab.png

Removing a pure component tab will remove the component from the Overview tab.

The Open button will open a DataSet Editor containing all pure component data.

Include/Exclude Pure Component Samples

On each pure component tab there is a column for setting what samples (pure component at certain temperatures) to include in the model building process. Unchecking a sample will exclude it from the model. Here is an example of excluding the pure component spectrum for Acetone at 40C and the corresponding Overview tab with that temperature removed:

If loading a DataSet Object that has samples excluded, the pure component tab will preserve that exclusion.

Variable Selection

Use the Variable Selection button to the select the variables to include in the model building process.

Use the selection tools in the toolbar to perform the variable selection:

  • The left most button will include only the variables that are selected
  • The next button (with the plus sign) will add selected variables to the currently included variables
  • The next button (with the minus sign) will remove the selected variables from the included variables
  • The green check mark will accept the changes and close the figure

When hovering over the Variable Selection button a info box will appear showing the currently included region.

Build CLSTI Model

To build a model, click on the light green Build Model button. The button will turn a dark green and the Save Model and Send Model to Analysis window icons will become enabled.

Clsti model builder model built.png

Save Model

Use the Save Model button to save the model.

Send to Analysis

Use the Send Model to Analysis window to send the model to the CLSTI Analysis window and use for applying to new data.

Applying a CLSTI Model

A CLSTI model can be applied to new data by loading it into the CLSTI Analysis interface. The model can be loaded by:

  • Right clicking on the Model block and selecting Load model
  • Using the Send to Analysis window icon in the CLSTI Model Builder interface

Hovering over the model block will show some details of the CLSTI model. For example, the number of pure components, the pure component names, and the included variables.

Clsti analysis model loaded.png

A CLSTI model differs from other model types in that the calibrated CLSTI model has no scores or loadings to plot, thus those buttons are disabled when the model has not been applied and there is no prediction object.

Load Test Data

Test data can be formatted in various ways:

  1. In the X Block: A DataSet Object of test spectra and the corresponding temperatures in the axis scale set 1 for the rows (mode 1), or
  2. In the X Block: A DataSet Object of test spectra, and In the Temp Block: a vector of corresponding temperatures

Once test data has been loaded, click on the Gears icon or Prediction block to apply the model to the test data.

Clsti analysis prediction ready.png

Load CLSTI Model