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

B12276-01

oracle.dmt.odm.model
Class SupervisedModel

java.lang.Object
  |
  +--oracle.dmt.odm.MiningObject
        |
        +--oracle.dmt.odm.LocatableObject
              |
              +--oracle.dmt.odm.model.MiningModel
                    |
                    +--oracle.dmt.odm.model.SupervisedModel
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AdaptiveBayesNetworkModel, NaiveBayesModel, SupportVectorMachineModel

public abstract class SupervisedModel
extends MiningModel

The abstract class SupervisedModel serves as a common superclass for supervised learning models. ODM supports supervised algorithms such as Naive Bayes and Adaptive Bayes Network. The class SupervisedModel includes common functionality to apply a model to data (score), to test a model, and to compute lift.

See Also:
NaiveBayesModel, AdaptiveBayesNetworkModel, Serialized Form

Method Summary
static void apply(Connection dmsConn, LocationAccessData applyData, PhysicalDataSpecification pds, java.lang.String modelName, MiningApplyOutput applyOutput, LocationAccessData outputLoc, java.lang.String applyResultName)
          Deprecated. As of ODM 9.2.0. Use MiningApplyTask to perform apply mining operation on a database table.
static void computeLift(Connection dmsConn, int numQuantiles, LocationAccessData inputData, PhysicalDataSpecification pds, int targetVal, java.lang.String modelName, java.lang.String liftResultName)
          Deprecated. As of ODM 9.2.0. Use MiningLiftTask to perform the compute lift mining operation.
 java.lang.String getConditionsTableName()
          Returns the name of the conditions table for this model.
 java.lang.String getCostMatrixTableName()
          Returns the name of the cost matrix table for this model.
 int getNumberOfConditions()
          Returns the number of conditions for this model.
 int getNumberOfPriors()
          Returns the number of priors for this model.
 java.lang.String getPriorsTableName()
          Returns the name of the priors table for this model.
 CategorySet getTargetCategorySet(Connection dmsConn)
          Returns an instance of CategorySet
 int getTargetValueCount()
          Deprecated. Use method getNumberOfPriors
static SupervisedModel restore(Connection dmsConn, java.lang.String modelName)
          Returns an instance of SupervisedModel with the specified name persisted in the data mining server given a connection to the data mining server and the model name.
static SupervisedModel restore(java.sql.Connection dbConn, java.lang.String modelName)
          Returns an instance of SupervisedModel with the specified name persisted in the data mining server given a database connection to the data mining server and the model name.
static void test(Connection dmsConn, LocationAccessData inputData, PhysicalDataSpecification pds, java.lang.String modelName, java.lang.String outputResultName)
          Deprecated. As of ODM 9.2.0. Use MiningTestTask to perform the test mining operation.

 

Methods inherited from class oracle.dmt.odm.model.MiningModel
build, getBinCategoricalTableName, getBinNumericTableName, getMiningAlgorithm, getMiningFunction, getMiningFunctionSettings, getModelAlgorithm, getModelMiningFunction, getModelName, getSignature, listContents, listContents, listContents, listContents, remove, rename, storeLocationdata

 

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

 

Method Detail

getTargetValueCount

public int getTargetValueCount()
Deprecated. Use method getNumberOfPriors
Returns the number of unique target values.
Returns:
The number of unique target values

getConditionsTableName

public java.lang.String getConditionsTableName()
Returns the name of the conditions table for this model.
Returns:
The name of the conditions table

getPriorsTableName

public java.lang.String getPriorsTableName()
Returns the name of the priors table for this model.
Returns:
The name of the priors table

getCostMatrixTableName

public java.lang.String getCostMatrixTableName()
Returns the name of the cost matrix table for this model.
Returns:
The name of the cost matrix table

getNumberOfConditions

public int getNumberOfConditions()
Returns the number of conditions for this model.
Returns:
The number of conditions

getNumberOfPriors

public int getNumberOfPriors()
Returns the number of priors for this model.
Returns:
The number of priors

apply

public static void apply(Connection dmsConn,
LocationAccessData applyData,
PhysicalDataSpecification pds,
                         java.lang.String modelName,
MiningApplyOutput applyOutput,
LocationAccessData outputLoc,
                         java.lang.String applyResultName)
                  throws InvalidArgumentException,
                         java.sql.SQLException,
ODMException
Deprecated. As of ODM 9.2.0. Use MiningApplyTask to perform apply mining operation on a database table.
Performs the apply mining operation on multiple records specified in a database table. Using the applyData represented by the pds and the named modelName, this method generates an output table specified by outputLoc according to the appyOutput specification; writes the result with the name applyResultName in the data mining server represented by dmsConn.

Refer to oracle.dmt.odm.result package for more information on MiningApplyOutput and MiningApplyResult.

Parameters:
dmsConn - A connection to the data mining server
applyData - A database table to be used as input for apply
pds - A specification on the format of the input data
modelName - The name of the model to be used for apply
applyOutput - A specification on the format of apply output
outputLoc - The location an name of the output table
applyResultName - The name of the result to be persisted in the data mining server
Throws:
InvalidArgumentException -
  • when dmsConn is null,
  • when applyData is null,
  • when pds is null,
  • when modelName is null,
  • when applyOutput is null,
  • when outputLoc is null, or
  • when applyResultName is null
ODMException -
  • when modelName is empty or exceeds 30 bytes in length, or
  • when applyResultName is empty or exceeds 30 bytes in length.
java.sql.SQLException - when an error occurs during the execution of apply operation.
See Also:
MiningApplyTask, MiningApplyResult, MiningApplyOutput

test

public static void test(Connection dmsConn,
LocationAccessData inputData,
PhysicalDataSpecification pds,
                        java.lang.String modelName,
                        java.lang.String outputResultName)
                 throws InvalidArgumentException,
                        java.sql.SQLException,
ODMException
Deprecated. As of ODM 9.2.0. Use MiningTestTask to perform the test mining operation.
Performs the test mining operation on a database table represented by inputData in the format specified by pds. The test result is stored in the specified data mining server.

Refer to the oracle.dmt.odm.result package for more information on MiningTestResult and ClassificationTestResult.

Parameters:
dmsConn - The connection to the data mining server
inputData - A database table to be used as input for test
pds - A specification on the format of the input data
modelName - The name of the model to be used for test
Throws:
InvalidArgumentException -
  • when dmsConn is null,
  • when inputData is null,
  • when pds is null,
  • when modelName is null, or
  • when outputResultName is null.
ODMException -
  • when modelName is empty or exceeds 30 bytes in length, or
  • when outputResultName is empty or exceeds 30 bytes in length.
java.sql.SQLException - when an error occurs during the execution of apply operation.
See Also:
MiningTestTask, MiningTestResult, ClassificationTestResult

computeLift

public static void computeLift(Connection dmsConn,
                               int numQuantiles,
LocationAccessData inputData,
PhysicalDataSpecification pds,
                               int targetVal,
                               java.lang.String modelName,
                               java.lang.String liftResultName)
                        throws InvalidArgumentException,
                               java.sql.SQLException,
ODMException
Deprecated. As of ODM 9.2.0. Use MiningLiftTask to perform the compute lift mining operation.
Performs the compute lift mining operation on a database table represented by inputData in the format specified by pds given a positive target value and the number of quantiles. The result is stored in the specified data mining server.

In ODM 9.2.0, the type of the target attribute can be either string (i.e., if unprepared) or integer (i.e., if discretized). This method supports only the former case, and the user is recommended to use MiningLiftTask when the target attribute is of string type. Refer to DataPreparationStatus and DataUsageEntry for further details about automated binning, and to MiningLiftTask for further details about compute lift task.

Parameters:
dmsConn - The connection to the data mining server
numQuantiles - The number of quantiles to be computed
inputData - A database table to be used as input for compute lift
pds - A specification on the format of the input data
targetVal - The positive target value against which the lift values are computed
modelName - The name of the model to be used for compute lift
liftResultName - The name of the result to be persisted in the data mining server
Throws:
InvalidArgumentException -
  • when dmsConn is null,
  • when numQuantiles is less than 1,
  • when inputData is null,
  • when pds is null,
  • when targetVal is less than 1,
  • when modelName is null, or
  • when liftResultName is null.
ODMException -
  • when modelName is empty or exceeds 30 bytes in length, or
  • when liftResultName is empty or exceeds 30 bytes in length.
java.sql.SQLException - when an error occurs during the execution of apply operation.
See Also:
MiningLiftTask, MiningLiftResult

restore

public static SupervisedModel restore(Connection dmsConn,
                                      java.lang.String modelName)
                                                    throws java.sql.SQLException,
InvalidArgumentException,
ODMException
Returns an instance of SupervisedModel with the specified name persisted in the data mining server given a connection to the data mining server and the model name.
Parameters:
dmsConn - The connection to the data mining server
modelName - The name of the model to be restored
Returns:
An instance of SupervisedModel restored
Throws:
InvalidArgumentException -
  • when modelName is null, or
  • when dmsConn is null.
ODMException - when modelName is empty or exceeds 30 bytes in length.
java.sql.SQLException -
  • when the model table does not exist in the database, or
  • when the model name is invalid.

restore

public static SupervisedModel restore(java.sql.Connection dbConn,
                                      java.lang.String modelName)
                                                    throws java.sql.SQLException,
InvalidArgumentException,
ODMException
Returns an instance of SupervisedModel with the specified name persisted in the data mining server given a database connection to the data mining server and the model name.
Parameters:
dbConn - A database connection to the data mining server
modelName - The name of the model to be restored
Returns:
An instance of SupervisedModel restored
Throws:
InvalidArgumentException -
  • when modelName is null, or
  • when dbConn is null.
ODMException - when modelName is empty or exceeds 30 bytes in length.
java.sql.SQLException -
  • when the model table does not exist in the database, or
  • when the model name is invalid.

getTargetCategorySet

public CategorySet getTargetCategorySet(Connection dmsConn)
                                                throws java.sql.SQLException,
InvalidArgumentException,
ODMException
Returns an instance of CategorySet
Parameters:
dmsConn - A connection to the data mining server
Throws:
java.sql.SQLException - when the CategorySet does not exist in the database.
InvalidArgumentException
ODMException

Copyright © 2003 Oracle Corporation. All Rights Reserved.