oracle.dmt.odm.model
Class NaiveBayesModel
java.lang.Object
|
+--oracle.dmt.odm.MiningObject
|
+--oracle.dmt.odm.LocatableObject
|
+--oracle.dmt.odm.model.MiningModel
|
+--oracle.dmt.odm.model.SupervisedModel
|
+--oracle.dmt.odm.model.NaiveBayesModel
- All Implemented Interfaces:
- java.io.Serializable
- public abstract class NaiveBayesModel
- extends SupervisedModel
An instance of NaiveBayesModel
contains the metadata and Bayes statistics from the training run (see class MiningBuildTask
). The metadata information is sufficient to determine whether a model can be applied to given data. The Bayes statistics, which make up the Naive Bayes model, reside in the database and are sufficient to make predictions by applying the model to new data (via the classes MiningApplyTask
, MiningTestTask
, and MiningLiftTask
). A NaiveBayesModel
uses Bayes' Theorem, together with a simplifying assumption of conditional independence, to gather statistics about co-occurrences of predictor values and target classification; these statistics are used for predicting the classification based on the predictors.
- See Also:
- Serialized Form
Methods inherited from class oracle.dmt.odm.model.SupervisedModel |
apply, computeLift, getConditionsTableName, getCostMatrixTableName, getNumberOfConditions, getNumberOfPriors, getPriorsTableName, getTargetCategorySet, getTargetValueCount, restore, restore, test |
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 |
apply
public static RecordInstance apply(Connection dmsConn,
RecordInstance record,
java.lang.String modelName)
throws InvalidArgumentException,
java.sql.SQLException,
ODMException
- Performs the apply mining operation on a single record represented by an instance of
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.
-
- Parameters:
record
- An instance of RecordInstance
for input to apply
modelName
- The model name to be used for apply
- Returns:
- An instance of
RecordInstance
that contains two attribute instances: score
and probability
of the top prediction.
- Throws:
InvalidArgumentException
-
- when
dmsConn
is null,
- when
record
is null, or
- when
modelName
is null.
ODMException
- when modelName
is empty or exceeds 30 bytes in length.
java.sql.SQLException
- when an error occurs during the execution of apply operation.
- See Also:
RecordInstance
, AttributeInstance
apply
public static RecordInstance apply(Connection dmsConn,
RecordInstance record,
java.lang.String modelName,
MiningApplyOutput applyOutput)
throws InvalidArgumentException,
java.sql.SQLException,
ODMException
- Performs the apply mining operation on a single record represented by an instance of
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.
-
- Parameters:
record
- An instance of RecordInstance
for input to apply
modelName
- The model name to be used for apply
applyOutput
- A specification on the format of apply output
- Returns:
- An instance of
RecordInstance
that contains attribute instances based on the specification in applyOutput
- Throws:
InvalidArgumentException
-
- when
dmsConn
is null,
- when
record
is null,
- when
modelName
is null, or
- when
applyOutput
is null.
ODMException
- when modelName
is empty or exceeds 30 bytes in length.
java.sql.SQLException
- when an error occurs during the execution of apply operation.
- Since:
- 9.2.0
- See Also:
RecordInstance
, AttributeInstance
, MiningApplyOutput