2016-04-04 9 views
0

her satır, tek bir işlemde satın alınan kalemleri göstermektedir nerede itemsets biçimindeİlişkilendirme kuralı için RapidMiner'da işlem (sepet) verileri nasıl yüklenir?

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

ayrılmış işlem (sepet) veri virgül. Read.CSV operatörünü kullanarak bu dosyayı RapidMiner'a yükledim. Bu verileri FP büyüme ve ilişkilendirme kural madenciliği için dönüştürecek herhangi bir operatör bulamadım.

İlişkilendirme kuralı için RapidMiner'da bu tür bir dosyayı okumak için herhangi bir yolu var mı?

cevap

0

Neyi kastettiğinizi anladım - üzgünüm. Bu, Metin İşleme Uzantısı'ndan operatörler kullanılarak yapılabilir. Bunu RapidMiner deposundan yüklemelisiniz. Bir kez bu işlemi deneyebilirsiniz.

<?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> 

hile orijinal dosyayı okumak ama ayırıcı olarak hattın sonuna kullanmak Read CSV kullanmaktır. Bu, tüm satırı bir polinominal özellik olarak okur. Buradan, metin işleme operatörlerinin işlerini yapabilmeleri için bunu metne dönüştürmeniz gerekir. Son örnek kümesini yapmak için Process Documents from Data operatörü kullanılır. Önemli nokta, satırları virgülle ayrılmış sözcüklere bölmek için Tokenize operatörünü kullanmaktır.

İlgili konular