|
Oracle Data Mining Java API Reference 10g Release 1 (10.1) B12276-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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 | |
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 maxAttributeRelevanceRank) Returns a MiningRuleSet with rules, with at most maxAttributeRelevanceRank antecedents, representing the ClusteringModel 's clusters. |
MiningRuleSet |
getClusterRules(Connection dmsConn, int maxNumberRuleAttribute, boolean bARFilter) Returns a MiningRuleSet with rules, with at most maxAttributeRelevanceRank 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, 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 |
public int getNumberOfClusters()
public int getRootID()
ClusteringModel
's root Cluster
object.public int getInputDataRecordCount()
public int getNumberOfLevels()
ClusteringModel
.public java.util.Vector getClusters(Connection dmsConn) throws java.sql.SQLException, 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 DMSCluster
objectsInvalidArgumentException
- when the dmsConn is null.java.sql.SQLException
- when the model meta data cannot be retrieved.ODMException
- when the model name is empty or exceeds 30 bytes in length.public int getNumberOfLeaves()
public MiningRuleSet getClusterRules(Connection dmsConn) throws 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 DMSInvalidArgumentException
- when the dmsConn is null.java.sql.SQLException
- when the model meta data cannot be retrieved.ODMException
- when the model name is empty or exceeds 30 bytes in length.public MiningRuleSet getClusterRules(Connection dmsConn, int maxAttributeRelevanceRank) throws InvalidArgumentException, java.sql.SQLException, ODMException
MiningRuleSet
with rules, with at most maxAttributeRelevanceRank
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 only attributes for which the attribute relevance rank is less or equal than maxAttributeRelevanceRank
, where maxAttributeRelevanceRank
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 DMSmaxAttributeRelevanceRank
- Maximum number of attributes with different relevence scoreInvalidArgumentException
- when the dmsConn is null or maxAttributeRelevanceRank < 1.java.sql.SQLException
- when the model meta data cannot be retrieved.ODMException
- when the model name is empty or exceeds 30 bytes in length.public MiningRuleSet getClusterRules(Connection dmsConn, int maxNumberRuleAttribute, boolean bARFilter) throws InvalidArgumentException, java.sql.SQLException, ODMException
MiningRuleSet
with rules, with at most maxAttributeRelevanceRank
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 only attributes for which the attribute relevance rank is less or equal than maxAttributeRelevanceRank
, where maxAttributeRelevanceRank
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 DMSbARFilter
- filter attribute based on their relevance score. If it is false
all attributes are included, if true
only attributes with releveant score greater than 0 are included.InvalidArgumentException
- when the dmsConn is null or maxAttributeRelevanceRank < 1.java.sql.SQLException
- when the model meta data cannot be retrieved.ODMException
- when the model name is empty or exceeds 30 bytes in length.public static ClusteringModel restore(Connection dmsConn, java.lang.String modelName) throws java.sql.SQLException, 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
- when the dmsConn/modelName is null.java.sql.SQLException
- when the model meta data cannot be retrieved.ODMException
- when the model name is empty or length exceeds the limit.public AttributeHistogram getAttributeHistogram(Connection dmsConn, int clusterID, java.lang.String attrName) throws java.sql.SQLException, 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 nameInvalidArgumentException
- when the dmsConn/modelName is null and clusterID < 1.java.sql.SQLException
- when the attribute histogram meta data cannot be retrieved.ODMException
public java.util.Vector getLeaves(Connection handle) throws java.sql.SQLException, InvalidArgumentException, ODMException
Vector
of Cluster
objects. This collection of Cluster
objects are the leaves of the hierarchical ClusteringModel
.InvalidArgumentException
- when the handle is null.java.sql.SQLException
- when the model meta data cannot be retrieved.ODMException
- when the model name is empty or exceeds 30 bytes in length.public int[] getLeafClusterIDs(Connection dmsConn) throws java.sql.SQLException, MiningObjectException, InvalidArgumentException, ODMException
Cluster
IDs.dmsConn
- The connection to the DMSInvalidArgumentException
- when dmsConn
is null.MiningObjectException
-
Cluster
exists in the model, orjava.sql.SQLException
- when an error occurs during access to DMS.ODMException
- when an error occurs during access to the model.MiningObjectException
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
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, orapplyResultName
is null.ODMException
-
modelName
is empty or exceeds 30 bytes in length, orapplyResultName
is empty or exceeds 30 bytes in length.java.sql.SQLException
- when an error occurs during the execution of apply operation.MiningApplyTask
, MiningApplyResult
, MiningApplyOutput
public static RecordInstance apply(Connection dmsConn, RecordInstance record, java.lang.String modelName) throws InvalidArgumentException, java.sql.SQLException, 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.record
- 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, ormodelName
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.RecordInstance
, AttributeInstance
public static RecordInstance apply(Connection dmsConn, RecordInstance record, java.lang.String modelName, MiningApplyOutput applyOutput) throws InvalidArgumentException, java.sql.SQLException, 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.record
- 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, orapplyOutput
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.RecordInstance
, AttributeInstance
, MiningApplyOutput
|
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |