Class NormalizeAdaptive
- java.lang.Object
-
- weka.filters.Filter
-
- weka.filters.unsupervised.attribute.PotentialClassIgnorer
-
- weka.filters.unsupervised.attribute.NormalizeAdaptive
-
- All Implemented Interfaces:
Serializable,weka.core.CapabilitiesHandler,weka.core.CapabilitiesIgnorer,weka.core.CommandlineRunnable,weka.core.OptionHandler,weka.core.RevisionHandler,weka.filters.UnsupervisedFilter
public class NormalizeAdaptive extends weka.filters.unsupervised.attribute.PotentialClassIgnorer implements weka.filters.UnsupervisedFilterNormalizes 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$
- Author:
- Eibe Frank ([email protected])
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NormalizeAdaptive()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbatchFinished()Signify that this batch of input to the filter is finished.weka.core.CapabilitiesgetCapabilities()Returns the Capabilities of this filter.intgetClassIndex()StringgetRevision()doublegetScale()StringglobalInfo()Returns a string describing this filterbooleaninput(weka.core.Instance instance)Input an instance for filtering.static voidmain(String[] argv)Main method for testing this class.voidsetClassIndex(int classIndex)booleansetInputFormat(weka.core.Instances instanceInfo)Sets the format of the input instances.voidsetScale(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, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getDebug, getDoNotCheckCapabilities, getInputFormat, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
-
-
-
-
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:
getCapabilitiesin interfaceweka.core.CapabilitiesHandler- Overrides:
getCapabilitiesin classweka.filters.Filter- Returns:
- the capabilities of this object
- See Also:
Capabilities
-
setInputFormat
public boolean setInputFormat(weka.core.Instances instanceInfo) throws ExceptionSets the format of the input instances.- Overrides:
setInputFormatin classweka.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:
inputin classweka.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:
batchFinishedin classweka.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:
getRevisionin interfaceweka.core.RevisionHandler- Overrides:
getRevisionin classweka.filters.Filter
-
-