RapidMiner

How to apply GSP patterns on new example?

Contributor II

How to apply GSP patterns on new example?

Hi,

I'm trying to generate sequences and apply the results on a new example dataset for a new customer ID.
What I want to know, is whether sequences from my GSP.pattern results (stored in the local repository) are found in that new example.

I actually would like to get something similar to the Apply Association Rules Operator as used in the following code, just for GSP patterns.

<?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" breakpoints="after" class="subprocess" compatibility="5.3.013" expanded="true" height="94" name="Subprocess" width="90" x="45" y="30">
       <process expanded="true">
         <operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Iris" width="90" x="45" y="30">
           <parameter key="repository_entry" value="//Samples/data/Iris"/>
         </operator>
         <operator activated="true" class="select_attributes" compatibility="5.3.013" expanded="true" height="76" name="Select Attributes" width="90" x="179" y="30">
           <parameter key="attribute_filter_type" value="single"/>
           <parameter key="attribute" value="label"/>
           <parameter key="invert_selection" value="true"/>
           <parameter key="include_special_attributes" value="true"/>
         </operator>
         <operator activated="true" class="discretize_by_frequency" compatibility="5.3.013" expanded="true" height="94" name="Discretize by Frequency" width="90" x="313" y="30">
           <parameter key="number_of_bins" value="5"/>
           <parameter key="range_name_type" value="short"/>
         </operator>
         <operator activated="true" class="nominal_to_binominal" compatibility="5.3.013" expanded="true" height="94" name="Nominal to Binominal" width="90" x="447" y="30">
           <parameter key="transform_binominal" value="true"/>
           <parameter key="use_underscore_in_name" value="true"/>
         </operator>
         <operator activated="true" class="split_data" compatibility="5.3.013" expanded="true" height="94" name="Split Data" width="90" x="581" y="30">
           <enumeration key="partitions">
             <parameter key="ratio" value="0.5"/>
             <parameter key="ratio" value="0.5"/>
           </enumeration>
         </operator>
         <operator activated="true" class="fp_growth" compatibility="5.3.013" expanded="true" height="76" name="FPGrowth" width="90" x="715" y="30">
           <parameter key="find_min_number_of_itemsets" value="false"/>
           <parameter key="min_number_of_itemsets" value="1"/>
           <parameter key="min_support" value="0.1"/>
         </operator>
         <operator activated="true" class="create_association_rules" compatibility="5.3.013" expanded="true" height="76" name="Create Association Rules" width="90" x="849" y="30"/>
         <connect from_op="Iris" from_port="output" to_op="Select Attributes" to_port="example set input"/>
         <connect from_op="Select Attributes" from_port="example set output" to_op="Discretize by Frequency" to_port="example set input"/>
         <connect from_op="Discretize by Frequency" from_port="example set output" to_op="Nominal to Binominal" to_port="example set input"/>
         <connect from_op="Nominal to Binominal" from_port="example set output" to_op="Split Data" to_port="example set"/>
         <connect from_op="Split Data" from_port="partition 1" to_op="FPGrowth" to_port="example set"/>
         <connect from_op="Split Data" from_port="partition 2" to_port="out 2"/>
         <connect from_op="FPGrowth" from_port="frequent sets" to_op="Create Association Rules" to_port="item sets"/>
         <connect from_op="Create Association Rules" from_port="rules" to_port="out 1"/>
         <portSpacing port="source_in 1" spacing="0"/>
         <portSpacing port="sink_out 1" spacing="0"/>
         <portSpacing port="sink_out 2" spacing="144"/>
         <portSpacing port="sink_out 3" spacing="144"/>
       </process>
     </operator>
     <operator activated="true" class="apply_association_rules" compatibility="5.3.013" expanded="true" height="76" name="Apply Association Rules" width="90" x="447" y="30"/>
     <connect from_op="Subprocess" from_port="out 1" to_op="Apply Association Rules" to_port="association rules"/>
     <connect from_op="Subprocess" from_port="out 2" to_op="Apply Association Rules" to_port="example set"/>
     <connect from_op="Apply Association Rules" from_port="example set" 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>


I hope that description is understandable...  Smiley Happy

Thanks,
Holger
3 REPLIES
Contributor II

Re: How to apply GSP patterns on new example?

Hi,

does really nobody know the answer to this? I find it strange that there is an Apply Association Rules Operator, but no Apply Generalizes Sequential Patterns Operator.

Thanks
Holger
Contributor II

Re: How to apply GSP patterns on new example?

Hi
Did you get any solutions for this, please share if yes?

Thanks
Contributor II

Re: How to apply GSP patterns on new example?

Hi,

no, unfortunately not...

Sorry