MADlib
1.1 A newer version is available
User Documentation
|
The assoc_rules function computes association rules for a given set of data. The data is assumed to have two dimensions; items (between which we are trying to discover associations), and a transaction id. This tranaction id groups the items by event and could also be a user id, date, etc. depending on the context of the data. This function assumes the data is stored in two columns with one transaction id and one item per row. More...
Go to the source code of this file.
Functions | |
assoc_rules_results | assoc_rules (float8 support, float8 confidence, text tid_col, text item_col, text input_table, text output_schema, boolean verbose) |
assoc_rules_results | assoc_rules (float8 support, float8 confidence, text tid_col, text item_col, text input_table, text output_schema) |
The short form of the above function with vobose removed. | |
Definition in file assoc_rules.sql_in.
assoc_rules_results assoc_rules | ( | float8 | support, |
float8 | confidence, | ||
text | tid_col, | ||
text | item_col, | ||
text | input_table, | ||
text | output_schema, | ||
boolean | verbose | ||
) |
support | minimum level of support needed for each itemset to be included in result |
confidence | minimum level of confidence needed for each rule to be included in result |
tid_col | name of the column storing the transaction ids |
item_col | name of the column storing the products |
input_table | name of the table where the data is stored |
output_schema | name of the schema where the final results will be stored |
verbose | determining if output contains comments |
This function computes the association rules between products in a data set. It reads the name of the table, the column names of the product and ids, and computes ssociation rules using the Apriori algorithm, and subject to the support and confidence constraints as input by the user. This version of association rules has verbose functionality. When verbose is true, output of function includes iteration steps and comments on Apriori algorithm steps.
Definition at line 293 of file assoc_rules.sql_in.