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

Example Request for ClusterIteration

emaema Member Posts: 33 Maven
edited November 2018 in Help
Hi all,

Can anyone post an xml example of how to use the clusteriteration operator

Thanx

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    the ClusterIteration operator splits up the input example set according to the clusters and applies its inner operators once per cluster. This requires the example set to have a special cluster attribute which can be either created by a Clusterer or might be declared in the attribute description file that was used when the data was loaded.

    The following example process generates data and clusters it using kMeans. After this the examples of one cluster are written into files. The filename contains the %{a} macro beeing replaced by the number of the iteration the operator is executed.
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExampleSetGenerator" class="ExampleSetGenerator">
            <parameter key="number_examples" value="1000"/>
            <parameter key="target_function" value="gaussian mixture clusters"/>
        </operator>
        <operator name="KMeans" class="KMeans">
            <parameter key="k" value="5"/>
        </operator>
        <operator name="ClusterIteration" class="ClusterIteration" expanded="yes">
            <operator name="ExampleSetWriter" class="ExampleSetWriter">
                <parameter key="attribute_description_file" value="/cluster%{a}.aml"/>
                <parameter key="example_set_file" value="/cluster%{a}.dat"/>
            </operator>
        </operator>
    </operator>
    The exmapleSetwriter might be replaced by an arbitrary number of operators, doing what ever you want with the exampleSet containing all examples of the current cluster...

    Greetings,
      Sebastian
  • emaema Member Posts: 33 Maven
    Thank you very much  :)
Sign In or Register to comment.