Class SparsePLS

  • 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 SparsePLS
    extends AbstractSingleClassPLS
    Nonlinear Iterative Partial Least Squares (SparsePLS).
    Automatically standardizes X and Y internally.

    For more information see:
    Chun H, Keles S. (2010). Sparse partial least squares regression for simultaneous dimension reduction and variable selection. Royal Statistical Society Series B, Statistical Methodology. 1:3-25. URL https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2810828/

     @article{ChunH2010,
        author = {Chun H, Keles S.},
        journal = {Royal Statistical Society Series B, Statistical Methodology},
        pages = {3-25},
        title = {Sparse partial least squares regression for simultaneous dimension reduction and variable selection},
        volume = {1},
        year = {2010},
        URL = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2810828/}
     }
     


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -preprocessing-type <NONE|CENTER|STANDARDIZE> (property: preprocessingType)
        The type of preprocessing to perform.
        default: NONE
     
    -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
     
    -tol <double> (property: tol)
        The inner NIPALS loop improvement tolerance.
        default: 1.0E-7
        minimum: 0.0
     
    -max-iter <int> (property: maxIter)
        The inner NIPALS loop maximum number of iterations.
        default: 500
        minimum: 1
     
    -lambda <double> (property: lambda)
        The sparsity parameter; determines sparseness.
        default: 0.5
        minimum: 0.0
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_SparsePLS

        protected com.github.waikatodatamining.matrix.algorithm.pls.SparsePLS m_SparsePLS
        the actual algorithm.
      • m_Tol

        protected double m_Tol
        Inner NIPALS loop improvement tolerance
      • m_MaxIter

        protected int m_MaxIter
        Inner NIPALS loop maximum number of iterations
      • m_Lambda

        protected double m_Lambda
        Sparsity parameter. Determines sparseness.
    • Constructor Detail

      • SparsePLS

        public SparsePLS()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the 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
      • setTol

        public void setTol​(double value)
        Sets the inner NIPALS loop improvement tolerance.
        Parameters:
        value - the tolerance
      • getTol

        public double getTol()
        Returns the inner NIPALS loop improvement tolerance.
        Returns:
        the tolerance
      • tolTipText

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

        public void setMaxIter​(int value)
        Sets the inner NIPALS loop maximum number of iterations.
        Parameters:
        value - the maximum
      • getMaxIter

        public int getMaxIter()
        Returns the NIPALS loop maximum number of iterations.
        Returns:
        the maximum
      • maxIterTipText

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

        public void setLambda​(double value)
        Sets sparsity parameter; determines sparseness.
        Parameters:
        value - the lambda
      • getLambda

        public double getLambda()
        Returns the sparsity parameter; determines sparseness.
        Returns:
        the lambda
      • lambdaTipText

        public String lambdaTipText()
        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
      • 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