javax.datamining.clustering
Interface ClusteringApplySettings

All Superinterfaces:
ApplySettings, MiningObject

public interface ClusteringApplySettings
extends ApplySettings

A ClusteringApplySettings captures a specification that prescribes the output of an apply task specific to a clustering model.

Author:
JSR-73 Java Data Mining Expert Group
See Also:
MiningObject, ApplySettings

Method Summary
 ClusteringApplyContent getContent(java.lang.String destPhysAttrName)
          Returns the type of apply content associated with the specified destination physical attribute.
 ClusteringApplyContent[] getContentsByCluster(int clusterIdentifier)
          Returns the types of apply content to be included in the apply output for the specified cluser identifier if mapByClusterIdentifier has been used for the cluster identifier.
 ClusteringApplyContent[] getContentsByRank(int rank)
          Returns the types of apply content to be included in the apply output for the specified rank.
 java.lang.String getMappedBaseDestinationAttributeName(ClusteringApplyContent content)
          Returns the base attribute name to be used for the values associated with the specified apply content that has been specified by mapPredictions method.
 java.lang.Integer getMappedClusterIdentifier(java.lang.String destPhysAttrName)
          Returns the cluster identifier associated with the specified destination physical attribute.
 int[] getMappedClusterIdentifiers()
          Returns the cluster identifiers mapped by mapByClusterIdentifier method.
 ClusteringApplyContent[] getMappedContents()
          Returns an array of apply contents that are used for mapping.
 java.lang.String getMappedDestinationAttrName(int clusterIdentifier, ClusteringApplyContent contentType)
          Returns the name of the physical attribute mapped to the specified cluster.
 java.lang.Integer getRank(java.lang.String destinationAttrName)
          Returns the rank associated with the specified destination attribute.
 java.lang.Integer getRanks()
          Returns the number of cluster identifiers specified by mapByRank method or mapTopCluster.
 boolean isFromTop()
          Returns true if predictions are ordered from top, false if from bottom.
 void mapByClusterIdentifier(ClusteringApplyContent content, int clusterIdentifier, java.lang.String destPhysAttrName)
          Maps the specified content value for the specified cluster identifier to the named destination attribute.
 void mapByRank(ClusteringApplyContent content, java.lang.String[] destPhysAttrNameArray, boolean fromTop)
          Maps the specified generated values for the predictions with the specified ranks to an array of destination attributes.
 void mapClusters(ClusteringApplyContent content, java.lang.String baseDestPhysAttrName)
          Maps all clusters in the model and the specified content value to a set of named destination attributes.
 void mapTopCluster(ClusteringApplyContent content, java.lang.String destPhysAttrName)
          Maps the cluster with the highest prediction metric to appear in the apply output under the specified attribute name.
 
Methods inherited from interface javax.datamining.task.apply.ApplySettings
getSourceDestinationMap, resetMapping, setSourceDestinationMap, verify
 
Methods inherited from interface javax.datamining.MiningObject
getCreationDate, getCreatorInfo, getDescription, getName, getObjectIdentifier, getObjectType, setDescription
 

Method Detail

getContent

public ClusteringApplyContent getContent(java.lang.String destPhysAttrName)
                                  throws JDMException
Returns the type of apply content associated with the specified destination physical attribute.

Parameters:
destPhysAttrName - The name of the destination physical attribute whose associated apply content type is to be returned.
Returns:
ClusteringApplyContent
Throws:
JDMException

getContentsByCluster

public ClusteringApplyContent[] getContentsByCluster(int clusterIdentifier)
                                              throws JDMException
Returns the types of apply content to be included in the apply output for the specified cluser identifier if mapByClusterIdentifier has been used for the cluster identifier. Throws an exception if the cluster identifier has not been mapped.

Parameters:
clusterIdentifier -
Returns:
ClusteringApplyContent[]
Throws:
JDMException

getContentsByRank

public ClusteringApplyContent[] getContentsByRank(int rank)
                                           throws JDMException
Returns the types of apply content to be included in the apply output for the specified rank. Throws an exception if the rank has not been used in mapping.

Parameters:
rank - The rank whose associated apply contents are to be returned.
Returns:
ClusteringApplyContent[]
Throws:
JDMException

getMappedBaseDestinationAttributeName

public java.lang.String getMappedBaseDestinationAttributeName(ClusteringApplyContent content)
Returns the base attribute name to be used for the values associated with the specified apply content that has been specified by mapPredictions method. Returns null if the method has not been invoked.

Parameters:
content -
Returns:
String

getMappedClusterIdentifier

public java.lang.Integer getMappedClusterIdentifier(java.lang.String destPhysAttrName)
                                             throws JDMException
Returns the cluster identifier associated with the specified destination physical attribute.

Returns null if cluster identifiers have not been mapped.

Parameters:
destPhysAttrName - The name of the destination physical attribute whose associated cluster ID is to be returned.
Returns:
Integer
Throws:
JDMException

getMappedClusterIdentifiers

public int[] getMappedClusterIdentifiers()
Returns the cluster identifiers mapped by mapByClusterIdentifier method.

Returns null if no cluster identifiers have been mapped.

Returns:
int[]

getMappedContents

public ClusteringApplyContent[] getMappedContents()
Returns an array of apply contents that are used for mapping.

Returns:
ClusteringApplyContent[]

getMappedDestinationAttrName

public java.lang.String getMappedDestinationAttrName(int clusterIdentifier,
                                                     ClusteringApplyContent contentType)
                                              throws JDMException
Returns the name of the physical attribute mapped to the specified cluster. Throws exception if the cluster identifier has not been mapped.

Parameters:
clusterIdentifier - The cluster identifier to be represented as the destination attribute.
contentType - The content type to be represented as the destination attribute.
Returns:
String
Throws:
JDMException

getRank

public java.lang.Integer getRank(java.lang.String destinationAttrName)
                          throws JDMException
Returns the rank associated with the specified destination attribute. Returns null if mapping by rank has not been invoked.

Parameters:
destinationAttrName - The name of the physical attribute whose designated rank is to be returned.
Returns:
Integer
Throws:
JDMException

getRanks

public java.lang.Integer getRanks()
Returns the number of cluster identifiers specified by mapByRank method or mapTopCluster. Returns null if no such method has been invoked.

Returns:
Integer

isFromTop

public boolean isFromTop()
Returns true if predictions are ordered from top, false if from bottom. The default value is true, meaning that the predictions are ordered in descending order of the prediction criterion.

Returns:
boolean

mapByClusterIdentifier

public void mapByClusterIdentifier(ClusteringApplyContent content,
                                   int clusterIdentifier,
                                   java.lang.String destPhysAttrName)
                            throws JDMException
Maps the specified content value for the specified cluster identifier to the named destination attribute. This method is used when a specific cluster is of special interest.

Parameters:
content - A system-generated content to be included in the apply output.
clusterIdentifier - The cluster identifier to be mapped.
destPhysAttrName - The name of the physical attribute for destination.
Returns:
void
Throws:
JDMException

mapByRank

public void mapByRank(ClusteringApplyContent content,
                      java.lang.String[] destPhysAttrNameArray,
                      boolean fromTop)
               throws JDMException
Maps the specified generated values for the predictions with the specified ranks to an array of destination attributes. For example, a user may want to map the predicted cluster identifiers with the top predictions (rank=1,2,3) to 3 destination attributes.

Parameters:
content - A system-generated content to be included in the apply output.
destPhysAttrNameArray - The name of the physical attribute for destination.
fromTop - Indicates top predictions with the highest probabilities if true, or bottom predictions with lowest probabilities if false. If true/false, the top/bottom prediction is assigned to the first destination attribute (with index 0).
Returns:
void
Throws:
JDMException

mapClusters

public void mapClusters(ClusteringApplyContent content,
                        java.lang.String baseDestPhysAttrName)
                 throws JDMException
Maps all clusters in the model and the specified content value to a set of named destination attributes. The names are created in such a way that the base destination name is suffixed with a number that starts from 1, which represents a metric for the top cluster.

Parameters:
content -
baseDestPhysAttrName -
Returns:
void
Throws:
JDMException

mapTopCluster

public void mapTopCluster(ClusteringApplyContent content,
                          java.lang.String destPhysAttrName)
                   throws JDMException
Maps the cluster with the highest prediction metric to appear in the apply output under the specified attribute name. The choice of the prediction metric is vendor specific.

Parameters:
content - The content type of the top cluster.
destPhysAttrName - The destination attribute name of the content of the top cluster.
Returns:
void
Throws:
JDMException