Most of the stored procedures used for sequence clustering models have the same names as those used for clustering models; however, the number of arguments can be different and the results from a sequence clustering model include transitions and states as well as any other attributes that might have been used for clustering.
This section shows only examples for models based on the Microsoft Sequence Clustering algorithm.
Returns the states and transitions in the specified cluster.
System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterCharacteristics
Model name as string
Node ID as string (optional)
Threshold value as double (optional)
The example returns all the characteristics of Cluster 12 that have a probability score over the specified threshold of 0.05.
CALL System.GetClusterCharacteristics('Sequence Clustering','12',0.05)
Attributes |
Values |
Frequency |
Support |
Model.Transitions |
[Start] -> Touring-1000 |
0.135565537 |
285 |
Model |
Water Bottle |
0.119103087 |
Mt;width:25%;background-color:transparent;">
251 |
Model.Transitions |
[Start] -> Mountain-200 |
0.093507554 |
197 |
Model |
Sport-100 |
0.085614444 |
180 |
This stored procedure is used by the Microsoft Sequence Clustering Viewer.
Queries on a Sequence Clustering Model (MSDN)
Returns the attributes that are most different between the two specified clusters, or that distinguish one cluster from the rest of the cases in the model.
System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterDiscrimination
Model name as string
Node unique id as string
Second node unique id as string, or omit for complement
Probability threshold as double
Rescaled as Boolean
The following example compares the characteristics of Cluster 9 with its complement, but only returns attributes for which the probability score is over the specified threshold of 0.005.
The rescaled argument true indicates that the probabilities should be normalized.
CALL System.GetClusterDiscrimination('Sequence Clustering','009','',0.8, true)
The following example compares the characteristics of Cluster 1 and Cluster 12, but returns only attributes that have an absolute score greater than 10.
CALL System.GetClusterDiscrimination('Sequence Clustering','1','12',10,true)
A positive value for Scores indicates that the attribute favors the first cluster (1); a negative score indicates that the attribute favors the second cluster (12).
If a second node is not specified for comparison, the procedure returns the complement of the first node, meaning all remaining cases not in the first specified node. If you specify a node ID of 0, the attributes for the entire model are returned.
Attributes |
Values |
Score |
|
Income Group |
Low |
100 |
|
Score | |||
Income Group |
Income Group |
High |
-90 |
Model.Transitions |
Mountain-400-W-> [End] |
-48 |
|
Model.Transitions |
LL Mountain Tire->[End] |
-45 |
|
Model.Transitions |
Touring Tire Tube->[End] |
-36 |
Notes
This stored procedure is used by the Microsoft Sequence Clustering Viewer.
Queries on a Sequence Clustering Model (MSDN)
Fully qualified procedure name
System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusterProfiles
Parameters
Model name as string
Count of attributes as integer
ID of attribute to start at as integer
Example
This example returns all of the clusters in the model, with their respective profiles. Each profile shows the distribution of attribute values for the attributes specified by the second and third arguments.
CALL System.GetClusterProfiles('Sequence Clustering', 1, 0)
ID of attribute to start at as integer
Sample results
AttributeName |
AttributeValue |
AttributeValueType |
ValueTag |
Marginal |
1 |
Model |
Touring-1000 |
1 |
Probability |
0 |
2.22021 |
Model |
Touring-1000 |
1 |
Support |
0 |
0.0003 |
Model |
Touring-2000 |
4 |
Probability |
0.286847234357148 |
0.846601 |
Model |
Touring-2000 |
4 |
Support |
4268 |
1487.1309 |
Model |
Touring-3000 |
4 |
Probability |
0.491699 |
2.1685 |
Model |
Touring-3000 |
4 |
Support |
7316 |
0.00038 |
Notes
This stored procedure executes a series of DMX statements that return the complete set of profiles in the model. The clusters are not returned in any specific order and you cannot restrict the results by cluster.
See also
Queries on a Sequence Clustering Model (MSDN)
Returns a list of all clusters in the model, with the node ID and cluster name.
Fully qualified procedure name
System.Microsoft.AnalysisServices.System.DataMining.Clustering.GetClusters
Parameters
Model name as string
Example
This example gets a list of all clusters in the model, with the ID of each cluster. If you have renamed the cluster, the new name is returned.
CALL System.GetClusters('SequenceClustering')
Sample results
ClusterName |
ClusterUniqueNodeID |
Renamed cluster 1 |
1 |
Cluster 2 |
2 |
Notes
None
See also
Queries on a Sequence Clustering Model (MSDN)