weka.filters
Class DynamicReductDiscretize

java.lang.Object
  |
  +--weka.filters.Filter
        |
        +--weka.filters.DynamicReductDiscretize
All Implemented Interfaces:
OptionHandler, Serializable

public class DynamicReductDiscretize
extends Filter
implements OptionHandler

See Also:
Serialized Form

Field Summary
protected  double[][] cutPoints
          Store the current cutpoints
 
Fields inherited from class weka.filters.Filter
m_Debug, m_NewBatch
 
Constructor Summary
DynamicReductDiscretize()
           
 
Method Summary
 boolean batchFinished()
          Signifies that this batch of input to the filter is finished.
protected  void calculateCutPoints()
           
 String confidenceTipText()
           
protected  void convertInstance(Instance instance)
          Convert a single instance over.
 String dynamicStabilityTipText()
           
 String fastTipText()
           
 double getConfidence()
          Get the value of confidence.
 double getDynamicStability()
          Get the value of dynamicStability.
 double getMaxError()
          Get the value of maxError.
 int getNumSubtables()
          Get the value of numSubtables.
 String[] getOptions()
          Gets the current settings of the Classifier.
 double getReductsRatio()
          Get the value of reductsRatio.
 String globalInfo()
          Returns a string describing this filter
 boolean input(Instance instance)
          Input an instance for filtering.
 boolean isFast()
          Get the value of fast.
 Enumeration listOptions()
          Returns an enumeration of all the available options.
static void main(String[] argv)
          Main method for testing this class.
 String maxErrorTipText()
           
 String numSubtablesTipText()
           
 String numSubTablesTipText()
           
 void printInfo()
           
 void setConfidence(double v)
          Set the value of confidence.
 void setDynamicStability(double v)
          Set the value of dynamicStability.
 void setFast(boolean v)
          Set the value of fast.
 boolean setInputFormat(Instances instanceInfo)
          Sets the format of the input instances.
 void setMaxError(double v)
          Set the value of maxError.
 void setNumSubtables(int v)
          Set the value of numSubtables.
 void setOptions(String[] options)
          Parses a given list of options.
protected  void setOutputFormat()
          Set the output format.
 void setReductsRatio(double v)
          Set the value of reductsRatio.
 
Methods inherited from class weka.filters.Filter
batchFilterFile, bufferInput, copyStringValues, copyStringValues, filterFile, flushInput, getInputFormat, getInputStringIndex, getOutputFormat, getOutputStringIndex, getStringIndices, inputFormat, isOutputFormatDefined, numPendingOutput, output, outputFormat, outputFormatPeek, outputPeek, push, resetQueue, setOutputFormat, useFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cutPoints

protected double[][] cutPoints
Store the current cutpoints

Constructor Detail

DynamicReductDiscretize

public DynamicReductDiscretize()
Method Detail

calculateCutPoints

protected void calculateCutPoints()
                           throws Exception
Exception

input

public boolean input(Instance instance)
Input an instance for filtering. Ordinarily the instance is processed and made available for output immediately. Some filters require all instances be read before producing output.

Overrides:
input in class 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 defined.

setInputFormat

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

Overrides:
setInputFormat in class Filter
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

batchFinished

public boolean batchFinished()
                      throws Exception
Signifies 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 Filter
Returns:
true if there are instances pending output
Throws:
IllegalStateException - if no input structure has been defined
Exception - if there was a problem finishing the batch.

setOutputFormat

protected void setOutputFormat()
Set the output format. Takes the currently defined cutpoints and m_InputFormat and calls setOutputFormat(Instances) appropriately.


convertInstance

protected void convertInstance(Instance instance)
Convert a single instance over. The converted instance is added to the end of the output queue.

Parameters:
instance - the instance to convert

getReductsRatio

public double getReductsRatio()
Get the value of reductsRatio.

Returns:
value of reductsRatio.

setReductsRatio

public void setReductsRatio(double v)
Set the value of reductsRatio. How many reducts, as a ratio to the number of instances in a dataset, should we strive for when computing dynamic reducts?

Parameters:
v - Value to assign to reductsRatio.

numSubTablesTipText

public String numSubTablesTipText()

getNumSubtables

public int getNumSubtables()
Get the value of numSubtables.

Returns:
value of numSubtables.

setNumSubtables

public void setNumSubtables(int v)
Set the value of numSubtables.

Parameters:
v - Value to assign to numSubtables.

numSubtablesTipText

public String numSubtablesTipText()

isFast

public boolean isFast()
Get the value of fast.

Returns:
value of fast.

setFast

public void setFast(boolean v)
Set the value of fast.

Parameters:
v - Value to assign to fast.

fastTipText

public String fastTipText()

getConfidence

public double getConfidence()
Get the value of confidence.

Returns:
value of confidence.

setConfidence

public void setConfidence(double v)
Set the value of confidence.

Parameters:
v - Value to assign to confidence.

confidenceTipText

public String confidenceTipText()

getMaxError

public double getMaxError()
Get the value of maxError.

Returns:
value of maxError.

setMaxError

public void setMaxError(double v)
Set the value of maxError.

Parameters:
v - Value to assign to maxError.

maxErrorTipText

public String maxErrorTipText()

getDynamicStability

public double getDynamicStability()
Get the value of dynamicStability.

Returns:
value of dynamicStability.

setDynamicStability

public void setDynamicStability(double v)
Set the value of dynamicStability.

Parameters:
v - Value to assign to dynamicStability.

dynamicStabilityTipText

public String dynamicStabilityTipText()

listOptions

public Enumeration listOptions()
Description copied from interface: OptionHandler
Returns an enumeration of all the available options.

Specified by:
listOptions in interface OptionHandler
Returns:
an enumeration of all available options

setOptions

public void setOptions(String[] options)
                throws Exception
Parses a given list of options.

Specified by:
setOptions in interface OptionHandler
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 OptionHandler
Returns:
an array of strings suitable for passing to setOptions

printInfo

public void printInfo()

globalInfo

public String globalInfo()
Returns a string describing this filter

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

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