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

B12276-01

oracle.dmt.odm.transformation
Class DiscretizationSpecification

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.transformation.DiscretizationSpecification
All Implemented Interfaces:
java.io.Serializable

public class DiscretizationSpecification
extends MiningObject

An instance of DiscretizationSpecification contains discretization details for a single attribute. The class contains the name of the attribute and a discretization object, CategoricalDiscretization or NumericalDiscretization, depending on the type of the attribute.

See Also:
Serialized Form

Constructor Summary
DiscretizationSpecification(java.lang.String columnName, AttributeDiscretization binningDetails)
          Creates a DiscretizationSpecification object.

 

Method Summary
static DiscretizationSpecification[] create(MiningAttribute[] attributeArray, float tailPercentage, int numericalBinNum, int categoricalBinNum, java.lang.String categoricalOtherBin)
          Creates an array of DiscretizationSpecification objects for the provided attributes.
static DiscretizationSpecification[] create(MiningAttribute[] attributeArray, int numericalBinNum, int categoricalBinNum, java.lang.String categoricalOtherBin)
          Creates an array of DiscretizationSpecification objects for the provided attributes.
 AttributeDiscretization getBinningDetails()
          Returns the attribute binning details.
 java.lang.String getName()
          Returns the name of the attribute for which binning(discretization) details are specified in this object.

 

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

 

Constructor Detail

DiscretizationSpecification

public DiscretizationSpecification(java.lang.String columnName,
AttributeDiscretization binningDetails)
                            throws InvalidArgumentException
Creates a DiscretizationSpecification object. The column name and binningDetails cannot be null.
Parameters:
columnName - Name of the attribute
binningDetails - Appropriate instance of subclass of AttributeDiscretization
Throws:
InvalidArgumentException -
Method Detail

getName

public java.lang.String getName()
Returns the name of the attribute for which binning(discretization) details are specified in this object.
Returns:
the name of the attribute.

getBinningDetails

public AttributeDiscretization getBinningDetails()
Returns the attribute binning details. Based on the type of the attribute i.e., categorical or numerical, it returns the associated instance of AttributeDiscretization.
Returns:
the attribute binning details.

create

public static DiscretizationSpecification[] create(MiningAttribute[] attributeArray,
                                                   int numericalBinNum,
                                                   int categoricalBinNum,
                                                   java.lang.String categoricalOtherBin)
                                                                          throws InvalidArgumentException
Creates an array of DiscretizationSpecification objects for the provided attributes. Using the desired number of numerical and categorical bins, and the name of the "other" bin. This method helps to "automate" manual data preprocessing. Use this create method to set up specifications for the equi-width numerical binning.
Parameters:
attributeArray - An array of attributes
numericalBinNum - A desired number of numerical bins
categoricalBinNum - A desired number of categorical bins
categoricalOtherBin - The name of the "other" bin
Returns:
an array of DiscretizationSpecification objects.
Throws:
InvalidArgumentException - if one of the mining attributes is invalide.

create

public static DiscretizationSpecification[] create(MiningAttribute[] attributeArray,
                                                   float tailPercentage,
                                                   int numericalBinNum,
                                                   int categoricalBinNum,
                                                   java.lang.String categoricalOtherBin)
                                                                          throws InvalidArgumentException
Creates an array of DiscretizationSpecification objects for the provided attributes. Using the desired number of numerical and categorical bins, and the name of the "other" bin. This method helps to "automate" manual data preprocessing. Use this create method to set up specifications for the "winsorize" numerical binning specification.
Parameters:
attributeArray - An array of attributes
tailPercentage - The tail percentage value to be used for all numerical attributes
numericalBinNum - A desired number of numerical bins
categoricalBinNum - A desired number of categorical bins
categoricalOtherBin - The name of the "other" bin
Returns:
an array of DiscretizationSpecification objects.
Throws:
InvalidArgumentException - if one of the mining attributes is invalide.

Copyright © 2003 Oracle Corporation. All Rights Reserved.