Class SNV

  • All Implemented Interfaces:
    Serializable, weka.core.CapabilitiesHandler, weka.core.CapabilitiesIgnorer, weka.core.CommandlineRunnable, weka.core.OptionHandler, weka.core.RevisionHandler, weka.filters.StreamableFilter, weka.filters.UnsupervisedFilter

    public class SNV
    extends weka.filters.SimpleStreamFilter
    implements weka.filters.UnsupervisedFilter
    Standard Normal Variate (SNV) filter for WEKA / ADAMS. Centers and scales each instance (row) individually by subtracting the row mean and dividing by the row standard deviation.
    Author:
    dale (dale at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class weka.filters.Filter

        m_Debug, m_DoNotCheckCapabilities, m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts
    • Constructor Summary

      Constructors 
      Constructor Description
      SNV()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected weka.core.Instances determineOutputFormat​(weka.core.Instances inputFormat)
      Determines the output format based on the input format and returns it.
      weka.core.Capabilities getCapabilities()
      Returns the Capabilities of this filter.
      String getRevision()
      Returns the revision string.
      String globalInfo()
      Returns a string describing this filter suitable for displaying in the Explorer/Experimenter GUI.
      static void main​(String[] args)
      Main method for running and testing this filter from the command line.
      protected weka.core.Instance process​(weka.core.Instance instance)
      Processes the given instance (subtracts row mean, divides by row standard deviation).
      • Methods inherited from class weka.filters.SimpleStreamFilter

        batchFinished, hasImmediateOutputFormat, input, preprocess, process
      • Methods inherited from class weka.filters.SimpleFilter

        reset, setInputFormat
      • Methods inherited from class weka.filters.Filter

        batchFilterFile, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getInputFormat, getOptions, getOutputFormat, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, listOptions, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOptions, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
    • Constructor Detail

      • SNV

        public SNV()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing this filter suitable for displaying in the Explorer/Experimenter GUI.
        Specified by:
        globalInfo in class weka.filters.SimpleFilter
        Returns:
        description of the filter
      • getCapabilities

        public weka.core.Capabilities getCapabilities()
        Returns the Capabilities of this filter.
        Specified by:
        getCapabilities in interface weka.core.CapabilitiesHandler
        Overrides:
        getCapabilities in class weka.filters.Filter
        Returns:
        the capabilities of this object
      • determineOutputFormat

        protected weka.core.Instances determineOutputFormat​(weka.core.Instances inputFormat)
                                                     throws Exception
        Determines the output format based on the input format and returns it.
        Specified by:
        determineOutputFormat in class weka.filters.SimpleStreamFilter
        Parameters:
        inputFormat - the input format to base the output format on
        Returns:
        the output format
        Throws:
        Exception - if output format determination fails
      • process

        protected weka.core.Instance process​(weka.core.Instance instance)
                                      throws Exception
        Processes the given instance (subtracts row mean, divides by row standard deviation).
        Specified by:
        process in class weka.filters.SimpleStreamFilter
        Parameters:
        instance - the instance to process
        Returns:
        the modified instance
        Throws:
        Exception - if processing fails
      • getRevision

        public String getRevision()
        Returns the revision string.
        Specified by:
        getRevision in interface weka.core.RevisionHandler
        Overrides:
        getRevision in class weka.filters.Filter
        Returns:
        the revision
      • main

        public static void main​(String[] args)
        Main method for running and testing this filter from the command line.
        Parameters:
        args - command line arguments