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

how to export a hierarchical clustering model to a XML file

PhiltianPhiltian Member Posts: 1 Learner III
edited November 2018 in Help
I want to export a hierarchical clustering model created by top down operator to a XML or text file, so I can parse it. But it seems neither write model operator works. Anyone has any advice on how to realize that?

Answers

  • SkirzynskiSkirzynski Member Posts: 164 Maven
    Try the "Write" operator. This operator can write all objects to XML.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.009">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.0.000" expanded="true" name="Root">
        <parameter key="logverbosity" value="warning"/>
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="5.0.000" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
            <parameter key="repository_entry" value="../../data/Iris"/>
          </operator>
          <operator activated="true" class="agglomerative_clustering" compatibility="5.0.000" expanded="true" height="76" name="AgglomerativeClustering" width="90" x="179" y="30"/>
          <operator activated="true" class="write" compatibility="5.3.009" expanded="true" height="60" name="Write" width="90" x="313" y="30">
            <parameter key="object_file" value="/home/marcin/hierarchical.xml"/>
            <parameter key="output_type" value="XML"/>
          </operator>
          <operator activated="false" class="write_clustering" compatibility="5.3.009" expanded="true" height="60" name="Write Clustering" width="90" x="313" y="300">
            <parameter key="cluster_model_file" value="/home/marcin/hierarc.clm"/>
          </operator>
          <operator activated="false" class="read_clustering" compatibility="5.3.009" expanded="true" height="60" name="Read Clustering" width="90" x="447" y="300">
            <parameter key="cluster_model_file" value="/home/marcin/hierarc.clm"/>
            <parameter key="is_hierarchical_model_file" value="true"/>
          </operator>
          <connect from_op="Retrieve" from_port="output" to_op="AgglomerativeClustering" to_port="example set"/>
          <connect from_op="AgglomerativeClustering" from_port="cluster model" to_op="Write" to_port="object"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
        </process>
      </operator>
    </process>
Sign In or Register to comment.