Preprouser

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Purpose

Enables user-defined items to be added to the preprocess catalog.

Synopsis

preprouser(fig)

Description

Each method available in the preprocess function has an associated 'methodname' such as those listed in the help for preprocess. Each method is defined using a preprocessing structure that contains all the necessary information to perform calculations for that method. The standard methods are defined in the preprocatalog file, which should not be edited by the user. Additional user-defined methods can be defined in the preprouser file and the following text describes how the user can add custom preprocessing methods. A few example methods already exist in the preprouser file to guide the user. In addition, details of the structure are given on the User Defined Preprocessing page. Note, standard preprocessing methods cannot change the dimension of the data being processed, nor the include fields if it is a dataset. This is a PLS_Toolbox convention and must also apply to custom user-defined preprocessing methods.

To add a custom user-defined preprocessing method, the user must

  1. open the PREPROUSER.M file
  2. edit the file to create a structure
  3. after defining the structure, add the line preprocess('addtocatalog',fig,usermethod)
  4. save and close the PREPROUSER.M file.

The line added in Step 3

 preprocess('addtocatalog',fig,usermethod)

makes the new custom method available to preprocess. The input usermethod is the preprocessing structure containing the user-defined method, and fig is a figure handle passed to PREPROUSER by preprocess.

The methods defined in the preprocatalog and preprouser files are available to all functions making use of the preprocess function.

Note that once a method is defined, a copy of that preprocessing method can be saved to a MAT file which can be loaded and used in another user's PLS_Toolbox, Solo, or Solo_Predictor without having to define the preprocessing structure themselves.

See Also

preprocess