Oracle Data Mining Java API Reference
10g Release 1 (10.1)

B12276-01

oracle.dmt.odm.transformation
Class NumericalDiscretization

java.lang.Object
  |
  +--oracle.dmt.odm.transformation.AttributeDiscretization
        |
        +--oracle.dmt.odm.transformation.NumericalDiscretization

public class NumericalDiscretization
extends AttributeDiscretization

NumericalDiscretization contains the binning details for a numerical attribute. You can bin data in three ways:

  1. If number of bins specified, calculates the bin boundaries from the maximum and mininimum value of the attribute. The bins created are equi-width.
  2. Specify boundaries for each bin explicitly.
  3. Specify the tail percentage for each end of the histogram. The tail % of each end of the histogram is chopped and then the minumum and maximum value of the attribute is determined. That is used to perform equi-width binning.

Constructor Summary
NumericalDiscretization(int numberOfQuantiles)
          Create a NumericalDiscretization instance with the specified number of quantiles.
NumericalDiscretization(int numberOfQuantiles, float tailPercentage)
          Create a NumericalDiscretization instance with the specified number of quantiles and tail percentage.
NumericalDiscretization(NumericalBin[] bins)
          Create a NumericalDiscretization instance with the specified array of numerical bin boundaries.

 

Method Summary
 void addNumercialBin(NumericalBin bin)
          Adds a numerical bin to the numerical discretization.
 int getNumberOfQuantiles()
          Returns the number of quantiles.
 NumericalBin[] getNumericalBin()
          Returns the list of numerical bins.
 float getTailPercentage()
          Returns the tail percentage

 

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

 

Constructor Detail

NumericalDiscretization

public NumericalDiscretization(NumericalBin[] bins)
                        throws InvalidArgumentException
Create a NumericalDiscretization instance with the specified array of numerical bin boundaries.
Parameters:
bins - Array of NumericalBin objects - the list of bin boundaries.
Throws:
InvalidArgumentException - when the array is empty.

NumericalDiscretization

public NumericalDiscretization(int numberOfQuantiles)
                        throws InvalidArgumentException
Create a NumericalDiscretization instance with the specified number of quantiles.
Parameters:
numberOfQuantiles - Number of quantiles ( bins)
Throws:
InvalidArgumentException - if number of quantiles is <= 0.

NumericalDiscretization

public NumericalDiscretization(int numberOfQuantiles,
                               float tailPercentage)
                        throws InvalidArgumentException
Create a NumericalDiscretization instance with the specified number of quantiles and tail percentage.
Parameters:
numberOfQuantiles - - Number of quantiles ( bins)
tailPercentage - - The % of values omitted at the each end of histogram, before determining min and max.
Throws:
InvalidArgumentException -
Method Detail

addNumercialBin

public void addNumercialBin(NumericalBin bin)
Adds a numerical bin to the numerical discretization.

getNumericalBin

public NumericalBin[] getNumericalBin()
Returns the list of numerical bins.
Returns:
array of Numerical Bins

getNumberOfQuantiles

public int getNumberOfQuantiles()
Returns the number of quantiles.
Returns:
The number of quantiles.

getTailPercentage

public float getTailPercentage()
Returns the tail percentage
Returns:
The tail percentage.

Copyright © 2003 Oracle Corporation. All Rights Reserved.