This section contains stored procedures that can be used with association models only.
Returns a list of the nodes in an association model that represent single attribute values.
Fully qualified procedure name
System.Microsoft.AnalysisServices.System.DataMining.AssociationRules.ARGetNodes
Parameters
Model name as string
Example
This example returns all the nodes that represent single attribute values.
CALL System.ARGetNodes ('Associations')
Sample results
NODE_UNIQUE_NAME_1 |
NODE_CAPTION |
ATTRIBUTE_NAME |
ATTRIBUTE_LONG_NAME |
ATTRIBUTE_VALUE |
|
43 |
Region=North America |
Region |
|
North America |
|
42 |
Income Group = High |
|
Income Group |
|
High |
41 |
Income Group = Moderate |
Income Group |
|
Moderate |
|
40 |
Sport-100=Existing |
Sport-100 |
vAssocSeLineItems |
Existing |
Notes
An association model always begins by building itemsets of length one—that is, each itemset contains only one item. After that list is complete, the algorithm builds itemsets comprised of combinations of itemsets. Hence, if you know the node ID of the itemset that represents the individual attribute value, you can use it to look up related itemsets.
This stored procedure is used by the Microsoft Dependency Network viewer for association models.
See also
The following article in Books Online describes how itemsets are created.
Microsoft Association Algorithm Technical Reference
For an example of how to get itemsets that are related to a single item, see Querying an Association Model.
Returns a sorted and optionally filtered list of the itemsets in the model.
Fully qualified procedure name
System.Microsoft.AnalysisServices.System.DataMining.AssociationRules.GetItemsets
Parameters
Model name as string
Start index as integer
End index as integer
Sort order as integer
Minimum itemset size as integer
Minimum itemset support as integer
Filter text as string
Show/hide long name as Boolean
Example
This example gets a list of the itemsets that contain the word “tube”, that have a minimum of 3 items in the itemset, and that have minimum support of 40. The list of itemsets is sorted by ascending support. The rows begin at the top itemset (with the index 0) and ends at the itemset with the index 2, for a total of three itemsets.
The keyword false indicates that the table name is NOT stripped off; in other words, the long names of the attributes should be returned.
CALL System.GetItemsets('Associations', 0, 2, 4, 3, 40, 'tube', True)
Notes
Itemsets and rules can be sorted by specifying one of the following sort orders:
Sort order |
Notes
|
Ascending probability |
0 |
Descending probability |
1 |
Ascending lift |
2 |
Descending lift |
3 |
Ascending support |
4 |
Descending support |
5 |
Ascending itemset length |
6 |
Descending itemset length |
7 |
Itemset or rule name A-Z |
8 |
Itemset or rule name Z-A |
9 |
See also
The following article provides more examples of how to work with rules.
Counting rules and ItemsetsItemset or rule name Z-A
9
Returns a sorted and optionally filtered list of the rules that are contained in the model.
Fully qualified procedure name
System.Microsoft.AnalysisServices.System.DataMining.AssociationRules.GetRules
Parameters
Model name as string
Start index as integer
End index as integer
Sort order as integer
Minimum rule probability as double
Minimum rule importance as double
Filter text as string
Show/hide long name as Boolean
Example
This example gets a list of the top six rules that meet these conditions:
Rule contains the word “tube”
Minimum probability of .9
Importance score at least 0.54
System.GetRules('Associations', 0, 5, 1, 0.9, 0.54, 'tube', True)
Notes
The list of rules that is returned is sorted by descending probability. For a list of the sort orders that can be applied, see the table in the section for GetItemsets.
The second and third arguments control the number of rules returned. The list of rules begins with the rule indexed at 0, and ends with rule 5.
See also
The following article provides more examples of how to work with rules.
Counting rules and Itemsets
The following article describes how you can get predictions that are generated from specific rules, rather than overall probability in the model.
Returning Associative Predictions Based Solely on Rules
Returns a set of statistics about the association model, including the rules and itemsets found.
Fully qualified procedure name
System.Microsoft.AnalysisServices.System.DataMining.AssociationRules.GetStatistics
Parameters
Model name as string
Example
This example gets the information listed in the following table, for the specified association model. Some of these some values, such as the minimum itemset size, can be set by using algorithm parameters.
CALL System.GetStatistics('Associations')
Sample results
MAX_PAGE_SIZE |
2000 |
||
MIN_SUPPORT |
14 |
||
MAX_SUPPORT |
7320 |
||
MIN_ITEMSET_SIZE |
0 |
||
MAX_ITEMSET_SIZE |
3 |
MIN_RULE_PROBABILITY |
0.4 |
MAX_RULE_PROBABILITY |
1 |
||
MIN_RULE_LIFT |
0.143325808 |
||
MAX_RULE_LIFT |
1.891413556 |
Notes
The values returned by this stored procedure are used in the Association viewer, to populate the viewer grid and to filter rules and itemsets.
See also
The following article provides additional tips for working with association models.
http://www.sqlserverdatamining.com/ssdm/Default.aspx?tabid=102&Id=11
Return to list of stored procedures for other model types.