apriorinode properties

Apriori node iconThe Apriori node extracts a set of rules from the data, pulling out the rules with the highest information content. Apriori offers five different methods of selecting rules and uses a sophisticated indexing scheme to process large data sets efficiently. For large problems, Apriori is generally faster to train; it has no arbitrary limit on the number of rules that can be retained, and it can handle rules with up to 32 preconditions. Apriori requires that input and output fields all be categorical but delivers better performance because it'ss optimized for this type of data.


node = stream.create("apriori", "My node")
# "Fields" tab
node.setPropertyValue("custom_fields", True)
node.setPropertyValue("partition", "Test")
# For non-transactional
node.setPropertyValue("use_transactional_data", False)
node.setPropertyValue("consequents", ["Age"])
node.setPropertyValue("antecedents", ["BP", "Cholesterol", "Drug"])
# For transactional
node.setPropertyValue("use_transactional_data", True)
node.setPropertyValue("id_field", "Age")
node.setPropertyValue("contiguous", True)
node.setPropertyValue("content_field", "Drug")
# "Model" tab
node.setPropertyValue("use_model_name", False)
node.setPropertyValue("model_name", "Apriori_bp_choles_drug")
node.setPropertyValue("min_supp", 7.0)
node.setPropertyValue("min_conf", 30.0)
node.setPropertyValue("max_antecedents", 7)
node.setPropertyValue("true_flags", False)
node.setPropertyValue("optimize", "Memory")
# "Expert" tab
node.setPropertyValue("mode", "Expert")
node.setPropertyValue("evaluation", "ConfidenceRatio")
node.setPropertyValue("lower_bound", 7)
Table 1. apriorinode properties
apriorinode Properties Values Property description
consequents field Apriori models use Consequents and Antecedents in place of the standard target and input fields. Weight and frequency fields are not used. See Common modeling node properties for more information.
antecedents [field1 ... fieldN]  
min_supp number  
min_conf number  
max_antecedents number  
true_flags flag  
optimize Speed
use_transactional_data flag  
contiguous flag  
id_field string  
content_field string  
mode Simple Expert  
evaluation RuleConfidence
lower_bound number  
optimize Speed
Use to specify whether model building should be optimized for speed or for memory.
rules_without_antececents boolean Select to allow rules that include only the consequent (item or item set). This is useful when you are interested in determining common items or item sets. For example, cannedveg is a single-item rule without an antecedent that indicates purchasing cannedveg is a common occurrence in the data.