0

項目セット形式のコンマ区切りのトランザクション (バスケット) データがあります

citrus fruit,semi-finished,bread,margarine
tropical fruit,yogurt,coffee,milk
yogurt,cream,cheese,meat spreads
 etc

ここで、各行は、1 回のトランザクションで購入されたアイテムを示します。Read.CSV オペレーターを使用して、このファイルを RapidMiner にロードしました。このデータを FP 成長およびアソシエーション ルール マイニング用に変換する演算子を見つけることができませんでした。

アソシエーション ルール マイニングのために、RapidMiner でそのようなタイプのファイルを読み取る方法はありますか?

4

1 に答える 1

0

ようやく意味がわかりました。遅くなってすみません。これは、テキスト処理拡張機能の演算子を使用して実行できます。これは、RapidMiner リポジトリからインストールする必要があります。取得したら、このプロセスを試すことができます。

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="7.0.000">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="7.0.000" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="read_csv" compatibility="7.0.000" expanded="true" height="68" name="Read CSV" width="90" x="246" y="85">
        <parameter key="csv_file" value="C:\Temp\is.txt"/>
        <parameter key="column_separators" value="\r\n"/>
        <parameter key="first_row_as_names" value="false"/>
        <list key="annotations"/>
        <parameter key="encoding" value="windows-1252"/>
        <list key="data_set_meta_data_information">
          <parameter key="0" value="att1.true.polynominal.attribute"/>
        </list>
      </operator>
      <operator activated="true" class="nominal_to_text" compatibility="7.0.000" expanded="true" height="82" name="Nominal to Text" width="90" x="380" y="85"/>
      <operator activated="true" class="text:process_document_from_data" compatibility="7.0.000" expanded="true" height="82" name="Process Documents from Data" width="90" x="514" y="85">
        <parameter key="vector_creation" value="Term Occurrences"/>
        <list key="specify_weights"/>
        <process expanded="true">
          <operator activated="true" class="text:tokenize" compatibility="7.0.000" expanded="true" height="68" name="Tokenize" width="90" x="45" y="34">
            <parameter key="mode" value="specify characters"/>
            <parameter key="characters" value=","/>
          </operator>
          <connect from_port="document" to_op="Tokenize" to_port="document"/>
          <connect from_op="Tokenize" from_port="document" to_port="document 1"/>
          <portSpacing port="source_document" spacing="0"/>
          <portSpacing port="sink_document 1" spacing="0"/>
          <portSpacing port="sink_document 2" spacing="0"/>
        </process>
      </operator>
      <connect from_op="Read CSV" from_port="output" to_op="Nominal to Text" to_port="example set input"/>
      <connect from_op="Nominal to Text" from_port="example set output" to_op="Process Documents from Data" to_port="example set"/>
      <connect from_op="Process Documents from Data" 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>

トリックはRead CSV、元のファイルを読み込むために使用することですが、区切り文字として行末を使用します。これにより、行全体が多項式属性として読み込まれます。そこから、テキスト処理オペレーターが作業できるように、これをテキストに変換する必要があります。次に、Process Documents from Data演算子を使用して、最終的な例セットを作成します。重要な点は、Tokenize演算子を使用して行をコンマで区切られた単語に分割することです。

于 2016-04-05T15:23:10.263 に答える