Class BoxCoxTargetClassifier

  • All Implemented Interfaces:
    Serializable, Cloneable, weka.classifiers.Classifier, weka.core.BatchPredictor, weka.core.CapabilitiesHandler, weka.core.CapabilitiesIgnorer, weka.core.CommandlineRunnable, weka.core.OptionHandler, weka.core.RevisionHandler, weka.core.TechnicalInformationHandler

    public class BoxCoxTargetClassifier
    extends weka.classifiers.SingleClassifierEnhancer
    implements weka.core.TechnicalInformationHandler
    Author:
    Dale
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double m_lambda  
      protected double m_sigma2_z  
      protected boolean m_unbias  
      • Fields inherited from class weka.classifiers.SingleClassifierEnhancer

        m_Classifier
      • Fields inherited from class weka.classifiers.AbstractClassifier

        BATCH_SIZE_DEFAULT, m_BatchSize, m_Debug, m_DoNotCheckCapabilities, m_numDecimalPlaces, NUM_DECIMAL_PLACES_DEFAULT
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void buildClassifier​(weka.core.Instances data)
      Generates a classifier.
      double classifyInstance​(weka.core.Instance instance)
      Classifies the given test instance.
      weka.core.Capabilities getCapabilities()
      Returns default capabilities of the base classifier.
      double getLambda()
      Returns the lambda parameter.
      String[] getOptions()
      Gets the current settings of the Classifier.
      weka.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.
      boolean getUnbias()
      Returns whether to unbias the training residual variance in z-space.
      String globalInfo()
      Returns a string describing classifier
      String lambdaTipText()
      Returns the tip text for this property.
      Enumeration<weka.core.Option> listOptions()
      Returns an enumeration describing the available options.
      static void main​(String[] args)
      Main method for executing this classifier.
      void setLambda​(double value)
      Sets the lambda parameter.
      void setOptions​(String[] options)
      Parses a given list of options.
      void setUnbias​(boolean unbias)
      Sets whether to unbias the training residual variance in z-space.
      String unbiasTipText()
      Returns the tip text for this property.
      • Methods inherited from class weka.classifiers.SingleClassifierEnhancer

        classifierTipText, defaultClassifierOptions, defaultClassifierString, getClassifier, getClassifierSpec, postExecution, preExecution, setClassifier
      • Methods inherited from class weka.classifiers.AbstractClassifier

        batchSizeTipText, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getRevision, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
    • Field Detail

      • m_lambda

        protected double m_lambda
      • m_sigma2_z

        protected double m_sigma2_z
      • m_unbias

        protected boolean m_unbias
    • Constructor Detail

      • BoxCoxTargetClassifier

        public BoxCoxTargetClassifier()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing classifier
        Returns:
        a description suitable for displaying in the explorer/experimenter gui
      • getTechnicalInformation

        public weka.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 weka.core.TechnicalInformationHandler
        Returns:
        the technical information about this class
      • setLambda

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

        public double getLambda()
        Returns the lambda parameter.
        Returns:
        the lambda value
      • 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
      • setUnbias

        public void setUnbias​(boolean unbias)
        Sets whether to unbias the training residual variance in z-space.
        Parameters:
        unbias - true if to remove bias
      • getUnbias

        public boolean getUnbias()
        Returns whether to unbias the training residual variance in z-space.
        Returns:
        true if to remove bias
      • unbiasTipText

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

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

        public void setOptions​(String[] options)
                        throws Exception
        Parses a given list of options.
        Specified by:
        setOptions in interface weka.core.OptionHandler
        Overrides:
        setOptions in class weka.classifiers.SingleClassifierEnhancer
        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 settings of the Classifier.
        Specified by:
        getOptions in interface weka.core.OptionHandler
        Overrides:
        getOptions in class weka.classifiers.SingleClassifierEnhancer
        Returns:
        an array of strings suitable for passing to setOptions
      • getCapabilities

        public weka.core.Capabilities getCapabilities()
        Returns default capabilities of the base classifier.
        Specified by:
        getCapabilities in interface weka.core.CapabilitiesHandler
        Specified by:
        getCapabilities in interface weka.classifiers.Classifier
        Overrides:
        getCapabilities in class weka.classifiers.SingleClassifierEnhancer
        Returns:
        the capabilities of the base classifier
      • buildClassifier

        public void buildClassifier​(weka.core.Instances data)
                             throws Exception
        Generates a classifier.
        Specified by:
        buildClassifier in interface weka.classifiers.Classifier
        Parameters:
        data - set of instances serving as training data
        Throws:
        Exception - if the classifier has not been generated successfully
      • classifyInstance

        public double classifyInstance​(weka.core.Instance instance)
                                throws Exception
        Classifies the given test instance.
        Specified by:
        classifyInstance in interface weka.classifiers.Classifier
        Overrides:
        classifyInstance in class weka.classifiers.AbstractClassifier
        Parameters:
        instance - the instance to be classified
        Returns:
        the predicted most likely class for the instance or Utils.missingValue() if no prediction is made
        Throws:
        Exception - if an error occurred during the prediction
      • main

        public static void main​(String[] args)
        Main method for executing this classifier.
        Parameters:
        args - the arguments for execution