Constrainfit and Evri faq: Difference between pages

From Eigenvector Research Documentation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Rasmus
No edit summary
 
imported>Lyle
 
Line 1: Line 1:
===Purpose===
__TOC___
==Importing / Exporting==


Finds A minimizing ||X-A*B'|| subject to constraints, given the small matrices ('''X''' ' '''B''') and ('''B''' ' '''B''')
[[faq_concatenate_multiple_files|How do I concatenate multiple files into a single DataSet?]]


===Synopsis===
[[faq_create_multivariate_image_from_separate_images|How do I create a multivariate image from separate images?]]


[A]=constrainfit(XB,BtB,Aold);  % Unconstrained
[[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)?]]


:  '''Setting global constraints on A'''
[[faq_import_three-way_data|How do I import three-way data into Solo or PLS_Toolbox?]]
:  opt = constrainfit('options');
:  opt.type='nonnegativity';
[A]=constrainfit(XB,BtB,Aold,opt); % Nonnegative


:  '''Setting constraints on just one column of A'''
[[faq_import_horiba_NGC_64bit |Why can't I import a Horiba NGC file on my 64-bit computer?]]
:  opt = constrainfit('options');
:  opt.type='columnwise';
:  opt.columnconstraints={0;2;0}; % If three columns
:  [A]=constrainfit(XB,BtB,Aold,opt); % Second column unimodal


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


CONSTRAINTFIT solves the least squares problem behind bilinear, trilinear and other multilinear models. Assuming a model '''X''' = '''A'''*'''B''' ' and assuming that '''X''' and '''B''' are known, the least squares estimate of '''A''' is obtained. Rather than using '''X''' and '''B''' this algorithm uses the cross product matrices ('''X''' ' '''B''') and ('''B''' ' '''B''') which are generally smaller and less memory-demanding especially in multi-way models.
[[faq_some_EXCEL_files_fail_to_import |Why do some Excel files fail to import?]]


CONSTRAINFIT can do a number of general types of regression problems such as nonnegativity-constrained regression, regression with column-orthogonality of '''A''' etc. These constraints are simply set in the option field 'type', e.g. option.type='nonnegativity'. Thus, for most problems, only the 'type' field needs to be set. CONSTRAINFIT will provide a least squares solution to most of these problems.
==General==


CONSTRAINFIT can also find '''A''' subject to different constraints on different columns. In this case, the update of '''A''' will be an improvement of the initially provided estimate '''Aold'''. As CONSTRAINFIT is used inside iterative algorithms, an improvement is sufficient to guarantee overall convergence.
[[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?]]


====Inputs====
[[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?]]
* '''XB''' = This is the matrix '''X''' ' '''B'''.
* '''BtB''' = This is the matrix '''B''' ' '''B'''.
* '''Aold''' = An initial estimate of '''A'''.


====Optional Inputs====
[[faq_more_info_on_R_Squared_statistic | Can you give me more information on the R-Squared statistic?]]
* '''options''' = provides definitions for which type of constraint to impose.


====Outputs====
[[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?]]
* '''A''' = The improved estimate of '''A'''.


===Options===
[[ 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?]]


options =  a structure array with the following fields:
[[ faq_does_software_stop_working_if_maintenance_expires | Does the software stop working if my maintenance expires?]]


* '''plots''': [ {'none'} | 'final' ] governs plotting of results, and
==Command Line==
* '''order''': positive integer for polynomial order {default = 1}.
==Manual==
==GUI==
==Installation==


===Example===


<pre>
>>This is an example
Error: does not exist
</pre>


===See Also===


[[baselinew]], [[deresolv]]
 
 
 
[[Category:FAQ]]

Revision as of 08:21, 21 November 2018