MCR Contrast Constraint and Evri faq: Difference between pages

From Eigenvector Research Documentation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Jeremy
 
imported>Lyle
 
Line 1: Line 1:
This page discusses use of the contrast constraint for Multivariate Curve Resolution ([[Mcr|MCR]]) by Alternating Least Squares ([[als|ALS]]). More information on MCR can be found on the function pages discussing [[mcr|MCR]] and [[als|ALS]] as well as in the chemometrics tutorial.
__TOC___
==Importing / Exporting==


===Introduction===
[[faq_concatenate_multiple_files|How do I concatenate multiple files into a single DataSet?]]


When resolving mixture data into pure component spectra and their contributions, a range of solutions are possible. In order to narrow down or eliminate some solutions, constraints are used in MCR. The requirement of positivity (non-negativity) is the most widely used constraint.
[[faq_create_multivariate_image_from_separate_images|How do I create a multivariate image from separate images?]]


The solution obtained from MCR is also influenced by the starting estimate. For example, when samples of the expected pure components are likely present in the data set, you initialize the MCR process with the "most pure" spectra available in the data set. This is done by having the MCR option "initmode" set to 1, for rows (the default). This selects the most pure samples to initialize the algorithm. In this way, you obtain resolved spectra with a maximum contrast.
[[faq_export_PCA_scores_and_loadings_to_text_file|How do I export PCA scores and loadings to a text file (to read into MS Excel, for example)?]]


Conversely, when pure variables (variables with contributions from only one of the components in the mixtures) are likely, for example in mass spectrometry, the option "initmode" can be changed to 2 (columns), leading to selection of more pure variables as an initial guess and, thus, maximum contrast in the spectra.
[[faq_import_three-way_data|How do I import three-way data into Solo or PLS_Toolbox?]]


The problem is that, even with the proper initialization and non-negativity constraints, the solution often does not show expected maximum contrast (in spectra or contributions). This is because there are still many possible solutions which meet the required criteria. This is often described as saying that the feasiable bounds of the problem are large. The "contrast" constraint can be used to help solve this problem and provide a more desired solution.
[[faq_import_horiba_NGC_64bit |Why can't I import a Horiba NGC file on my 64-bit computer?]]


===Example of Use===
[[faq_SPCREADR_cant_read_multiple_files |Why can't SPCREADR read multiple files I've selected?]]


The contrast constraint can be demonstrated with energy dispersive X-ray spectrometry (EDS) of a sample described in Figure 1. For complete details about the new constraint and the data analysis example shown below (fully discussed in reference '''(1)''').
[[faq_some_EXCEL_files_fail_to_import |Why do some Excel files fail to import?]]


:[[File:c:\data\image\Picture1.jpg]]
==General==
:'''Figure 1.''' (a) An SEM image of the wires sample consisting of metal wires embedded in an epoxy matrix, together with the composition key. (b) The mean EDS spectrum computed from the data set. A 1024-channel spectrum was acquired each pixel in the 128-pixel x 128-pixel image (c) A single-pixel spectrum from the Cu/Mn/Ni wire.


In order to reduce to the noise and speed up calculations the data set was reduced image was calculated by averaging 3×3 block of pixels. The goal of MCR analysis is to discriminate the six alloys, which should lead to six resolved components with each a row of replicate samples. In other words, we want images (contributions with maximum contrast).  Analysis of this sample with MCR with its default settings results in 8 components: in addition to the six components there are two background components, see Figure 2 under MCR.
[[faq_PARALIND_in_PLS_Toolbox |Can I do PARALIND in PLS_Toolbox?]]


:
[[faq_install_on_more_than_one_PC | Can I install PLS_Toolbox (or Solo) on more than one PC, such as on my desktop and laptop computer?]]
:'''Figure 2.''' The resolved images and spectra of regular MCR and of MCR with contribution contrast. The results are ordered to show the subsequent alloys.


Although 5 of the 6 images of the MCR results show single alloys, the first image is more complex. The highest contribution in the first image is Cu, the other two sets of replicates of alloys also contain a high amount of Cu: 83% an70%. Although this obviously reflects the proper relation between the samples it does not show the relation we want: single alloys. In order obtain maximum contrast MCR is called again with contrast option set to "a" (automatic).
[[faq_multiple_class_sets_together_in_SIMCA_PLSDA_LDA | Can I use multiple class sets (categorical variables) together in a SIMCA, PLSDA, or LDA model?]]


As the results under image contrast show, this achieves the goal of separating the alloys. For more examples, including enhancing contrast in the resolved spectra, see reference '''(1)'''.
[[faq_more_info_on_R_Squared_statistic | Can you give me more information on the R-Squared statistic?]]


:'''(1)''' M.R. Keenan, “Multivariate Analysis of Spectral Images Composed of Count Data” in Techniques and applications of hyperspectral image analysis, H.F. Grahn and P.  Geladi, Eds (Wiley, Chichester, UK, 2007)  , pp. 89-126.
[[faq_how_RMSEC_and_RMSECV_related to R2Y_and_Q2Y_seen_other_software | How are RMSEC and RMSECV related to R2Y and Q2Y I see in other software?]]


===Using Contrast in the Analysis Window===
[[faq_convergence_of_PARAFAC| Convergence of PARAFAC. How much variation between models is expected a particular PARAFAC is fit multiple times with the same settings?]]


To use the contrast option in the Analysis window, modify the Methods Options (see [[AnalysisWindow_Toolbar]] ) and choose either "s" (spectral contrast), "c" (contributions contrast), or "a" (automatic) for the <tt>alsoptions.contrast</tt> option.
[[faq_does_software_stop_working_if_maintenance_expires | Does the software stop working if my maintenance expires?]]


===Using Contrast with Command-line Functions===
[[faq_report_a_problem_with_PLS_Toolbox | How and where do I report a problem with PLS_Toolbox?]]


To use the contrast option from the Matlab command line with PLS_Toolbox, use the <tt>alsoptions.contrast</tt> option in [[MCR]] (or the <tt>contrast</tt> option in [[ALS]])
[[faq_how_are_T_contributions_calculated | How are T-contributions calculated?]]


<pre>
[[faq_how_are_ROC_curves_calculated_for_PLSDA | How are the ROC curves calculated for PLSDA?]]
>> options=mcr('options');
>> options.alsoptions.contrast='a';
</pre>


MCR will achieve contrast in the current initmode, which is 1.
[[faq_how_are_error_bars_calculated_regression_model | How are the error bars calculated for a regression model and can they be related to a confidence limit (confidence in the prediction)?]]


[[faq_improve_performance_with_PLS_Toolbx_and_Matlab_on_Mac | How can I improve performance with PLS_Toolbox and Matlab on the Mac platform?]]


===Algorithm===
[[faq_assign_classes_for_samples_in_a_DataSet | How do I assign classes for samples in a DataSet?]]


When maximum contrast in spectra needs to be achieved, the angle between their vectors is maximal. So by manipulating angles, contrast can be achieved. The constraint works by adding small amounts of a unit vector to either the concentrations or the spectra, depending on which mode of contrast is desired. This has the effect of pushing the opposite mode's recovered components to have as big an angle as possilbe (be as different as possible = high contrast).
[[faq_build_a_classification_model_from_class_set_other_than_the_first | How do I build a classification model from a class set other than the first?]]
 
[[faq_choose_between_different_cross_validation_leave_out_options | How do I choose between the different cross-validation leave-out options?]]
 
[[faq_reference_Eigenvector| How do I cite/reference Eigenvector?]]
 
[[faq_interpret_ROC_curves_and_Sensitivity_Specificity_plots_from_PLSDA | How do I interpret the ROC curves and Sensitivity / Specificity plots from PLSDA?]]
 
[[faq_make_DataSet_backwards_compatible | How do I make a DataSet backwards compatible?]]
 
[[faq_obtain_or_use_recompilation_license_for_PLS_Toolbox | How do I obtain or use a recompilation license for PLS_Toolbox?]]
 
[[faq_use_custon_cross_validation_option | How do I use the "custom" cross-validation option?]]
 
[[faq_out_of_memory_error_when_analyzing_data | I keep getting "out of memory" errors when analyzing my data. What can I do?]]
 
[[faq_java_lang_OutOfMemoryError| What can I do if I get a java.lang.OutOfMemoryError error?]]
 
[[faq_why_get_negative_scores_when_all_modes_are_set_to_nonnegativity | Nonnegativity (PARAFAC, PARAFAC2, Tucker): Why do I get negative scores when all modes are set to nonnegativity?]]
 
[[faq_what_are_relative_contributions | What are "Relative Contributions"?]]
 
[[faq_what_are_reduced_T^2_and_Q_Statistics | What are the "Reduced" T^2 and Q Statistics?]]
 
==Command Line==
==Manual==
==GUI==
==Installation==
 
 
 
 
 
 
 
[[Category:FAQ]]

Revision as of 14:25, 29 November 2018

_

Importing / Exporting

How do I concatenate multiple files into a single DataSet?

How do I create a multivariate image from separate images?

How do I export PCA scores and loadings to a text file (to read into MS Excel, for example)?

How do I import three-way data into Solo or PLS_Toolbox?

Why can't I import a Horiba NGC file on my 64-bit computer?

Why can't SPCREADR read multiple files I've selected?

Why do some Excel files fail to import?

General

Can I do PARALIND in PLS_Toolbox?

Can I install PLS_Toolbox (or Solo) on more than one PC, such as on my desktop and laptop computer?

Can I use multiple class sets (categorical variables) together in a SIMCA, PLSDA, or LDA model?

Can you give me more information on the R-Squared statistic?

How are RMSEC and RMSECV related to R2Y and Q2Y I see in other software?

Convergence of PARAFAC. How much variation between models is expected a particular PARAFAC is fit multiple times with the same settings?

Does the software stop working if my maintenance expires?

How and where do I report a problem with PLS_Toolbox?

How are T-contributions calculated?

How are the ROC curves calculated for PLSDA?

How are the error bars calculated for a regression model and can they be related to a confidence limit (confidence in the prediction)?

How can I improve performance with PLS_Toolbox and Matlab on the Mac platform?

How do I assign classes for samples in a DataSet?

How do I build a classification model from a class set other than the first?

How do I choose between the different cross-validation leave-out options?

How do I cite/reference Eigenvector?

How do I interpret the ROC curves and Sensitivity / Specificity plots from PLSDA?

How do I make a DataSet backwards compatible?

How do I obtain or use a recompilation license for PLS_Toolbox?

How do I use the "custom" cross-validation option?

I keep getting "out of memory" errors when analyzing my data. What can I do?

What can I do if I get a java.lang.OutOfMemoryError error?

Nonnegativity (PARAFAC, PARAFAC2, Tucker): Why do I get negative scores when all modes are set to nonnegativity?

What are "Relative Contributions"?

What are the "Reduced" T^2 and Q Statistics?

Command Line

Manual

GUI

Installation