Database Reference
In-Depth Information
Node Probability Support
Products.Name
...
...
...
...
72
0.0728
319
Assoc Line Items1(Raclette Courdavault)
73
0.0804
352
Assoc Line Items1(Gnocchi di nonna Alice)
74
0.0125
55
Assoc Line Items1(Sirop d
'
erable)
74
0.0125
55
Assoc Line Items1(Sir Rodney ' s Scones)
75
0.0100
44
Assoc Line Items1(Zaanse koeken)
75
0.0100
44
Assoc Line Items1(Gnocchi di nonna Alice)
...
...
...
...
As another example, the following query returns the top 5 itemsets ordered by
the support for each node. The NODE CAPTION provides a text description
of the items:
SELECT TOP 5 (NODE SUPPORT), NODE NAME, NODE CAPTION
FROM Association.CONTENT
WHERE NODE TYPE = 7
This query returns the following table:
NODE SUPPORT NODE NAME
NODE CAPTION
352
73
Gnocchi di nonna Alice = Existing
319
72
Raclette Courdavault = Existing
275
70
Gorgonzola Telino = Existing
275
71
Boston Crab Meat = Existing
264
69
Rhonbrau Klosterbier = Existing
Finally, we can use the model to issue prediction queries, typically based on
rules, to be used, for example, to make recommendations. The following query
tells us what products we can recommend to a customer who has purchased
a particular product. Since the column that corresponds to the products to
be predicted is a nested table, we must use one SELECT clause to map the
new value to the nested table column [Product Name] and another SELECT
clause to map the nested table column to the case-level column, [Assoc Line
Items] . Adding the keyword INCLUDE STATISTICS to the query displays the
probability and support for the recommendation:
SELECT FLATTENED PredictAssociation([Association].[Assoc Line Items],
INCLUDE STATISTICS, 3) AS [A]
FROM [Association] NATURAL PREDICTION JOIN
( SELECT
( SELECT ' Tarte au sucre ' AS [Product Name] )
AS[AssocLineItems])AST
 
Search WWH ::




Custom Search