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

B12276-01

oracle.dmt.odm.transformation
Class Transformation

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

public class Transformation
extends MiningObject

An instance of Transformation is used to prepare input data for use in data mining operations in ODM. It provides two static methods to perform the following tasks related to discretization (binning):

  1. Create discretization tables, given discretization details.
  2. Create a discretized version of a database table using the discretization tables specified.
See Also:
Serialized Form

Constructor Summary
Transformation()
           

 

Method Summary
static void createDiscretizationTables(Connection msConnection, LocationAccessData inputDataLocation, PhysicalDataSpecification pds, DiscretizationSpecification[] binningDetails, java.lang.String numericDiscretizationTableName, java.lang.String categoricalDiscretizationTableName, java.lang.String discretizationTablesSchemaName)
          Creates discretization tables for the specified data table.
static void createPhysicalTables(Connection msConnection, java.lang.String numericDiscretizationTableName, java.lang.String categoricalDiscretizationTableName, java.lang.String discretizationTablesSchemaName)
          Creates Empty bin boundary tables, categorical and numerical.
static void discretize(java.sql.Connection dbConn, LocationAccessData inputDataLocation, PhysicalDataSpecification pds, java.lang.String numericDiscretizationTableName, java.lang.String categoricalDiscretizationTableName, java.lang.String discretizationTablesSchemaName, LocationAccessData resultViewLocation)
          Deprecated. As of ODM 9.2.0. Use other discretize method.
static void discretize(Connection dmsConn, LocationAccessData inputDataLocation, PhysicalDataSpecification pds, java.lang.String numericDiscretizationTableName, java.lang.String categoricalDiscretizationTableName, java.lang.String discretizationTablesSchemaName, LocationAccessData resultViewLocation)
          Creates a view in the specified location using the discretization tables provided as input.
static void discretize(Connection dmsConn, LocationAccessData inputDataLocation, PhysicalDataSpecification pds, java.lang.String numericDiscretizationTableName, java.lang.String categoricalDiscretizationTableName, java.lang.String discretizationTablesSchemaName, LocationAccessData resultViewLocation, boolean openEndedNumericalDiscretization)
          Creates a view in the specified location using the discretization tables provided as input.
static void reversePivot(Connection dmsConnection, java.lang.String[] input2dTables, java.lang.String inputSchemaName, java.lang.String keyColumnName, TransactionalDataSpecification resultTxSpecification)
          This method converts multiple two dimensional tables (as specified in input2dTables) into a single transactional table.

 

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

 

Constructor Detail

Transformation

public Transformation()
Method Detail

createPhysicalTables

public static void createPhysicalTables(Connection msConnection,
                                        java.lang.String numericDiscretizationTableName,
                                        java.lang.String categoricalDiscretizationTableName,
                                        java.lang.String discretizationTablesSchemaName)
                                 throws java.sql.SQLException
Creates Empty bin boundary tables, categorical and numerical. Use the createDiscretizationSpecification API for creating bin boundary tables, using user specified DiscretizationSpecification objects.
Parameters:
msConnection - Mining server connection handle.
numericDiscretizationTableName - Name of the output numeric discretization table
categoricalDiscretizationTableName - Name of the output categorical discretization table
discretizationTablesSchemaName - Schema where both the categorical and numberical discretization tables will be created
Throws:
java.sql.SQLException - if a database error occurs while creating the discretization tables.

createDiscretizationTables

public static void createDiscretizationTables(Connection msConnection,
LocationAccessData inputDataLocation,
PhysicalDataSpecification pds,
DiscretizationSpecification[] binningDetails,
                                              java.lang.String numericDiscretizationTableName,
                                              java.lang.String categoricalDiscretizationTableName,
                                              java.lang.String discretizationTablesSchemaName)
                                       throws java.sql.SQLException,
InvalidArgumentException
Creates discretization tables for the specified data table. Discretization details (such as categories or number of bins, etc.) must be specified as inputs. Only the attributes that are to be binned must be specified. Once created, the discretization tables can be changed as needed. Schema for numerical discretization table created: COLUMN_NAME VARCHAR2(30), => Name of the column/ attribute LOWER_BOUNDARY NUMBER, => Lower boundary UPPER_BOUNDARY NUMBER, => upper boundary BIN_ID NUMBER, => Bin number for the range IS_ATTRIBUTE CHAR(1), => Currently not used DISPLAY_NAME VARCHAR2(64) => Display name for the bin Schema for categorical discretization table created: COLUMN_NAME VARCHAR2(30), => Name of the column/ attribute CATEGORY VARCHAR2(64), => The string value belonging to the group CATEGORY_VALUE NUMBER, => The number value belonging to the group. Used for Tx data only. GROUP_ID NUMBER, => Bin number DISPLAY_NAME VARCHAR2(64), => Display name for the bin IS_ATTRIBUTE CHAR(1) => Currently not used.
Parameters:
msConnection - Mining server connection handle.
inputDataLocation - Location of the input data (table to be discretized)
pds - PhysicalDataSpecification Transactional or nontransactional
binningDetails - Array of DiscretizationSpecification for the attributes to be binned
numericDiscretizationTableName - Name of the output numeric discretization table
categoricalDiscretizationTableName - Name of the output categorical discretization table
discretizationTablesSchemaName - Schema where both the categorical and numberical discretization tables will be created
Throws:
java.sql.SQLException - if a database error occurs while creating the discretization tables
InvalidArgumentException - if an invalid input is specified

discretize

public static void discretize(java.sql.Connection dbConn,
LocationAccessData inputDataLocation,
PhysicalDataSpecification pds,
                              java.lang.String numericDiscretizationTableName,
                              java.lang.String categoricalDiscretizationTableName,
                              java.lang.String discretizationTablesSchemaName,
LocationAccessData resultViewLocation)
                       throws java.sql.SQLException,
InvalidArgumentException
Deprecated. As of ODM 9.2.0. Use other discretize method.
Creates a view in the specified location identified using the discretization tables specified. If an attribute has no discretization details, the attribute is carried forward as is. For numerical attributes, the lower bin boundary is always included in the bin; the upper boundary is excluded, excpet for the last bin (largest boundary value). Existing nulls are carried forward. Numerical outliers are assigned a null value. Categorical outliers are all assigned to the Other bin.
Parameters:
dbConn - A database connection to the data mining server
inputDataLocation - The location of the input data
pds - An instance of PhysicalDataSpecification that describes the input data
numericDiscretizationTableName - The name of the numeric discretization table used for binning
categoricalDiscretizationTableName - The name of the categorical discretization table used for binning
discretizationTablesSchemaName - The schema where both (categorical and numberical) discretization tables exist
resultViewLocation - The location of the output discretized view
Throws:
java.sql.SQLException - when an error occurs during discretization of the input data.
InvalidArgumentException -
  • when inputDataLocation is null,
  • when numericDiscretizationTableName is null,
  • when categoricalDiscretizationTableName is null, or
  • when resultViewLocation is null.

discretize

public static void discretize(Connection dmsConn,
LocationAccessData inputDataLocation,
PhysicalDataSpecification pds,
                              java.lang.String numericDiscretizationTableName,
                              java.lang.String categoricalDiscretizationTableName,
                              java.lang.String discretizationTablesSchemaName,
LocationAccessData resultViewLocation)
                       throws java.sql.SQLException,
InvalidArgumentException
Creates a view in the specified location using the discretization tables provided as input. If an attribute has no discretization details, the attribute is carried forward as is. For numerical attributes, the lower bin boundary is always included in the bin; the upper boundary is excluded, excpet for the last bin (largest boundary value). Existing nulls are carried forward. Numerical outliers are assigned a null value. Categorical outliers are all assigned to the Other bin.
Parameters:
dmsConn - A connection to the data mining server
inputDataLocation - The location of the input data
pds - An instance of PhysicalDataSpecification that describes the input data
numericDiscretizationTableName - The name of the numeric discretization table used for binning
categoricalDiscretizationTableName - The name of the categorical discretization table used for binning
discretizationTablesSchemaName - The schema where both (categorical and numberical) discretization tables exist
resultViewLocation - The location of the output discretized view
Throws:
java.sql.SQLException - when an error occurs during discretization of the input data.
InvalidArgumentException -
  • when inputDataLocation is null,
  • when numericDiscretizationTableName is null,
  • when categoricalDiscretizationTableName is null, or
  • when resultViewLocation is null.

discretize

public static void discretize(Connection dmsConn,
LocationAccessData inputDataLocation,
PhysicalDataSpecification pds,
                              java.lang.String numericDiscretizationTableName,
                              java.lang.String categoricalDiscretizationTableName,
                              java.lang.String discretizationTablesSchemaName,
LocationAccessData resultViewLocation,
                              boolean openEndedNumericalDiscretization)
                       throws java.sql.SQLException,
InvalidArgumentException
Creates a view in the specified location using the discretization tables provided as input. If an attribute has no discretization details, the attribute is carried forward as is. For numerical attributes, the lower bin boundary is always included in the bin; the upper boundary is excluded, excpet for the last bin (largest boundary value). Existing nulls are carried forward. Numerical outliers are assigned a null value. Categorical outliers are all assigned to the "Other" bin. If openEndedNumericalDiscretization is true: For numerical attributes, lowest and highest bins are open ended. Categorical handling is the same as the one described above.
Parameters:
dmsConn - A connection to the data mining server
inputDataLocation - The location of the input data
pds - An instance of PhysicalDataSpecification that describes the input data
numericDiscretizationTableName - The name of the numeric discretization table used for binning
categoricalDiscretizationTableName - The name of the categorical discretization table used for binning
discretizationTablesSchemaName - The schema where both (categorical and numberical) discretization tables exist
resultViewLocation - The location of the output discretized view
openEndedNumericalDiscretization - Specifies open-ended handling for the numerical attributes
Throws:
java.sql.SQLException - when an error occurs during discretization of the input data.
InvalidArgumentException -
  • when inputDataLocation is null,
  • when numericDiscretizationTableName is null,
  • when categoricalDiscretizationTableName is null, or
  • when resultViewLocation is null.

reversePivot

public static void reversePivot(Connection dmsConnection,
                                java.lang.String[] input2dTables,
                                java.lang.String inputSchemaName,
                                java.lang.String keyColumnName,
TransactionalDataSpecification resultTxSpecification)
                         throws java.sql.SQLException,
ODMException
This method converts multiple two dimensional tables (as specified in input2dTables) into a single transactional table. All input 2d tables (or views) must reside in a single schema. All the input 2d tables must be pre discretized. I.e. only NUMBER columns are allowed in the input 2d tables. If inputSchemaName in left NULL, it indicates that all the 2d tables exist in the current user schema (as specified in dmsConnection). The column name specified in "keyColumnName" is used to join records in multiple input columns. The keyColumnName must be a valid column name. resultTxSpecificatiob MUST contain a non-null LocationAccessData. This location is used while creating the new reverse pivoted view. TODO => Clarify our behavior when same column name (other than key column) exists in multiple 2d input tables/ views.
Throws:
java.sql.SQLException - if a database error occurs while revrse pivoting the input tables
ODMException - if one of the input parameters is invalid.
Since:
10.0.1

Copyright © 2003 Oracle Corporation. All Rights Reserved.