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_2) OUT TABLE OutputPatternsTable (fpgrowth_out_pattern_2) USING TargetColumns ('sport') TransactionIDColumns ('player') GroupByColumns ('league') ) AS dt;
Output
SELECT CAST(league AS varchar(10)), CAST(pattern_sport AS VARCHAR(30)), length_of_pattern, "count", support FROM fpgrowth_out_pattern_2;
league pattern_sport length_of_pattern count support ---------- ------------------------------ ----------------- -------------------- ---------------------- womens track and field,tennis 2 1 1.25000000000000E-001 womens baseball,golf 2 1 1.25000000000000E-001 womens soccer,track and field 2 2 2.50000000000000E-001 womens lacrosse,golf 2 1 1.25000000000000E-001 womens baseball,basketball 2 2 2.50000000000000E-001 mens baseball,golf 2 1 1.66666666666667E-001 mens soccer,track and field 2 1 1.66666666666667E-001 womens baseball,tennis 2 1 1.25000000000000E-001 mens baseball,basketball 2 2 3.33333333333333E-001 womens baseball,soccer 2 1 1.25000000000000E-001 womens soccer,tennis 2 1 1.25000000000000E-001 womens golf,tennis 2 1 1.25000000000000E-001 mens soccer,tennis 2 1 1.66666666666667E-001 womens lacrosse,rugby 2 1 1.25000000000000E-001 womens baseball,lacrosse 2 1 1.25000000000000E-001 womens lacrosse,basketball 2 1 1.25000000000000E-001 womens soccer,basketball 2 1 1.25000000000000E-001 mens basketball,golf 2 1 1.66666666666667E-001 mens tennis,track and field 2 1 1.66666666666667E-001 mens golf,tennis 2 1 1.66666666666667E-001
SELECT CAST(league AS VARCHAR(10)), 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_2;
league 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 ---------- -------------------- -------------------- ------------------- -------------------- -------------------- -------------------- -------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- womens rugby lacrosse 1 1 1 1 3 3.33333333333333E-001 1.25000000000000E-001 1.00000000000000E 000 2.66666666666667E 000 ? 7.81250000000000E-002 1.25000000000000E-001 1.90476190476190E 000 -1.00000000000000E 000 mens track and field soccer 1 1 1 1 2 5.00000000000000E-001 1.66666666666667E-001 1.00000000000000E 000 3.00000000000000E 000 ? 1.11111111111111E-001 1.66666666666667E-001 2.40000000000000E 000 -1.00000000000000E 000 womens basketball baseball 1 1 2 2 3 6.66666666666667E-001 2.50000000000000E-001 1.00000000000000E 000 2.66666666666667E 000 ? 1.56250000000000E-001 2.50000000000000E-001 4.44444444444444E 000 1.00000000000000E 000 mens track and field tennis 1 1 1 1 2 5.00000000000000E-001 1.66666666666667E-001 1.00000000000000E 000 3.00000000000000E 000 ? 1.11111111111111E-001 1.66666666666667E-001 2.40000000000000E 000 -1.00000000000000E 000 mens basketball baseball 1 1 2 2 2 1.00000000000000E 000 3.33333333333333E-001 1.00000000000000E 000 3.00000000000000E 000 ? 2.22222222222222E-001 3.33333333333333E-001 6.00000000000000E 000 1.00000000000000E 000 mens baseball basketball 1 1 2 2 2 1.00000000000000E 000 3.33333333333333E-001 1.00000000000000E 000 3.00000000000000E 000 ? 2.22222222222222E-001 3.33333333333333E-001 6.00000000000000E 000 1.00000000000000E 000