Class SIMPLS

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.core.TechnicalInformationHandler, Serializable, weka.core.CapabilitiesHandler, GenericPLSMatrixAccess

    public class SIMPLS
    extends AbstractSingleClassPLS
    Implementation of SIMPLS algorithm.

    Available matrices: W, B

    For more information see:

    Tormod Naes, Tomas Isaksson, Tom Fearn, Tony Davies (2002). A User Friendly Guide to Multivariate Calibration and Classification. NIR Publications.

    S. de Jong (1993). SIMPLS: an alternative approach to partial least squares regression. Chemometrics and Intelligent Laboratory Systems. 18:251-263.

     @book{Naes2002,
        author = {Tormod Naes and Tomas Isaksson and Tom Fearn and Tony Davies},
        publisher = {NIR Publications},
        title = {A User Friendly Guide to Multivariate Calibration and Classification},
        year = {2002},
        ISBN = {0-9528666-2-5}
     }
    
     @article{Jong1993,
        author = {S. de Jong},
        journal = {Chemometrics and Intelligent Laboratory Systems},
        pages = {251-263},
        title = {SIMPLS: an alternative approach to partial least squares regression},
        volume = {18},
        year = {1993}
     }
     


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -preprocessing-type <NONE|CENTER|STANDARDIZE> (property: preprocessingType)
        The type of preprocessing to perform.
        default: CENTER
     
    -replace-missing <boolean> (property: replaceMissing)
        Whether to replace missing values.
        default: false
     
    -num-components <int> (property: numComponents)
        The number of components to compute.
        default: 20
        minimum: 1
     
    -prediction-type <NONE|ALL|EXCEPT_CLASS> (property: predictionType)
        The type of prediction to perform.
        default: NONE
     
    -num-coefficients <int> (property: numCoefficients)
        The number of coefficients of W matrix to keep (rest gets zeroed); use 0
        to keep all.
        default: 0
        minimum: 0
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_NumCoefficients

        protected int m_NumCoefficients
        the number of coefficients in W to keep (0 keep all).
      • m_W

        protected weka.core.matrix.Matrix m_W
        the W matrix
      • m_B

        protected weka.core.matrix.Matrix m_B
        the B matrix (used for prediction)
    • Constructor Detail

      • SIMPLS

        public SIMPLS()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing this class.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description of the class suitable for displaying in the explorer/experimenter gui
      • getTechnicalInformation

        public adams.core.TechnicalInformation getTechnicalInformation()
        Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
        Specified by:
        getTechnicalInformation in interface adams.core.TechnicalInformationHandler
        Specified by:
        getTechnicalInformation in class AbstractPLS
        Returns:
        the technical information about this class
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractPLS
      • setNumCoefficients

        public void setNumCoefficients​(int value)
        Sets the number of coefficients of W matrix to keep (rest gets zeroed).
        Parameters:
        value - the number of coefficients, 0 to keep all
      • getNumCoefficients

        public int getNumCoefficients()
        returns the number of coefficients of W matrix to keep (rest gets zeroed).
        Returns:
        the maximum number of attributes, 0 to keep all
      • numCoefficientsTipText

        public String numCoefficientsTipText()
        Returns the tip text for this property
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • getMatrix

        public weka.core.matrix.Matrix getMatrix​(String name)
        Returns the matrix with the specified name.
        Specified by:
        getMatrix in interface GenericPLSMatrixAccess
        Specified by:
        getMatrix in class AbstractPLS
        Parameters:
        name - the name of the matrix
        Returns:
        the matrix, null if not available
      • slim

        protected void slim​(weka.core.matrix.Matrix in)
        Zeroes the coefficients of the W matrix beyond the specified number of coefficients.
        Parameters:
        in - the matrix to process in-place
      • doTransform

        protected weka.core.Instances doTransform​(weka.core.Instances data,
                                                  Map<String,​Object> params)
                                           throws Exception
        Transforms the data, initializes if necessary.
        Specified by:
        doTransform in class AbstractPLS
        Parameters:
        data - the data to use
        params - additional parameters
        Returns:
        the transformed data
        Throws:
        Exception