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, SupervisedModel

public abstract class MiningModel
extends 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
TypeMethod
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.
 java.lang.String getModelName()
          Returns the name of 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 void remove(Connection dmsConn, java.lang.String modelName)
          Removes the specified mining model from the data mining server together with all its associated rules tables.
 void setModelNameForMig(java.lang.String mName)
          For internal use only
 
Methods inherited from class oracle.dmt.odm.LocatableObject
deserialize, serialize
 
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:
MiningFunction - 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:
MiningAlgorithm - The mining algorithm used to build the model

getMiningFunctionSettings

public MiningFunctionSettings getMiningFunctionSettings()
Returns an instance of MiningFunctionSettings used to build this model.
Returns:
MiningFunctionSettings - 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:
String - 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:
String - 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:
String - The name of the model

build

public static void build(Connection dmsConn,
                         LocationAccessData buildData,
                         PhysicalDataSpecification pds,
                         java.lang.String settings,
                         java.lang.String modelName)
                  throws InvalidArgumentException,
                         java.sql.SQLException,
                         java.io.IOException,
                         ODMException
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 -
  • dmsConn is null,
  • buildData is null,
  • pds is null,
  • settings is null, or
  • modelName is null,
ODMException - when modelName is empty or exceeds 64 characters in length.
java.sql.SQLException - when an error occurs during the execution of build operation
java.io.IOException -  
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:
String[] - 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:
String[] - 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:
String[] - 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:
String[] - The names of the mining models
Throws:
java.sql.SQLException - when an error occurs during the retrieval

remove

public static void 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
Throws:
InvalidArgumentException -
  • dmsConn is null, or
  • modelName is null,
ODMException - when modelName is empty or exceeds 64 characters in length.
java.sql.SQLException - when an error occurs during the retrieval
MiningObjectException - when the mining model does not exist in the data mining server

setModelNameForMig

public void setModelNameForMig(java.lang.String mName)
For internal use only