Class NIPALS

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

    public class NIPALS
    extends AbstractSingleClassPLS
    Nonlinear Iterative Partial Least Squares (NIPALS).

    For more information see:
    scikit-learn. Nonlinear Iterative Partial Least Squares (NIPALS). URL https://github.com/scikit-learn/scikit-learn/blob/ed5e127b/sklearn/cross_decomposition/pls_.py#L455

     @misc{missing_id,
        author = {scikit-learn},
        title = {Nonlinear Iterative Partial Least Squares (NIPALS)},
        URL = {https://github.com/scikit-learn/scikit-learn/blob/ed5e127b/sklearn/cross_decomposition/pls_.py#L455}
     }
     


    -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: 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
     
    -tol <double> (property: tol)
        The inner NIPALS loop improvement tolerance.
        default: 1.0E-6
        minimum: 0.0
     
    -max-iter <int> (property: maxIter)
        The inner NIPALS loop maximum number of iterations.
        default: 500
        minimum: 1
     
    -norm-y-weights <boolean> (property: normYWeights)
        Whether to normalize Y weights.
        default: false
     
    -deflation-mode <CANONICAL|REGRESSION> (property: deflationMode)
        The deflation mode to use.
        default: REGRESSION
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_NIPALS

        protected com.github.waikatodatamining.matrix.algorithm.pls.NIPALS m_NIPALS
        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_NormYWeights

        protected boolean m_NormYWeights
        Flag to normalize Y weights
      • m_DeflationMode

        protected com.github.waikatodatamining.matrix.algorithm.pls.NIPALS.DeflationMode m_DeflationMode
        X and Y deflation Mode
    • Constructor Detail

      • NIPALS

        public NIPALS()
    • Method Detail

      • 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
      • setNormYWeights

        public void setNormYWeights​(boolean value)
        Sets whether to normalize Y weights.
        Parameters:
        value - true if to normalize
      • getNormYWeights

        public boolean getNormYWeights()
        Returns whether to normalize Y weights.
        Returns:
        true if to normalized
      • normYWeightsTipText

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

        public void setDeflationMode​(com.github.waikatodatamining.matrix.algorithm.pls.NIPALS.DeflationMode value)
        Sets the deflation mode to use.
        Parameters:
        value - the mode
      • getDeflationMode

        public com.github.waikatodatamining.matrix.algorithm.pls.NIPALS.DeflationMode getDeflationMode()
        Returns the deflation mode to use.
        Returns:
        the model
      • deflationModeTipText

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