Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

"export clusteranalysis results"

shaihuludshaihulud Member Posts: 20 Contributor II
edited May 2019 in Help
hi

ive created a clusteranalysis output, which i would love to export into some kind of parsable format, preferably xml or csv.

The produced .ioo and .md files are cryptic, so i cant use them. How can i export the results?

thx for the help
Tagged:

Answers

  • SebastianLohSebastianLoh Member Posts: 99 Contributor II
    hi shaihulud,

    i am not sure what do you mean exactly but maybe this example will answer your question:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.0">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.0.10" expanded="true" name="Process">
        <process expanded="true" height="325" width="614">
          <operator activated="true" class="retrieve" compatibility="5.0.10" expanded="true" height="60" name="Retrieve" width="90" x="112" y="75">
            <parameter key="repository_entry" value="//Samples/data/Iris"/>
          </operator>
          <operator activated="true" class="k_means" compatibility="5.0.10" expanded="true" height="76" name="Clustering" width="90" x="246" y="75"/>
          <operator activated="true" class="write_csv" compatibility="5.0.10" expanded="true" height="60" name="Write CSV" width="90" x="380" y="120">
            <parameter key="csv_file" value="cluster.csv"/>
          </operator>
          <operator activated="true" class="write_model" compatibility="5.0.10" expanded="true" height="60" name="Write Model" width="90" x="380" y="30">
            <parameter key="model_file" value="model.xml"/>
            <parameter key="output_type" value="XML"/>
          </operator>
          <connect from_op="Retrieve" from_port="output" to_op="Clustering" to_port="example set"/>
          <connect from_op="Clustering" from_port="cluster model" to_op="Write Model" to_port="input"/>
          <connect from_op="Clustering" from_port="clustered set" to_op="Write CSV" to_port="input"/>
          <connect from_op="Write CSV" from_port="through" to_port="result 2"/>
          <connect from_op="Write Model" from_port="through" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="54"/>
          <portSpacing port="sink_result 2" spacing="126"/>
          <portSpacing port="sink_result 3" spacing="0"/>
        </process>
      </operator>
    </process>
    Ciao Sebastian
  • shaihuludshaihulud Member Posts: 20 Contributor II
    i mean it this way:

    instance pool at the beginning is 200

    at the end ive a result with 5 clusters and each cluster contains 40 instances (hypothetically).
    Now i want an export of that data. As a Csv for example:

    Cluster 0;Cluster 1;Cluster 2;Cluster3;Cluster 4
    instance#1;instance#144;instance#12;instance#11;instance#17
    instance#6;instance#111;instance#122;instance#113;instance#167
    instance#88;...

    Or any other output which is written into a file that i can read from (parse)
  • SebastianLohSebastianLoh Member Posts: 99 Contributor II
    hi shaihulud,

    to write any output to a file/database/... just use the Write ... operators.

    The format

    Cluster 0;Cluster 1;Cluster 2;Cluster3;Cluster 4
    instance#1;instance#144;instance#12;instance#11;instance#17
    instance#6;instance#111;instance#122;instance#113;instance#167
    instance#88;...

    does not make much sense because the single rows got meaningless. Also the clusters could have different sizes so that Cluster 0 hat 10 rows and Cluster 1 has 100.

    What you can do is to filter by the clusters and then write the result to a file (eg. csv)

    I hope I could help,

    Ciao Sebastian
  • shaihuludshaihulud Member Posts: 20 Contributor II
    ah sweet.. i was a little bit blind for the operators.

    I was too much focused on the menu entries and view toolbars. Thanx for the help i will put it into good use.

    Nevertheless, this method is a little bit misleading, because its not intuitive. You would expect such an export function at the result view or such. And as i can tell by a first glance, the menu does neither provide that functionality. Also the manual seems to have no information on that topic.

    greez

Sign In or Register to comment.