0 / 0
sequencenode properties
Last updated: Jan 18, 2024
sequencenode properties

Sequence node iconThe Sequence node discovers association rules in sequential or time-oriented data. A sequence is a list of item sets that tends to occur in a predictable order. For example, a customer who purchases a razor and aftershave lotion may purchase shaving cream the next time he shops. The Sequence node is based on the CARMA association rules algorithm, which uses an efficient two-pass method for finding sequences.

Example

node = stream.create("sequence", "My node")
# "Fields" tab
node.setPropertyValue("id_field", "Age")
node.setPropertyValue("contiguous", True)
node.setPropertyValue("use_time_field", True)
node.setPropertyValue("time_field", "Date1")
node.setPropertyValue("content_fields", ["Drug", "BP"])
node.setPropertyValue("partition", "Test")
# "Model" tab
node.setPropertyValue("use_model_name", True)
node.setPropertyValue("model_name", "Sequence_test")
node.setPropertyValue("use_partitioned_data", False)
node.setPropertyValue("min_supp", 15.0)
node.setPropertyValue("min_conf", 14.0)
node.setPropertyValue("max_size", 7)
node.setPropertyValue("max_predictions", 5)
# "Expert" tab
node.setPropertyValue("mode", "Expert")
node.setPropertyValue("use_max_duration", True)
node.setPropertyValue("max_duration", 3.0)
node.setPropertyValue("use_pruning", True)
node.setPropertyValue("pruning_value", 4.0)
node.setPropertyValue("set_mem_sequences", True)
node.setPropertyValue("mem_sequences", 5.0)
node.setPropertyValue("use_gaps", True)
node.setPropertyValue("min_item_gap", 20.0)
node.setPropertyValue("max_item_gap", 30.0)
Table 1. sequencenode properties
sequencenode Properties Values Property description
id_field field To create a Sequence model, you need to specify an ID field, an optional time field, and one or more content fields. Weight and frequency fields are not used. See Common modeling node properties for more information.
time_field field  
use_time_field flag  
content_fields [field1 ... fieldn]  
contiguous flag  
min_supp number  
min_conf number  
max_size number  
max_predictions number  
mode Simple Expert  
use_max_duration flag  
max_duration number  
use_gaps flag  
min_item_gap number  
max_item_gap number  
use_pruning flag  
pruning_value number  
set_mem_sequences flag  
mem_sequences integer  
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more