Options

GSP Window Size, Max/Min Gap?

willgouldinwillgouldin Member Posts: 14 Contributor II
edited November 2018 in Help
Big Thanks to the RM crew for fixing the output to the GSP operator in the last release!

I'm having trouble with my setup however and would like some advice.

I'm using a data set of Customer, Time, Product where time is the Julian Day of the year when the purchase happens.

Regardless of my window and gap size, I get the same resultant patterns. 

Thank you for any help that can be provided!



Below is my code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.013">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="read_excel" compatibility="5.3.013" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
        <parameter key="excel_file" value="C:\Users\me\Desktop\gsp input.xls"/>
        <parameter key="sheet_number" value="2"/>
        <parameter key="imported_cell_range" value="A1:C65536"/>
        <parameter key="first_row_as_names" value="false"/>
        <list key="annotations">
          <parameter key="0" value="Name"/>
        </list>
        <list key="data_set_meta_data_information">
          <parameter key="0" value="Time_Customer.true.polynominal.attribute"/>
          <parameter key="1" value="Item.true.polynominal.attribute"/>
          <parameter key="2" value="Count.true.binominal.attribute"/>
        </list>
      </operator>
      <operator activated="true" class="pivot" compatibility="5.3.013" expanded="true" height="76" name="Pivot" width="90" x="179" y="30">
        <parameter key="group_attribute" value="Time_Customer"/>
        <parameter key="index_attribute" value="Item"/>
        <parameter key="consider_weights" value="false"/>
        <parameter key="skip_constant_attributes" value="false"/>
      </operator>
      <operator activated="true" class="replace_missing_values" compatibility="5.3.013" expanded="true" height="94" name="Replace Missing Values" width="90" x="313" y="30">
        <parameter key="attribute" value="Time_Customer"/>
        <parameter key="include_special_attributes" value="true"/>
        <parameter key="default" value="value"/>
        <list key="columns"/>
        <parameter key="replenishment_value" value="0"/>
      </operator>
      <operator activated="true" class="split" compatibility="5.3.013" expanded="true" height="76" name="Split" width="90" x="112" y="210">
        <parameter key="attribute_filter_type" value="single"/>
        <parameter key="attribute" value="Time_Customer"/>
        <parameter key="split_pattern" value="_"/>
      </operator>
      <operator activated="true" class="rename" compatibility="5.3.013" expanded="true" height="76" name="Rename" width="90" x="246" y="210">
        <parameter key="old_name" value="Time_Customer_1"/>
        <parameter key="new_name" value="Time"/>
        <list key="rename_additional_attributes">
          <parameter key="Time_Customer_2" value="Customer"/>
        </list>
      </operator>
      <operator activated="true" class="order_attributes" compatibility="5.3.013" expanded="true" height="76" name="Reorder Attributes" width="90" x="380" y="210">
        <parameter key="attribute_ordering" value="Customer|Time|Count"/>
      </operator>
      <operator activated="true" class="nominal_to_numerical" compatibility="5.3.013" expanded="true" height="94" name="Nominal to Numerical" width="90" x="514" y="210">
        <parameter key="attribute_filter_type" value="single"/>
        <parameter key="attribute" value="Time"/>
        <parameter key="coding_type" value="unique integers"/>
        <list key="comparison_groups"/>
      </operator>
      <operator activated="true" class="generalized_sequential_patterns" compatibility="5.3.013" expanded="true" height="76" name="GSP" width="90" x="648" y="120">
        <parameter key="customer_id" value="Customer"/>
        <parameter key="time_attribute" value="Time"/>
        <parameter key="min_support" value="0.1"/>
        <parameter key="window_size" value="2.0"/>
        <parameter key="max_gap" value="180.0"/>
        <parameter key="min_gap" value="180.0"/>
        <parameter key="positive_value" value="1"/>
      </operator>
      <connect from_op="Read Excel" from_port="output" to_op="Pivot" to_port="example set input"/>
      <connect from_op="Pivot" from_port="example set output" to_op="Replace Missing Values" to_port="example set input"/>
      <connect from_op="Replace Missing Values" from_port="example set output" to_op="Split" to_port="example set input"/>
      <connect from_op="Split" from_port="example set output" to_op="Rename" to_port="example set input"/>
      <connect from_op="Rename" from_port="example set output" to_op="Reorder Attributes" to_port="example set input"/>
      <connect from_op="Reorder Attributes" from_port="example set output" to_op="Nominal to Numerical" to_port="example set input"/>
      <connect from_op="Nominal to Numerical" from_port="example set 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.