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
TypeMethod
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.

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.

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 "atomate" manual data preprocessing.
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