Input
sports, as in BasketGenerator Example: Partition by player, Default BasketSize
SQL Call
SELECT * FROM FPGrowth ( ON sports AS InputTable OUT TABLE OutputRulesTable (fpgrowth_out_rule_1) OUT TABLE OutputPatternsTable (fpgrowth_out_pattern_1) USING TargetColumns ('sport') TransactionIDColumns ('player') ) AS dt;
Output
SELECT CAST(pattern_sport AS VARCHAR(30)), length_of_pattern, "count", support FROM fpgrowth_out_pattern_1;
pattern_sport length_of_pattern count support ------------------------------ ----------------- -------------------- ---------------------- baseball,tennis 2 1 7.14285714285714E-002 soccer,tennis 2 2 1.42857142857143E-001 basketball,lacrosse 2 1 7.14285714285714E-002 soccer,track and field 2 3 2.14285714285714E-001 baseball,golf 2 2 1.42857142857143E-001 baseball,basketball 2 4 2.85714285714286E-001 golf,lacrosse 2 1 7.14285714285714E-002 basketball,golf 2 1 7.14285714285714E-002 baseball,lacrosse 2 1 7.14285714285714E-002 baseball,soccer 2 1 7.14285714285714E-002 soccer,basketball 2 1 7.14285714285714E-002 tennis,track and field 2 2 1.42857142857143E-001 lacrosse,rugby 2 1 7.14285714285714E-002 golf,tennis 2 2 1.42857142857143E-001
SELECT CAST(antecedent_sport AS VARCHAR(20)), CAST(consequence_sport AS VARCHAR(20)), count_of_antecedent, count_of_consequence, cntb, cnt_antecedent, cnt_consequence, score, support, confidence, lift, conviction, leverage, coverage, chi_square, z_score FROM fpgrowth_out_rule_1;
antecedent_sport consequence_sport count_of_antecedent count_of_consequence cntb cnt_antecedent cnt_consequence score support confidence lift conviction leverage coverage chi_square z_score -------------------- -------------------- ------------------- -------------------- -------------------- -------------------- -------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- baseball basketball 1 1 4 5 4 8.00000000000000E-001 2.85714285714286E-001 8.00000000000000E-001 2.80000000000000E 000 3.57142857142857E 000 1.83673469387755E-001 3.57142857142857E-001 1.00800000000000E 001 ? basketball baseball 1 1 4 4 5 8.00000000000000E-001 2.85714285714286E-001 1.00000000000000E 000 2.80000000000000E 000 ? 1.83673469387755E-001 2.85714285714286E-001 1.00800000000000E 001 ?