Options

GSP max gap not working

mleecemleece Member Posts: 1 Contributor I
edited November 2018 in Help
Hi all,

I'm attempting to use the GSP operator to extract some patterns from some data, but decided to test it on a simple set first to be sure I understand it. For the most part it seems to be correct, with the sliding window aggregating things appropriately and such, but the gap parameters don't seem to be being used. My data looks like:

customer_id, time, 1, 2, 3, 4, 5
1, 1.0, 1, 0, 0, 0, 0
1, 2.0, 0, 1, 0, 0, 0
1, 15.0, 0, 0, 1, 1, 0
2, 1.0, 1, 1, 0, 0, 0
2, 20.0, 0, 0, 0, 0, 1
2, 50.0, 0, 0, 1, 0, 0

When I import it, I'm making sure to set the feature columns to binomials.

When min support is 1, window size is 0, min gap is 0, and max gap is 100 (basically eliminating the meaningfulness of these parameters), I get <1> <3> and <2> <3>, which I would expect. However, if I drop the max gap to 20, both of them should drop out, since they aren't supported by customer 2 anymore, but I still get both of those patterns. Could I be doing something incorrectly, or are these parameters not implemented yet?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.0.002">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
   <parameter key="logverbosity" value="init"/>
   <parameter key="random_seed" value="2001"/>
   <parameter key="send_mail" value="never"/>
   <parameter key="notification_email" value=""/>
   <parameter key="process_duration_for_mail" value="30"/>
   <parameter key="encoding" value="SYSTEM"/>
   <process expanded="true">
     <operator activated="true" class="retrieve" compatibility="6.0.002" expanded="true" height="60" name="Retrieve GSPinput" width="90" x="112" y="120">
       <parameter key="repository_entry" value="../data/GSPinput"/>
     </operator>
     <operator activated="true" class="generalized_sequential_patterns" compatibility="6.0.002" expanded="true" height="76" name="GSP" width="90" x="447" y="120">
       <parameter key="customer_id" value="customer_id"/>
       <parameter key="time_attribute" value="time"/>
       <parameter key="min_support" value="0.8"/>
       <parameter key="window_size" value="0.0"/>
       <parameter key="max_gap" value="10.0"/>
       <parameter key="min_gap" value="0.0"/>
       <parameter key="positive_value" value="1"/>
     </operator>
     <connect from_op="Retrieve GSPinput" from_port="output" to_op="GSP" to_port="example set"/>
     <connect from_op="GSP" from_port="patterns" to_port="result 1"/>
     <portSpacing port="source_input 1" spacing="0"/>
     <portSpacing port="sink_result 1" spacing="0"/>
     <portSpacing port="sink_result 2" spacing="0"/>
   </process>
 </operator>
</process>
Sign In or Register to comment.