Java Reference
In-Depth Information
Table 9-20
Clustering-related interfaces (continued)
Methods
Description
isLeaf(): boolean
Returns true if the cluster is a leaf node in a hierarchical clus-
tering model and false if it is an internal node.
isRoot(): boolean
Returns true if the cluster is a root node in a hierarchical
clustering model and false if it is an internal node.
clustering.ClusteringApplySettings extends task.apply.ApplySettings
Methods
Description
mapTopCluster(
ClusteringApplyContent content,
String destPhysAttrName)
Maps the cluster with the highest prediction metric to appear
in the apply output under the specified attribute name. After
task completion, apply output data contains the specified
apply contents associated with the top cluster. For example,
when a user calls the following method, the apply task will
compute the top prediction value and populate topPredic-
tion column with the computed prediction value.
mapTopCluster
(ClusteringApplyContent.clusterIdentifier,“topCluster”)
mapByRank(
ClusteringApplyContent content,
String[] destPhysAttrNameArray,
boolean fromTop)
Maps the specified generated values for the predictions with the
specified ranks to an array of destination attributes. Used to
specify the prediction rank based apply contents for the apply
task. The number and order of ranks depends on the size of the
destPhysAttrNameArray and fromTop boolean value. For
example, when a user calls the following method, the apply task
will compute the top two clusters and populate columns
Top_1_Cluster and Top_2_Cluster with the appropriate clus-
ter ids. A user can call this method multiple times with differ-
ent types of apply contents to obtain additional information.
mapByRank(ClusteringApplyContent.clusterIdentifier,
new String[] { “Top_1_Cluster”, “Top_2_Cluster” },
true)
mapByClusterIdentifier(
ClusteringApplyContent content,
int clusterIdentifier,
String destinationAttrName)
Maps the specified content value for the specified cluster
identifier to the named destination attribute. For example,
when a user calls the following methods, the apply task will
compute the probabilities associated with clusters 1 and 2
and populate the probability values in the specified columns
i.e., cluster_1_probability and cluster_2_probability.
mapByClusterIdentifier
(ClusteringApplyContent.
probability, “1”, “Cluster_1_Probability”);
mapByClusterIdentifier
(ClusteringApplyContent.
probability, “2”, “Cluster_2_Probability”);
 
Search WWH ::




Custom Search