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

B12276-01

oracle.dmt.odm.model
Class MiningModel

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.LocatableObject
              |
              +--oracle.dmt.odm.model.MiningModel
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AssociationRulesModel, AttributeImportanceModel, ClusteringModel, oracle.dmt.odm.model.FeatureExtractionModel, SupervisedModel

public abstract class MiningModel
extends oracle.dmt.odm.LocatableObject

The abstract class MiningModel is the result of a successful build mining operation. The representation of the model is specific to the algorithm specified by the user or selected by ODM. Depending on the algorithm, the model can be used for direct inspection (for example, to examine the rules produced from an Association Rules model) or to score data.

The class MiningModel is the common superclass to all model objects. In this release of ODM, models are immutable, i.e., users cannot change any values in a model or its component objects. MiningModel also provides static methods to retrieve and remove mining models.

See Also:
Serialized Form

Method Summary
static void build(Connection dmsConn, LocationAccessData buildData, PhysicalDataSpecification pds, java.lang.String settings, java.lang.String modelName)
          Deprecated. As of ODM 9.2.0. Use MiningBuildTask to build a mining model.
 java.lang.String getBinCategoricalTableName()
          Returns the bin boundaries table name for categorical attributes of the input data.
 java.lang.String getBinNumericTableName()
          Returns the bin boundaries table name for numerical attributes of the input data.
 MiningAlgorithm getMiningAlgorithm()
          Returns the kind of algorithm as the enumeration MiningAlgorithm used to build this model.
 MiningFunction getMiningFunction()
          Returns the kind of function as the enumeration MiningFunction used to build this model.
 MiningFunctionSettings getMiningFunctionSettings()
          Returns an instance of MiningFunctionSettings used to build this model.
static MiningAlgorithm getModelAlgorithm(Connection dmsConn, java.lang.String modelName)
          Function retrieves the mining algorithm for the specified model name.
static MiningFunction getModelMiningFunction(Connection dmsConn, java.lang.String modelName)
          Function retrieves the mining function for the specified model name.
 java.lang.String getModelName()
          Returns the name of the model.
 ModelSignature getSignature()
          Returns the model's signature (if any), i.e., the set of required inputs for scoring with the model, or as was used for building the model.
static java.lang.String[] listContents(Connection dmsConn)
          Returns an array of mining model names persisted in the specified data mining server.
static java.lang.String[] listContents(Connection dmsConn, java.util.Date start, java.util.Date end)
          Returns an array of mining model names persisted within the specified time interval in the data mining server.
static java.lang.String[] listContents(Connection dmsConn, MiningFunction function, MiningAlgorithm algorithm)
          Returns an array of mining model names of the specified function type built by the specified algorithm in the specified data mining server.
static java.lang.String[] listContents(Connection dmsConn, MiningFunction function, MiningAlgorithm algorithm, java.util.Date start, java.util.Date end)
          Returns an array of mining model names of the specified function type built by the specified algorithm within the given time interval.
static boolean remove(Connection dmsConn, java.lang.String modelName)
          Removes the specified mining model from the data mining server together with all its associated rules tables.
static boolean rename(Connection dmsConn, java.lang.String oldObjectName, java.lang.String newObjectName)
          Renames the specified mining model.
 void storeLocationdata(java.sql.Connection dbConn, java.lang.Integer modelID, java.lang.String sMiningDataTable, java.lang.String sMiningDataSchema)
           

 

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

 

Method Detail

getMiningFunction

public MiningFunction getMiningFunction()
Returns the kind of function as the enumeration MiningFunction used to build this model.
Returns:
The mining function used to build the model

getMiningAlgorithm

public MiningAlgorithm getMiningAlgorithm()
Returns the kind of algorithm as the enumeration MiningAlgorithm used to build this model.
Returns:
The mining algorithm used to build the model

getMiningFunctionSettings

public MiningFunctionSettings getMiningFunctionSettings()
Returns an instance of MiningFunctionSettings used to build this model.
Returns:
The mining function settings used to build the model

getBinNumericTableName

public java.lang.String getBinNumericTableName()
Returns the bin boundaries table name for numerical attributes of the input data.

A numerical bin boundaries table is created by ODM when an input data is discretized before a model is built, based on the data preparation status of each numerical mining attribute specified in the data usage specification. The columns of the numerical bin boundaries table are:

For the example described above, there will be 7 rows (i.e., the number of bins) in the bin boundaries tables for the column AGE.

Returns:
The bin boundaries table name for numerical attributes
Since:
9.2.0
See Also:
AttributeUsage, DataPreparationStatus, DataUsageEntry

getBinCategoricalTableName

public java.lang.String getBinCategoricalTableName()
Returns the bin boundaries table name for categorical attributes of the input data.

A categorical bin boundaries table is created by ODM when an input data is discretized before a model is built, based on the data preparation status of each categorical mining attribute specified in the data usage specification. The columns of the categorical bin boundaries table are:

For the example described above, there will be 5 rows (i.e., the number of categories for the group) in the bin boundaries tables for the group 3, discretized to represent the NorthEast region for the State column.

Returns:
The bin boundaries table name for categorical attributes
Since:
9.2.0
See Also:
AttributeUsage, DataPreparationStatus, DataUsageEntry

getModelName

public java.lang.String getModelName()
Returns the name of the model. Returns null if the model has not been stored in the data mining server.
Returns:
The name of the model

getSignature

public ModelSignature getSignature()
Returns the model's signature (if any), i.e., the set of required inputs for scoring with the model, or as was used for building the model.
Returns:
Model Signature

build

public static void build(Connection dmsConn,
LocationAccessData buildData,
PhysicalDataSpecification pds,
                         java.lang.String settings,
                         java.lang.String modelName)
                  throws InvalidArgumentException,
                         java.sql.SQLException,
ODMException,
                         java.io.IOException
Deprecated. As of ODM 9.2.0. Use MiningBuildTask to build a mining model.
Performs the build mining operation on a database table with the specified mining function settings. Using the buildData and mining function settings represented by pds and settings, this method builds a model named modelName and persists it in the specified data mining server.

Note that this method does not return a model. The model is persisted in the data mining server. A restore method must be invoked to retrieve the model.

Refer to oracle.dmt.odm.result package for more information on MiningBuildResult.

Parameters:
dmsConn - A connection to the data mining server
buildData - A database table to be used as input for build
pds - A specification on the format of the input data
settings - A specification on the function settings
modelName - The name of the model to be used for apply
Throws:
InvalidArgumentException -
  • when dmsConn is null,
  • when buildData is null,
  • when pds is null,
  • when settings is null, or
  • when modelName is null.
ODMException - when modelName is empty or length exceeds the maximum limit.
java.sql.SQLException - when modelName when an error occurs during the execution of build operation.
java.io.IOException - when the specification on the format of the input data cannot be serialized into the bytestream.
See Also:
MiningBuildTask

listContents

public static java.lang.String[] listContents(Connection dmsConn)
                                       throws java.sql.SQLException
Returns an array of mining model names persisted in the specified data mining server.
Parameters:
dmsConn - A connection to the data mining server
Returns:
The names of the mining models
Throws:
java.sql.SQLException - when an error occurs during the retrieval.

listContents

public static java.lang.String[] listContents(Connection dmsConn,
                                              java.util.Date start,
                                              java.util.Date end)
                                       throws java.sql.SQLException
Returns an array of mining model names persisted within the specified time interval in the data mining server. If either start or end is null, the current system time is used.
Parameters:
dmsConn - A connection to the data mining server
start - The beginning of the time interval
end - The ending of the time interval
Returns:
The names of the mining models
Throws:
java.sql.SQLException - when an error occurs during the retrieval.

listContents

public static java.lang.String[] listContents(Connection dmsConn,
MiningFunction function,
MiningAlgorithm algorithm,
                                              java.util.Date start,
                                              java.util.Date end)
                                       throws java.sql.SQLException
Returns an array of mining model names of the specified function type built by the specified algorithm within the given time interval.
Parameters:
dmsConn - A connection to the data mining server
function - A mining function type
algorithm - A mining algorithm type
start - The beginning of the time interval
end - The ending of the time interval
Returns:
The names of the mining models
Throws:
java.sql.SQLException - when an error occurs during the retrieval.

listContents

public static java.lang.String[] listContents(Connection dmsConn,
MiningFunction function,
MiningAlgorithm algorithm)
                                       throws java.sql.SQLException
Returns an array of mining model names of the specified function type built by the specified algorithm in the specified data mining server.
Parameters:
dmsConn - A connection to the data mining server
function - A mining function type
algorithm - A mining algorithm type
Returns:
The names of the mining models
Throws:
java.sql.SQLException - when an error occurs during the retrieval.

rename

public static boolean rename(Connection dmsConn,
                             java.lang.String oldObjectName,
                             java.lang.String newObjectName)
                      throws java.sql.SQLException,
MiningObjectException,
InvalidArgumentException,
ODMException
Renames the specified mining model.
Parameters:
dmsConn - A connection to the data mining server
oldObjectName - The name of the mining model to be renamed
newObjectName - The new name of the mining model to be assigned
Returns:
A flag indicating whether the specified object has been renamed successfully.
Throws:
InvalidArgumentException -
  • dmsConn is null,
  • oldObjectName is null, or
  • newObjectName is null.
ODMException -
  • oldObjectName is empty,
  • newObjectName is empty,
  • oldObjectName exceeds 64 characters, or
  • newObjectName exceeds 25 bytes in length.
java.sql.SQLException - when an error occurs during the rename operation.
MiningObjectException
Since:
10.1

remove

public static boolean remove(Connection dmsConn,
                             java.lang.String modelName)
                      throws java.sql.SQLException,
MiningObjectException,
InvalidArgumentException,
ODMException
Removes the specified mining model from the data mining server together with all its associated rules tables.
Parameters:
dmsConn - A connection to the data mining server
modelName - The name of the mining model to be removed
Returns:
A flag indicating whether the specified object has been removed
Throws:
InvalidArgumentException -
  • dmsConn is null, or
  • modelName is null.
ODMException - modelName is empty or length exceeds the limit.
java.sql.SQLException - when an error occurs during the retrieval.
MiningObjectException - when the mining model does not exist in the data mining server.

storeLocationdata

public void storeLocationdata(java.sql.Connection dbConn,
                              java.lang.Integer modelID,
                              java.lang.String sMiningDataTable,
                              java.lang.String sMiningDataSchema)
                       throws java.sql.SQLException
java.sql.SQLException

getModelMiningFunction

public static MiningFunction getModelMiningFunction(Connection dmsConn,
                                                    java.lang.String modelName)
                                                            throws java.sql.SQLException,
ODMException,
InvalidArgumentException
Function retrieves the mining function for the specified model name.
Parameters:
dmsConn - The connection to the data mining server
modelName - Name of the model to retrieve
Returns:
MiningFunction
Throws:
InvalidArgumentException
ODMException
java.sql.SQLException

getModelAlgorithm

public static MiningAlgorithm getModelAlgorithm(Connection dmsConn,
                                                java.lang.String modelName)
                                                        throws java.sql.SQLException,
ODMException,
InvalidArgumentException
Function retrieves the mining algorithm for the specified model name.
Parameters:
dmsConn - The connection to the data mining server
modelName - Name of the model to retrieve
Returns:
MiningAlgorithm
Throws:
InvalidArgumentException
ODMException
java.sql.SQLException

Copyright © 2003 Oracle Corporation. All Rights Reserved.