|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.dmt.odm.MiningObject | +--oracle.dmt.odm.LocatableObject | +--oracle.dmt.odm.model.MiningModel | +--oracle.dmt.odm.model.SupervisedModel
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.
NaiveBayesModel
, AdaptiveBayesNetworkModel
, Serialized FormMethod Summary |
Type | Method |
---|---|
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 RecordInstance |
apply(Connection dmsConn,
RecordInstance record,
java.lang.String modelName)
Performs the apply mining operation on a single record represented by an instance of RecordInstance . |
static RecordInstance |
apply(Connection dmsConn,
RecordInstance record,
java.lang.String modelName,
MiningApplyOutput applyOutput)
Performs the apply mining operation on a single record represented by an instance of RecordInstance . |
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. |
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, getModelName, listContents, listContents, listContents, listContents, remove, setModelNameForMig |
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 |
public int getTargetValueCount()
getNumberOfPriors
public java.lang.String getConditionsTableName()
public java.lang.String getPriorsTableName()
public java.lang.String getCostMatrixTableName()
public int getNumberOfConditions()
public int getNumberOfPriors()
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, MiningOperationException, ODMException
MiningApplyTask
to perform apply
mining operation on a database table.
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
.
dmsConn
- A connection to the data mining serverapplyData
- A database table to be used as input for applypds
- A specification on the format of the input datamodelName
- The name of the model to be used for applyapplyOutput
- A specification on the format of apply outputoutputLoc
- The location an name of the output tableapplyResultName
- The name of the result to be persisted in the data mining serverInvalidArgumentException
-
dmsConn
is null,
applyData
is null,
pds
is null,
modelName
is null,
applyOutput
is null,
outputLoc
is null, or
applyResultName
is null
ODMException
-
modelName
is empty or exceeds 64 characters in length, or
applyResultName
is empty or exceeds 64 characters in length
java.sql.SQLException
- when an error occurs during the execution of apply operationMiningOperationException
- MiningApplyTask
, MiningApplyResult
,
MiningApplyOutput
public static RecordInstance apply(Connection dmsConn, RecordInstance record, java.lang.String modelName) throws InvalidArgumentException, java.sql.SQLException, MiningOperationException, ODMException
RecordInstance
.
The result of this method is also returned in an instance of
RecordInstance
, which contains the top prediction and its probability
(i.e., its probability is the highest among all predictions).
The returned RecordInstance
contains the default attribute
instance values: score
and probability
.
Note that no mining result is persisted for the result of this operation.dmSConn
- The connection to the data mining serverrecord
- An instance of RecordInstance
for input to applymodelName
- The model name to be used for applyRecordInstance
that contains
two attribute instances: score
and probability
of the top prediction.InvalidArgumentException
- dmsConn
is null,
record
is null, or
modelName
is null.
ODMException
- when modelName
is empty or exceeds
64 characters in lengthjava.sql.SQLException
- when an error occurs during the execution of apply operationMiningOperationException
- RecordInstance
, AttributeInstance
public static RecordInstance apply(Connection dmsConn, RecordInstance record, java.lang.String modelName, MiningApplyOutput applyOutput) throws InvalidArgumentException, java.sql.SQLException, MiningOperationException, ODMException
RecordInstance
.
The result of this method is also returned in an instance of
RecordInstance
, which contains attribute instances based on
the specification in applyOutput
.
Note that no mining result is persisted for the result of this operation.dmSConn
- The connection to the data mining serverrecord
- An instance of RecordInstance
for input to applymodelName
- The model name to be used for applyapplyOutput
- A specification on the format of apply outputRecordInstance
that contains
attribute instances based on the specification in applyOutput
InvalidArgumentException
- dmsConn
is null,
record
is null,
modelName
is null, or
applyOutput
is null.
ODMException
- when modelName
is empty or exceeds
64 characters in lengthjava.sql.SQLException
- when an error occurs during the execution of apply operationMiningOperationException
- RecordInstance
, AttributeInstance
,
MiningApplyOutput
public static void test(Connection dmsConn, LocationAccessData inputData, PhysicalDataSpecification pds, java.lang.String modelName, java.lang.String outputResultName) throws InvalidArgumentException, java.sql.SQLException, java.io.IOException, ODMException
MiningTestTask
to perform
the test mining operation.
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
.
dmsConn
- The connection to the data mining serverinputData
- A database table to be used as input for testpds
- A specification on the format of the input datamodelName
- The name of the model to be used for testapplyResultName
- The name of the result to be persisted in the data mining serverInvalidArgumentException
- dmsConn
is null,
inputData
is null,
pds
is null,
modelName
is null, or
outputResultName
is null
ODMException
- modelName
is empty or exceeds 64 characters in length, or
outputResultName
is empty or exceeds 64 characters in length
java.sql.SQLException
- when an error occurs during the execution of apply operationjava.io.IOException
- MiningTestTask
, MiningTestResult
,
ClassificationTestResult
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, MiningObjectException, ODMException
MiningLiftTask
to perform
the compute lift mining operation.
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.
dmsConn
- The connection to the data mining servernumQuantiles
- The number of quantiles to be computedinputData
- A database table to be used as input for compute liftpds
- A specification on the format of the input datatargetVal
- The positive target value against which the lift values are computedmodelName
- The name of the model to be used for compute liftliftResultName
- The name of the result to be persisted in the data mining serverInvalidArgumentException
- dmsConn
is null,
numQuantiles
is less than 1,
inputData
is null,
pds
is null,
targetVal
is less than 1,
modelName
is null, or
liftResultName
is null
ODMException
- modelName
is empty or exceeds 64 characters in length, or
liftResultName
is empty or exceeds 64 characters in length
java.sql.SQLException
- when an error occurs during the execution of apply operationMiningObjectException
- MiningLiftTask
, MiningLiftResult
public static SupervisedModel restore(Connection dmsConn, java.lang.String modelName) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
SupervisedModel
with the specified
name persisted in the data mining server
given a connection to the data mining server and the model name.dmsConn
- The connection to the data mining servermodelName
- The name of the model to be restoredSupervisedModel
restoredInvalidArgumentException
- modelName
is null dmsConn
is nullODMException
- when modelName
is empty or exceeds 64 acharacter
in length.
- SQLException
MiningObjectException
- when the restored model is not an instance of
SupervisedModel
.public static SupervisedModel restore(java.sql.Connection dbConn, java.lang.String modelName) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
SupervisedModel
with the specified
name persisted in the data mining server
given a database connection to the data mining server and the model name.dbConn
- A database connection to the data mining servermodelName
- The name of the model to be restoredSupervisedModel
restoredInvalidArgumentException
- modelName
is null dbConn
is nullODMException
- when modelName
is empty or exceeds 64 acharacter
in length.
- SQLException
MiningObjectException
- when the restored model is not an instance of
SupervisedModel
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |