Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.filters.unsupervised.attribute
Class PKIDiscretize

    java.lang.Object
      weka.filters.Filter
          weka.filters.unsupervised.attribute.PotentialClassIgnorer
              weka.filters.unsupervised.attribute.Discretize
                  weka.filters.unsupervised.attribute.PKIDiscretize

All Implemented Interfaces:
  java.io.Serializable, CapabilitiesHandler, OptionHandler, RevisionHandler, TechnicalInformationHandler, WeightedInstancesHandler, UnsupervisedFilter

    public class PKIDiscretize

extends Discretize
implements TechnicalInformationHandler

Discretizes numeric attributes using equal frequency binning, where the number of bins is equal to the square root of the number of non-missing values.
For more information, see:
Ying Yang, Geoffrey I. Webb: Proportional k-Interval Discretization for Naive-Bayes Classifiers. In: 12th European Conference on Machine Learning, 564-575, 2001.

BibTeX:

     @inproceedings{Yang2001,
        author = {Ying Yang and Geoffrey I. Webb},
        booktitle = {12th European Conference on Machine Learning},
        pages = {564-575},
        publisher = {Springer},
        series = {LNCS},
        title = {Proportional k-Interval Discretization for Naive-Bayes Classifiers},
        volume = {2167},
        year = {2001}
     }

Valid options are:

     -unset-class-temporarily
      Unsets the class index temporarily before the filter is
      applied to the data.
      (default: no)

     -R <col1,col2-col4,...>
      Specifies list of columns to Discretize. First and last are valid indexes.
      (default: first-last)

     -V
      Invert matching sense of column indexes.

     -D
      Output binary attributes for discretized attributes.

Version:
  $Revision: 1.9 $
Author:
  Richard Kirkby (rkirkby@cs.waikato.ac.nz)
See Also:
  Serialized Form

Constructor Summary
`PKIDiscretize()`

Method Summary
`java.lang.String` | `binsTipText()` Returns the tip text for this property
`java.lang.String` | `findNumBinsTipText()` Returns the tip text for this property
`int` | `getBins()` Ignored
`boolean` | `getFindNumBins()` Get the value of FindNumBins.
`java.lang.String[]` | `getOptions()` Gets the current settings of the filter.
`java.lang.String` | `getRevision()` Returns the revision string.
`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` | `getUseEqualFrequency()` Get the value of UseEqualFrequency.
`java.lang.String` | `globalInfo()` Returns a string describing this filter
`java.util.Enumeration` | `listOptions()` Gets an enumeration describing the available options.
`static void` | `main(java.lang.String[] argv)` Main method for testing this class.
`void` | `setBins(int numBins)` Ignored
`void` | `setFindNumBins(boolean newFindNumBins)` Set the value of FindNumBins.
`boolean` | `setInputFormat(Instances instanceInfo)` Sets the format of the input instances.
`void` | `setOptions(java.lang.String[] options)` Parses a given list of options.
`void` | `setUseEqualFrequency(boolean newUseEqualFrequency)` Set the value of UseEqualFrequency.
`java.lang.String` | `useEqualFrequencyTipText()` Returns the tip text for this property

Methods inherited from class weka.filters.unsupervised.attribute.Discretize
`attributeIndicesTipText, batchFinished, desiredWeightOfInstancesPerIntervalTipText, getAttributeIndices, getCapabilities, getCutPoints, getDesiredWeightOfInstancesPerInterval, getInvertSelection, getMakeBinary, input, invertSelectionTipText, makeBinaryTipText, setAttributeIndices, setAttributeIndicesArray, setDesiredWeightOfInstancesPerInterval, setInvertSelection, setMakeBinary`

Methods inherited from class weka.filters.unsupervised.attribute.PotentialClassIgnorer
`getIgnoreClass, getOutputFormat, ignoreClassTipText, setIgnoreClass`

Methods inherited from class weka.filters.Filter
`batchFilterFile, filterFile, getCapabilities, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PKIDiscretize

    public PKIDiscretize()

Method Detail

### setInputFormat

    public boolean setInputFormat(Instances instanceInfo)
                           throws java.lang.Exception

  Sets the format of the input instances.

  Overrides:
    `setInputFormat` in class `Discretize`
  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:
    `java.lang.Exception` - if the input format can't be set successfully

### listOptions

    public java.util.Enumeration listOptions()

  Gets an enumeration describing the available options.

  Specified by:
    `listOptions` in interface `OptionHandler`
  Overrides:
    `listOptions` in class `Discretize`
  Returns:
    an enumeration of all the available options.

### setOptions

    public void setOptions(java.lang.String[] options)
                    throws java.lang.Exception

  Parses a given list of options.

  Valid options are:

       -unset-class-temporarily
        Unsets the class index temporarily before the filter is
        applied to the data.
        (default: no)

       -R <col1,col2-col4,...>
        Specifies list of columns to Discretize. First and last are valid indexes.
        (default: first-last)

       -V
        Invert matching sense of column indexes.

       -D
        Output binary attributes for discretized attributes.

  Specified by:
    `setOptions` in interface `OptionHandler`
  Overrides:
    `setOptions` in class `Discretize`
  Parameters:
    `options` - the list of options as an array of strings
  Throws:
    `java.lang.Exception` - if an option is not supported

### getOptions

    public java.lang.String[] getOptions()

  Gets the current settings of the filter.

  Specified by:
    `getOptions` in interface `OptionHandler`
  Overrides:
    `getOptions` in class `Discretize`
  Returns:
    an array of strings suitable for passing to setOptions

### globalInfo

    public java.lang.String globalInfo()

  Returns a string describing this filter

  Overrides:
    `globalInfo` in class `Discretize`
  Returns:
    a description of the filter suitable for displaying in the explorer/experimenter gui

### getTechnicalInformation

    public 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 `TechnicalInformationHandler`
  Returns:
    the technical information about this class

### findNumBinsTipText

    public java.lang.String findNumBinsTipText()

  Returns the tip text for this property

  Overrides:
    `findNumBinsTipText` in class `Discretize`
  Returns:
    tip text for this property suitable for displaying in the explorer/experimenter gui

### getFindNumBins

    public boolean getFindNumBins()

  Get the value of FindNumBins.

  Overrides:
    `getFindNumBins` in class `Discretize`
  Returns:
    Value of FindNumBins.

### setFindNumBins

    public void setFindNumBins(boolean newFindNumBins)

  Set the value of FindNumBins.

  Overrides:
    `setFindNumBins` in class `Discretize`
  Parameters:
    `newFindNumBins` - Value to assign to FindNumBins.

### useEqualFrequencyTipText

    public java.lang.String useEqualFrequencyTipText()

  Returns the tip text for this property

  Overrides:
    `useEqualFrequencyTipText` in class `Discretize`
  Returns:
    tip text for this property suitable for displaying in the explorer/experimenter gui

### getUseEqualFrequency

    public boolean getUseEqualFrequency()

  Get the value of UseEqualFrequency.

  Overrides:
    `getUseEqualFrequency` in class `Discretize`
  Returns:
    Value of UseEqualFrequency.

### setUseEqualFrequency

    public void setUseEqualFrequency(boolean newUseEqualFrequency)

  Set the value of UseEqualFrequency.

  Overrides:
    `setUseEqualFrequency` in class `Discretize`
  Parameters:
    `newUseEqualFrequency` - Value to assign to UseEqualFrequency.

### binsTipText

    public java.lang.String binsTipText()

  Returns the tip text for this property

  Overrides:
    `binsTipText` in class `Discretize`
  Returns:
    tip text for this property suitable for displaying in the explorer/experimenter gui

### getBins

    public int getBins()

  Ignored

  Overrides:
    `getBins` in class `Discretize`
  Returns:
    the number of bins.

### setBins

    public void setBins(int numBins)

  Ignored

  Overrides:
    `setBins` in class `Discretize`
  Parameters:
    `numBins` - the number of bins

### getRevision

    public java.lang.String getRevision()

  Returns the revision string.

  Specified by:
    `getRevision` in interface `RevisionHandler`
  Overrides:
    `getRevision` in class `Discretize`
  Returns:
    the revision

### main

    public static void main(java.lang.String[] argv)

  Main method for testing this class.

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

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD