weka.filters.unsupervised.attribute
Class NormalizeAdaptive

java.lang.Object
  extended by weka.filters.Filter
      extended by weka.filters.unsupervised.attribute.PotentialClassIgnorer
          extended by weka.filters.unsupervised.attribute.NormalizeAdaptive
All Implemented Interfaces:
Serializable, weka.core.CapabilitiesHandler, weka.core.OptionHandler, weka.core.RevisionHandler, weka.filters.UnsupervisedFilter

public class NormalizeAdaptive
extends weka.filters.unsupervised.attribute.PotentialClassIgnorer
implements weka.filters.UnsupervisedFilter

Normalizes all numeric values in the given dataset (apart from the class attribute, if set). The resulting values are in [0,1] for the data used to compute the normalization intervals.

Version:
$Revision: 4584 $
Author:
Eibe Frank (eibe@cs.waikato.ac.nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class weka.filters.unsupervised.attribute.PotentialClassIgnorer
m_ClassIndex, m_IgnoreClass
 
Fields inherited from class weka.filters.Filter
m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts
 
Constructor Summary
NormalizeAdaptive()
           
 
Method Summary
 boolean batchFinished()
          Signify that this batch of input to the filter is finished.
 weka.core.Capabilities getCapabilities()
          Returns the Capabilities of this filter.
 int getClassIndex()
           
 String getRevision()
           
 double getScale()
           
 String globalInfo()
          Returns a string describing this filter
 boolean input(weka.core.Instance instance)
          Input an instance for filtering.
static void main(String[] argv)
          Main method for testing this class.
 void setClassIndex(int classIndex)
           
 boolean setInputFormat(weka.core.Instances instanceInfo)
          Sets the format of the input instances.
 void setScale(double fScale)
           
 
Methods inherited from class weka.filters.unsupervised.attribute.PotentialClassIgnorer
getIgnoreClass, getOptions, getOutputFormat, ignoreClassTipText, listOptions, setIgnoreClass, setOptions
 
Methods inherited from class weka.filters.Filter
batchFilterFile, bufferInput, copyValues, copyValues, filterFile, flushInput, getCapabilities, getInputFormat, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, push, resetQueue, runFilter, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NormalizeAdaptive

public NormalizeAdaptive()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing this filter

Returns:
a description of the filter suitable for displaying in the explorer/experimenter gui

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
See Also:
Capabilities

setInputFormat

public boolean setInputFormat(weka.core.Instances instanceInfo)
                       throws Exception
Sets the format of the input instances.

Overrides:
setInputFormat in class weka.filters.unsupervised.attribute.PotentialClassIgnorer
Parameters:
instanceInfo - an Instances object containing the input instance structure (any instances contained in the object are ignored - only the structure is required).
Returns:
true if the outputFormat may be collected immediately
Throws:
Exception - if the input format can't be set successfully

input

public boolean input(weka.core.Instance instance)
Input an instance for filtering. Filter requires all training instances be read before producing output.

Overrides:
input in class weka.filters.Filter
Parameters:
instance - the input instance
Returns:
true if the filtered instance may now be collected with output().
Throws:
IllegalStateException - if no input format has been set.

batchFinished

public boolean batchFinished()
Signify that this batch of input to the filter is finished. If the filter requires all instances prior to filtering, output() may now be called to retrieve the filtered instances.

Overrides:
batchFinished in class weka.filters.Filter
Returns:
true if there are instances pending output
Throws:
IllegalStateException - if no input structure has been defined

setScale

public void setScale(double fScale)

getScale

public double getScale()

setClassIndex

public void setClassIndex(int classIndex)

getClassIndex

public int getClassIndex()

main

public static void main(String[] argv)
Main method for testing this class.

Parameters:
argv - should contain arguments to the filter: use -h for help

getRevision

public String getRevision()
Specified by:
getRevision in interface weka.core.RevisionHandler
Overrides:
getRevision in class weka.filters.Filter


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.