|
|||||||||
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.ClusteringModel
An instance of ClusteringModel
holds the metadata of the result of a trained clustering model.
This information is sufficient to describe the data clusters uncovered during model building as well as to assign new data points to clusters.
Method 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 . |
AttributeHistogram |
getAttributeHistogram(Connection dmsConn,
int clusterID,
java.lang.String attrName)
Returns, for the MiningAttribute specified by attrName ,
the AttributeHistogram for the cluster identified by clusterID . |
MiningRuleSet |
getClusterRules(Connection dmsConn)
Returns a MiningRuleSet with rules representing the ClusteringModel 's clusters. |
MiningRuleSet |
getClusterRules(Connection dmsConn,
int maxNumberRuleAttribute)
Returns a MiningRuleSet with rules, with at most maxNumberRuleAttribute antecedents, representing the ClusteringModel 's clusters. |
java.util.Vector |
getClusters(Connection dmsConn)
Returns a Vector of Cluster objects. |
int |
getInputDataRecordCount()
Returns the number of input records used to train the clustering model. |
int[] |
getLeafClusterIDs(Connection dmsConn)
Returns an array of leaf Cluster IDs. |
java.util.Vector |
getLeaves(Connection handle)
Returns a Vector of Cluster objects. |
int |
getNumberOfClusters()
Returns the number of clusters in the model. |
int |
getNumberOfLeaves()
Returns the number of leaf clusters in the model. |
int |
getNumberOfLevels()
Returns the number of levels in the ClusteringModel . |
int |
getRootID()
Returns the ID for the ClusteringModel 's root
Cluster object. |
static ClusteringModel |
restore(Connection dmsConn,
java.lang.String modelName)
Returns the specified ClusteringModel
and populates the complex model object for reading by a user program. |
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 getNumberOfClusters()
int
- Number of clusterspublic int getRootID()
ClusteringModel
's root
Cluster
object.int
- Root IDpublic int getInputDataRecordCount()
int
- Record countpublic int getNumberOfLevels()
ClusteringModel
.int
- Number of levelspublic java.util.Vector getClusters(Connection dmsConn) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
Vector
of Cluster
objects.
This collection of Cluster
objects contains
the information about the clusters discovered by the model.dmsConn
- The connection to the DMSVector
- Collection of Cluster
objectsInvalidArgumentException
- is thrown MiningObjectException
- is thrown java.sql.SQLException
- is thrown ODMException
- public int getNumberOfLeaves()
int
- Number of leavespublic MiningRuleSet getClusterRules(Connection dmsConn) throws MiningObjectException, InvalidArgumentException, java.sql.SQLException, ODMException
MiningRuleSet
with rules representing the ClusteringModel
's clusters.
The set of MiningRules
represents the hyperboxes (bounding boxes)
that envelop the clusters discovered by the clustering model. The antecedent of each rule
describes the clustering bounding box. The consequent encodes the cluster ID for the cluster
described by the rule.dmsConn
- The connection to the DMSMiningRuleSet
- Set of model rulesMiningObjectException
- is thrown InvalidArgumentException
- is thrown public MiningRuleSet getClusterRules(Connection dmsConn, int maxNumberRuleAttribute) throws MiningObjectException, InvalidArgumentException, java.sql.SQLException, ODMException
MiningRuleSet
with rules, with at most maxNumberRuleAttribute
antecedents, representing the ClusteringModel
's clusters.
The set of MiningRules
represents the hyperboxes (bounding boxes)
that envelop the clusters discovered by the clustering model. The antecedent of each rule
describes the clustering bounding box. The consequent encodes the cluster ID for the cluster
described by the rule. Each rule has at most maxNumberRuleAttribute
attributes in the antecedent, where maxNumberRuleAttribute
is
greater than 0. Attributes in the rule antecedent are selected according to how well they
distinguish the records in the cluster from the overall population.dmsConn
- The connection to the DMSmaxNumberRuleAttribute
- Maximum number of attributes for a ruleMiningRuleSet
- Set of model rulesMiningObjectException
- is thrown InvalidArgumentException
- is thrown java.sql.SQLException
- is thrown public static ClusteringModel restore(Connection dmsConn, java.lang.String modelName) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
ClusteringModel
and populates the complex model object for reading by a user program.dmsConn
- The connection to the DMSmodelName
- Name of the model to retrieveClusteringModel
InvalidArgumentException
- is thrown MiningObjectException
- is thrown java.sql.SQLException
- is thrown public AttributeHistogram getAttributeHistogram(Connection dmsConn, int clusterID, java.lang.String attrName) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
MiningAttribute
specified by attrName
,
the AttributeHistogram
for the cluster identified by clusterID
.
clusterID
is an integer greater than 0.dmsConn
- The connection to the DMSclusterID
- Cluster IDattrName
- Attribute nameAttributeHistogram
InvalidArgumentException
- is thrown MiningObjectException
- is thrown java.sql.SQLException
- is thrown public java.util.Vector getLeaves(Connection handle) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
Vector
of Cluster
objects.
This collection of Cluster
objects
are the leaves of the hierarchical ClusteringModel
.dmsConn
- The connection to the DMSVector
- Set of cluster model leavesInvalidArgumentException
- is thrown MiningObjectException
- is thrown java.sql.SQLException
- is thrown ODMException
- public int[] getLeafClusterIDs(Connection dmsConn) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
Cluster
IDs.dmsConn
- The connection to the DMSint[]
- The array of leaf cluster IDsInvalidArgumentException
- dmsConn
is null.MiningObjectException
- no Cluster
exists in the model
or an error occurs during restore of clusters.java.sql.SQLException
- an error occurs during access to DMS.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |