【问题标题】:What is the criteria of data that will be used in FP-Growth mining in rapidminner?在 rapidminner 中用于 FP-Growth 挖掘的数据标准是什么?
【发布时间】:2019-01-03 14:23:53
【问题描述】:

我想在 RapidMiner 中处理这样的数据集:

order_id |项目1 |项目2 |项目3

1 |书 |书 |铅笔

2 |铅笔| 高分辨率照片| CLIPARTO书 |橡皮擦

我想使用 fp-growth 和关联规则来处理这些数据。什么是适合 RapidMiner 规则的合适数据集?

【问题讨论】:

    标签: associations rules rapidminer mining fpgrowth


    【解决方案1】:

    您看过RapidMiner中FP-Growth算子的教程流程吗(点击帮助文本中的链接),您可以找到详细的示例流程。数据已经与您的示例非常相似 [1]

    将此类结构化数据导入 RapidMiner 很容易。使用“导入数据”按钮,或使用“Turbo Prep”辅助工具加载和准备数据。

    [1] 只需将 xml 复制到您的流程设计窗口中:

    <?xml version="1.0" encoding="UTF-8"?><process version="9.1.000">
     <context>
     <input/>
     <output/>
     <macros/>
     </context>
      <operator activated="true" class="process" compatibility="9.1.000" expanded="true" name="Process" origin="GENERATED_TUTORIAL">
    <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" breakpoints="after" class="retrieve" compatibility="9.1.000" expanded="true" height="68" name="Load Transactions" origin="GENERATED_TUTORIAL" width="90" x="112" y="187">
        <parameter key="repository_entry" value="//Samples/Templates/Market Basket Analysis/Transactions"/>
      </operator>
      <operator activated="true" class="aggregate" compatibility="6.0.006" expanded="true" height="82" name="Aggregate" origin="GENERATED_TUTORIAL" width="90" x="112" y="336">
        <parameter key="use_default_aggregation" value="false"/>
        <parameter key="attribute_filter_type" value="all"/>
        <parameter key="attribute" value=""/>
        <parameter key="attributes" value=""/>
        <parameter key="use_except_expression" value="false"/>
        <parameter key="value_type" value="attribute_value"/>
        <parameter key="use_value_type_exception" value="false"/>
        <parameter key="except_value_type" value="time"/>
        <parameter key="block_type" value="attribute_block"/>
        <parameter key="use_block_type_exception" value="false"/>
        <parameter key="except_block_type" value="value_matrix_row_start"/>
        <parameter key="invert_selection" value="false"/>
        <parameter key="include_special_attributes" value="false"/>
        <parameter key="default_aggregation_function" value="average"/>
        <list key="aggregation_attributes">
          <parameter key="product 1" value="concatenation"/>
        </list>
        <parameter key="group_by_attributes" value="Invoice"/>
        <parameter key="count_all_combinations" value="false"/>
        <parameter key="only_distinct" value="false"/>
        <parameter key="ignore_missings" value="true"/>
      </operator>
      <operator activated="true" class="rename" compatibility="9.1.000" expanded="true" height="82" name="Rename" origin="GENERATED_TUTORIAL" width="90" x="246" y="340">
        <parameter key="old_name" value="concat(product 1)"/>
        <parameter key="new_name" value="Products"/>
        <list key="rename_additional_attributes"/>
      </operator>
      <operator activated="true" class="set_role" compatibility="9.1.000" expanded="true" height="82" name="Set Role" origin="GENERATED_TUTORIAL" width="90" x="380" y="340">
        <parameter key="attribute_name" value="Invoice"/>
        <parameter key="target_role" value="id"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" breakpoints="before" class="concurrency:fp_growth" compatibility="9.1.000" expanded="true" height="82" name="FP-Growth" origin="GENERATED_TUTORIAL" width="90" x="648" y="289">
        <parameter key="input_format" value="item list in a column"/>
        <parameter key="item_separators" value="|"/>
        <parameter key="use_quotes" value="false"/>
        <parameter key="quotes_character" value="&quot;"/>
        <parameter key="escape_character" value="\"/>
        <parameter key="trim_item_names" value="true"/>
        <parameter key="positive_value" value="true"/>
        <parameter key="min_requirement" value="support"/>
        <parameter key="min_support" value="0.005"/>
        <parameter key="min_frequency" value="100"/>
        <parameter key="min_items_per_itemset" value="1"/>
        <parameter key="max_items_per_itemset" value="0"/>
        <parameter key="max_number_of_itemsets" value="1000000"/>
        <parameter key="find_min_number_of_itemsets" value="false"/>
        <parameter key="min_number_of_itemsets" value="100"/>
        <parameter key="max_number_of_retries" value="15"/>
        <parameter key="requirement_decrease_factor" value="0.9"/>
        <enumeration key="must_contain_list"/>
      </operator>
      <operator activated="true" class="create_association_rules" compatibility="9.1.000" expanded="true" height="82" name="Create Association Rules" origin="GENERATED_TUTORIAL" width="90" x="648" y="442">
        <parameter key="criterion" value="confidence"/>
        <parameter key="min_confidence" value="0.1"/>
        <parameter key="min_criterion_value" value="0.8"/>
        <parameter key="gain_theta" value="2.0"/>
        <parameter key="laplace_k" value="1.0"/>
      </operator>
      <connect from_op="Load Transactions" from_port="output" to_op="Aggregate" to_port="example set input"/>
      <connect from_op="Aggregate" from_port="example set output" to_op="Rename" to_port="example set input"/>
      <connect from_op="Rename" from_port="example set output" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="FP-Growth" to_port="example set"/>
      <connect from_op="FP-Growth" from_port="frequent sets" to_op="Create Association Rules" to_port="item sets"/>
      <connect from_op="Create Association Rules" from_port="rules" to_port="result 1"/>
      <connect from_op="Create Association Rules" from_port="item sets" to_port="result 2"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="147"/>
      <portSpacing port="sink_result 2" spacing="0"/>
      <portSpacing port="sink_result 3" spacing="42"/>
      <description align="left" color="yellow" colored="false" height="70" resized="false" width="850" x="20" y="25">MARKET BASKET ANALYSIS&lt;br&gt;Model associations
                                    between products by determining sets of items frequently purchased together and building
                                    association rules to derive recommendations.
                                </description>
      <description align="left" color="blue" colored="true" height="185" resized="true" width="550" x="20" y="105">Step 1:&lt;br/&gt;Load transaction data containing a
                                    transaction id, a product id and a quantifier. The data denotes how many times a certain
                                    product has been purchased as part of a transactions.
                                </description>
      <description align="left" color="purple" colored="true" height="341" resized="true" width="549" x="20" y="300">&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt;
                                    &lt;br&gt; &lt;br&gt; &lt;br&gt; Step 2:&lt;br&gt;Edit, transform &amp;amp; load (ETL) -
                                    Aggregate transaction data via concatenation so that the products in a transaction are
                                    in one entry, separated by the pipe symbol.&lt;br&gt;
                                </description>
      <description align="left" color="green" colored="true" height="310" resized="true" width="290" x="580" y="105">Step 3:&lt;br/&gt;Using FP-Growth, determine
                                    frequent item sets. A frequent item sets denotes that the items (products) in the set
                                    have been purchased together frequently, i.e. in a certain ratio of transactions. This
                                    ratio is given by the support of the item set.
                                </description>
      <description align="left" color="green" colored="true" height="215" resized="true" width="286" x="579" y="425">&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt;
                                    &lt;br&gt; Step 4:&lt;br/&gt;Create association rules which can be used for product
                                    recommendations depending on the confidences of the rules.&lt;br&gt;
                                </description>
      <description align="left" color="yellow" colored="false" height="35" resized="true" width="849" x="20" y="655">Outputs: association rules, frequent item set&lt;br&gt;
                                </description>
    </process>
    </operator>
    </process>
    

    【讨论】:

      猜你喜欢
      • 2012-12-26
      • 2010-11-12
      • 1970-01-01
      • 2011-04-13
      • 2016-07-21
      • 2021-07-23
      • 1970-01-01
      • 1970-01-01
      • 2017-10-11
      相关资源
      最近更新 更多