User Documentation
 All Files Functions Groups
assoc_rules.sql_in File Reference

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.
 

Detailed Description

Date
June 2011 August 2012
See Also
For a brief introduction to the association rules implementation, see the module description Apriori Algorithm.

Definition in file assoc_rules.sql_in.

Function Documentation

assoc_rules_results assoc_rules ( float8  support,
float8  confidence,
text  tid_col,
text  item_col,
text  input_table,
text  output_schema,
boolean  verbose 
)
Parameters
supportminimum level of support needed for each itemset to be included in result
confidenceminimum level of confidence needed for each rule to be included in result
tid_colname of the column storing the transaction ids
item_colname of the column storing the products
input_tablename of the table where the data is stored
output_schemaname of the schema where the final results will be stored
verbosedetermining if output contains comments
Returns
The schema and table name containing association rules, and total number of rules found.

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.