The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Attribute already present - Extract Cluster Prototypes

missbucherlemissbucherle Member Posts: 1 Learner I
Hi there ! 

I am still very new to RapidMiner without any background in analytics at all. So this is probably a stupid question - still I would very much appreciate your help! 

For my thesis I want to textmine and cluster a series of documents. (In the end I want to create a bubble diagram with different clusters of variabled discussed in the source files)
I created the attached process (according to an approach in a similar thesis) but struggle with the operator: ExtractClPrototypes
The following error displays: 



Any help about how to solve that error will be greatly appreciated.
Thank you in advance !! 

The process looks like this: 

<?xml version="1.0" encoding="UTF-8"?><process version="9.5.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="9.5.001" expanded="true" name="Process">
    <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" class="text:process_document_from_file" compatibility="8.2.000" expanded="true" height="82" name="Process Documents from Files" width="90" x="45" y="34">
        <list key="text_directories">
          <parameter key="test" value="C:\Users\anchb\Desktop\MA\Literatur\Neuer Ordner"/>
        </list>
        <parameter key="file_pattern" value="*"/>
        <parameter key="extract_text_only" value="true"/>
        <parameter key="use_file_extension_as_type" value="true"/>
        <parameter key="content_type" value="txt"/>
        <parameter key="encoding" value="SYSTEM"/>
        <parameter key="create_word_vector" value="true"/>
        <parameter key="vector_creation" value="Term Frequency"/>
        <parameter key="add_meta_information" value="true"/>
        <parameter key="keep_text" value="false"/>
        <parameter key="prune_method" value="percentual"/>
        <parameter key="prune_below_percent" value="20.0"/>
        <parameter key="prune_above_percent" value="100.0"/>
        <parameter key="prune_below_rank" value="0.05"/>
        <parameter key="prune_above_rank" value="0.95"/>
        <parameter key="datamanagement" value="double_sparse_array"/>
        <parameter key="data_management" value="auto"/>
        <process expanded="true">
          <operator activated="true" class="text:tokenize" compatibility="8.2.000" expanded="true" height="68" name="Tokenize" width="90" x="45" y="34">
            <parameter key="mode" value="non letters"/>
            <parameter key="characters" value=".:"/>
            <parameter key="language" value="English"/>
            <parameter key="max_token_length" value="3"/>
          </operator>
          <operator activated="true" class="text:tokenize" compatibility="8.2.000" expanded="true" height="68" name="Tokenize (2)" width="90" x="45" y="136">
            <parameter key="mode" value="linguistic sentences"/>
            <parameter key="characters" value=".:"/>
            <parameter key="language" value="English"/>
            <parameter key="max_token_length" value="3"/>
          </operator>
          <operator activated="true" class="text:transform_cases" compatibility="8.2.000" expanded="true" height="68" name="Transform Cases" width="90" x="45" y="238">
            <parameter key="transform_to" value="lower case"/>
          </operator>
          <operator activated="true" class="text:filter_stopwords_english" compatibility="8.2.000" expanded="true" height="68" name="Filter Stopwords (English)" width="90" x="179" y="238"/>
          <operator activated="true" class="text:stem_porter" compatibility="8.2.000" expanded="true" height="68" name="Stem (Porter)" width="90" x="313" y="238"/>
          <operator activated="true" class="text:filter_by_length" compatibility="8.2.000" expanded="true" height="68" name="Filter Tokens (by Length)" width="90" x="447" y="238">
            <parameter key="min_chars" value="4"/>
            <parameter key="max_chars" value="25"/>
          </operator>
          <operator activated="true" class="text:generate_n_grams_terms" compatibility="8.2.000" expanded="true" height="68" name="Generate n-Grams (Terms)" width="90" x="447" y="136">
            <parameter key="max_length" value="2"/>
          </operator>
          <connect from_port="document" to_op="Tokenize" to_port="document"/>
          <connect from_op="Tokenize" from_port="document" to_op="Tokenize (2)" to_port="document"/>
          <connect from_op="Tokenize (2)" from_port="document" to_op="Transform Cases" to_port="document"/>
          <connect from_op="Transform Cases" from_port="document" to_op="Filter Stopwords (English)" to_port="document"/>
          <connect from_op="Filter Stopwords (English)" from_port="document" to_op="Stem (Porter)" to_port="document"/>
          <connect from_op="Stem (Porter)" from_port="document" to_op="Filter Tokens (by Length)" to_port="document"/>
          <connect from_op="Filter Tokens (by Length)" from_port="document" to_op="Generate n-Grams (Terms)" to_port="document"/>
          <connect from_op="Generate n-Grams (Terms)" 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>
      <operator activated="true" class="text:wordlist_to_data" compatibility="8.2.000" expanded="true" height="82" name="WordList to Data" width="90" x="179" y="340"/>
      <operator activated="true" class="write_excel" compatibility="9.5.001" expanded="true" height="103" name="Write Excel (5)" width="90" x="313" y="340">
        <parameter key="excel_file" value="C:\Users\anchb\Desktop\MA\RapidMiner\Test.xlsx"/>
        <parameter key="file_format" value="xlsx"/>
        <enumeration key="sheet_names"/>
        <parameter key="sheet_name" value="RapidMiner Data"/>
        <parameter key="date_format" value="yyyy-MM-dd HH:mm:ss"/>
        <parameter key="number_format" value="#.0"/>
        <parameter key="encoding" value="SYSTEM"/>
      </operator>
      <operator activated="true" class="multiply" compatibility="9.5.001" expanded="true" height="103" name="Multiply" width="90" x="179" y="34"/>
      <operator activated="true" class="concurrency:k_means" compatibility="9.5.001" expanded="true" height="82" name="Clustering" width="90" x="313" y="136">
        <parameter key="add_cluster_attribute" value="true"/>
        <parameter key="add_as_label" value="false"/>
        <parameter key="remove_unlabeled" value="false"/>
        <parameter key="k" value="5"/>
        <parameter key="max_runs" value="10"/>
        <parameter key="determine_good_start_values" value="false"/>
        <parameter key="measure_types" value="NumericalMeasures"/>
        <parameter key="mixed_measure" value="MixedEuclideanDistance"/>
        <parameter key="nominal_measure" value="NominalDistance"/>
        <parameter key="numerical_measure" value="CosineSimilarity"/>
        <parameter key="divergence" value="SquaredEuclideanDistance"/>
        <parameter key="kernel_type" value="radial"/>
        <parameter key="kernel_gamma" value="1.0"/>
        <parameter key="kernel_sigma1" value="1.0"/>
        <parameter key="kernel_sigma2" value="0.0"/>
        <parameter key="kernel_sigma3" value="2.0"/>
        <parameter key="kernel_degree" value="3.0"/>
        <parameter key="kernel_shift" value="1.0"/>
        <parameter key="kernel_a" value="1.0"/>
        <parameter key="kernel_b" value="0.0"/>
        <parameter key="max_optimization_steps" value="100"/>
        <parameter key="use_local_random_seed" value="false"/>
        <parameter key="local_random_seed" value="1992"/>
      </operator>
      <operator activated="true" class="multiply" compatibility="9.5.001" expanded="true" height="103" name="Multiply (2)" width="90" x="447" y="136"/>
      <operator activated="true" class="extract_prototypes" compatibility="9.5.001" expanded="true" height="82" name="Extract Cluster Prototypes" width="90" x="581" y="136"/>
      <operator activated="true" class="write_excel" compatibility="9.5.001" expanded="true" height="103" name="Write Excel (2)" width="90" x="715" y="136">
        <parameter key="excel_file" value="C:\Users\anchb\Desktop\MA\RapidMiner\Microsoft Excel-Arbeitsblatt (neu) (4).xlsx"/>
        <parameter key="file_format" value="xlsx"/>
        <enumeration key="sheet_names"/>
        <parameter key="sheet_name" value="RapidMiner Data"/>
        <parameter key="date_format" value="yyyy-MM-dd HH:mm:ss"/>
        <parameter key="number_format" value="#.0"/>
        <parameter key="encoding" value="SYSTEM"/>
      </operator>
      <operator activated="true" class="cluster_distance_performance" compatibility="9.5.001" expanded="true" height="103" name="Performance" width="90" x="581" y="238">
        <parameter key="main_criterion" value="Avg. within centroid distance"/>
        <parameter key="main_criterion_only" value="false"/>
        <parameter key="normalize" value="false"/>
        <parameter key="maximize" value="false"/>
      </operator>
      <operator activated="true" class="write_excel" compatibility="9.5.001" expanded="true" height="103" name="Write Excel (4)" width="90" x="581" y="340">
        <parameter key="excel_file" value="C:\Users\anchb\Desktop\MA\RapidMiner\Microsoft Excel-Arbeitsblatt (neu) (2).xlsx"/>
        <parameter key="file_format" value="xlsx"/>
        <enumeration key="sheet_names"/>
        <parameter key="sheet_name" value="RapidMiner Data"/>
        <parameter key="date_format" value="yyyy-MM-dd HH:mm:ss"/>
        <parameter key="number_format" value="#.0"/>
        <parameter key="encoding" value="SYSTEM"/>
      </operator>
      <operator activated="true" class="performance_to_data" compatibility="9.5.001" expanded="true" height="82" name="Performance to Data" width="90" x="715" y="238"/>
      <operator activated="true" class="write_excel" compatibility="9.5.001" expanded="true" height="103" name="Write Excel (3)" width="90" x="715" y="340">
        <parameter key="excel_file" value="C:\Users\anchb\Desktop\MA\RapidMiner\Microsoft Excel-Arbeitsblatt (neu) (3).xlsx"/>
        <parameter key="file_format" value="xlsx"/>
        <enumeration key="sheet_names"/>
        <parameter key="sheet_name" value="RapidMiner Data"/>
        <parameter key="date_format" value="yyyy-MM-dd HH:mm:ss"/>
        <parameter key="number_format" value="#.0"/>
        <parameter key="encoding" value="SYSTEM"/>
      </operator>
      <operator activated="true" class="data_to_similarity" compatibility="9.5.001" expanded="true" height="82" name="Data to Similarity" width="90" x="313" y="34">
        <parameter key="measure_types" value="MixedMeasures"/>
        <parameter key="mixed_measure" value="MixedEuclideanDistance"/>
        <parameter key="nominal_measure" value="NominalDistance"/>
        <parameter key="numerical_measure" value="EuclideanDistance"/>
        <parameter key="divergence" value="GeneralizedIDivergence"/>
        <parameter key="kernel_type" value="radial"/>
        <parameter key="kernel_gamma" value="1.0"/>
        <parameter key="kernel_sigma1" value="1.0"/>
        <parameter key="kernel_sigma2" value="0.0"/>
        <parameter key="kernel_sigma3" value="2.0"/>
        <parameter key="kernel_degree" value="3.0"/>
        <parameter key="kernel_shift" value="1.0"/>
        <parameter key="kernel_a" value="1.0"/>
        <parameter key="kernel_b" value="0.0"/>
      </operator>
      <operator activated="true" class="similarity_to_data" compatibility="9.5.001" expanded="true" height="82" name="Similarity to Data" width="90" x="447" y="34">
        <parameter key="table_type" value="long_table"/>
      </operator>
      <operator activated="true" class="write_excel" compatibility="9.5.001" expanded="true" height="103" name="Write Excel" width="90" x="581" y="34">
        <parameter key="excel_file" value="C:\Users\anchb\Desktop\MA\RapidMiner\Microsoft Excel-Arbeitsblatt (neu).xlsx"/>
        <parameter key="file_format" value="xlsx"/>
        <enumeration key="sheet_names"/>
        <parameter key="sheet_name" value="RapidMiner Data"/>
        <parameter key="date_format" value="yyyy-MM-dd HH:mm:ss"/>
        <parameter key="number_format" value="#.0"/>
        <parameter key="encoding" value="SYSTEM"/>
      </operator>
      <connect from_port="input 1" to_op="Process Documents from Files" to_port="word list"/>
      <connect from_op="Process Documents from Files" from_port="example set" to_op="Multiply" to_port="input"/>
      <connect from_op="Process Documents from Files" from_port="word list" to_op="WordList to Data" to_port="word list"/>
      <connect from_op="WordList to Data" from_port="example set" to_op="Write Excel (5)" to_port="input"/>
      <connect from_op="Multiply" from_port="output 1" to_op="Data to Similarity" to_port="example set"/>
      <connect from_op="Multiply" from_port="output 2" to_op="Clustering" to_port="example set"/>
      <connect from_op="Clustering" from_port="cluster model" to_op="Multiply (2)" to_port="input"/>
      <connect from_op="Clustering" from_port="clustered set" to_op="Performance" to_port="example set"/>
      <connect from_op="Multiply (2)" from_port="output 1" to_op="Performance" to_port="cluster model"/>
      <connect from_op="Multiply (2)" from_port="output 2" to_op="Extract Cluster Prototypes" to_port="model"/>
      <connect from_op="Extract Cluster Prototypes" from_port="example set" to_op="Write Excel (2)" to_port="input"/>
      <connect from_op="Extract Cluster Prototypes" from_port="model" to_port="result 1"/>
      <connect from_op="Performance" from_port="performance" to_op="Performance to Data" to_port="performance vector"/>
      <connect from_op="Performance" from_port="example set" to_op="Write Excel (4)" to_port="input"/>
      <connect from_op="Performance to Data" from_port="example set" to_op="Write Excel (3)" to_port="input"/>
      <connect from_op="Data to Similarity" from_port="similarity" to_op="Similarity to Data" to_port="similarity"/>
      <connect from_op="Data to Similarity" from_port="example set" to_op="Similarity to Data" to_port="exampleSet"/>
      <connect from_op="Similarity to Data" from_port="exampleSet" to_op="Write Excel" to_port="input"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="source_input 2" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="0"/>
    </process>
  </operator>
</process>

Answers

  • PaulMSimpsonPaulMSimpson Member Posts: 8 Contributor II
    I imported your process xml into RapidMiner, and ran it against a folder of my own text files (since we don't have access to your documents). I didn't get any errors, and all of the Excel files were created and saved. My only guess is that it has something to do with your document files, maybe duplicates? But, I admit it's a weak guess.
Sign In or Register to comment.