Class AbstractPLSAttributeEval

  • All Implemented Interfaces:
    Serializable, weka.attributeSelection.AttributeEvaluator, weka.core.CapabilitiesHandler, weka.core.CapabilitiesIgnorer, weka.core.CommandlineRunnable, weka.core.OptionHandler, weka.core.RevisionHandler
    Direct Known Subclasses:
    PLS1AttributeEval, SIMPLSAttributeEval

    public abstract class AbstractPLSAttributeEval
    extends weka.attributeSelection.ASEvaluation
    implements weka.attributeSelection.AttributeEvaluator, weka.core.OptionHandler
    Ancestor for PLS attribute evaluators
    Author:
    Hisham Abdel Qader (habdelqa at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_PreprocessingType

        protected PreprocessingType m_PreprocessingType
        the preprocessing type to perform.
      • m_ReplaceMissing

        protected boolean m_ReplaceMissing
        the replace missing values parameter.
      • m_NumComponents

        protected int m_NumComponents
        the number of components parameter.
      • m_ComponentRange

        protected Range m_ComponentRange
        for user defined range of components used.
      • m_Ranking

        protected double[] m_Ranking
        the determined attribute ranking.
    • Constructor Detail

      • AbstractPLSAttributeEval

        public AbstractPLSAttributeEval()
    • Method Detail

      • listOptions

        public Enumeration<weka.core.Option> listOptions()
        Returns an enumeration of all the available options..
        Specified by:
        listOptions in interface weka.core.OptionHandler
        Overrides:
        listOptions in class weka.attributeSelection.ASEvaluation
        Returns:
        an enumeration of all available options.
      • setOptions

        public void setOptions​(String[] options)
                        throws Exception
        Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible).
        Specified by:
        setOptions in interface weka.core.OptionHandler
        Overrides:
        setOptions in class weka.attributeSelection.ASEvaluation
        Parameters:
        options - the list of options as an array of strings
        Throws:
        Exception - if an option is not supported
      • getOptions

        public String[] getOptions()
        Gets the current option settings for the OptionHandler.
        Specified by:
        getOptions in interface weka.core.OptionHandler
        Overrides:
        getOptions in class weka.attributeSelection.ASEvaluation
        Returns:
        the list of current option settings as an array of strings
      • setPreprocessingType

        public void setPreprocessingType​(PreprocessingType value)
        Sets the type of preprocessing to perform.
        Parameters:
        value - the type
      • getPreprocessingType

        public PreprocessingType getPreprocessingType()
        Returns the type of preprocessing to perform.
        Returns:
        the type
      • preprocessingTypeTipText

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

        public void setReplaceMissing​(boolean value)
        Sets whether to replace missing values.
        Parameters:
        value - if true missing values are replaced with the ReplaceMissingValues filter.
      • getReplaceMissing

        public boolean getReplaceMissing()
        Gets whether missing values are replaced.
        Returns:
        true if missing values are replaced with the ReplaceMissingValues filter
      • replaceMissingTipText

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

        public void setNumComponents​(int value)
        sets the maximum number of attributes to use.
        Parameters:
        value - the maximum number of attributes
      • getNumComponents

        public int getNumComponents()
        returns the maximum number of attributes to use.
        Returns:
        the current maximum number of attributes
      • numComponentsTipText

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

        public void setComponentRange​(Range value)
        Sets the range of components to be used.
        Parameters:
        value - the range
      • getComponentRange

        public Range getComponentRange()
        Returns the range of components to be used.
        Returns:
        the type
      • componentRangeTipText

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

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

        protected abstract AbstractSingleClassPLS newModel()
        Creates a new instance of a PLS algorrithm.
        Returns:
        the instance
      • buildEvaluator

        public void buildEvaluator​(weka.core.Instances instances)
                            throws Exception
        Generates a attribute evaluator. Has to initialize all fields of the evaluator that are not being set via options.
        Specified by:
        buildEvaluator in class weka.attributeSelection.ASEvaluation
        Parameters:
        instances - set of instances serving as training data
        Throws:
        Exception - if the evaluator has not been generated successfully
      • evaluateAttribute

        public double evaluateAttribute​(int i)
                                 throws Exception
        evaluates an individual attribute
        Specified by:
        evaluateAttribute in interface weka.attributeSelection.AttributeEvaluator
        Parameters:
        i - the index of the attribute to be evaluated
        Returns:
        the "merit" of the attribute
        Throws:
        Exception - if the attribute could not be evaluated
      • toString

        public String toString()
        Outputs the underlying linear regression model.
        Overrides:
        toString in class Object
        Returns:
        the model output