Problem adding multiple clusters into a final file

sebastian_gonza
sebastian_gonza New Altair Community Member
edited November 5 in Community Q&A

Hi,

 

I made several clusters and I want to add each of those clusters into a final base appended to an ID, but in the join it says that there is already a cluster from the first join, the others are excluded from the example, how can I make to add each cluster without droping them out?

 

Thanks

Answers

  • earmijo
    earmijo New Altair Community Member

    Change their roles. I imagine there can be no more than one variable with the role CLUSTER (the same happens with LABEL). 

     

    Take a look at this process. If you get rid of the Set Role operators they will not merge correctly:

     

    <?xml version="1.0" encoding="UTF-8"?><process version="8.2.000">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.2.000" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="retrieve" compatibility="8.2.000" expanded="true" height="68" name="Retrieve Iris" width="90" x="45" y="34">
    <parameter key="repository_entry" value="//Samples/data/Iris"/>
    </operator>
    <operator activated="true" class="generate_id" compatibility="8.2.000" expanded="true" height="82" name="Generate ID" width="90" x="112" y="136"/>
    <operator activated="true" class="normalize" compatibility="8.2.000" expanded="true" height="103" name="Normalize" width="90" x="179" y="238"/>
    <operator activated="true" class="multiply" compatibility="8.2.000" expanded="true" height="103" name="Multiply" width="90" x="313" y="238"/>
    <operator activated="true" class="agglomerative_clustering" compatibility="8.2.000" expanded="true" height="82" name="Clustering (2)" width="90" x="514" y="289"/>
    <operator activated="true" class="flatten_clustering" compatibility="8.2.000" expanded="true" height="82" name="Flatten Clustering" width="90" x="648" y="289"/>
    <operator activated="true" class="concurrency:k_means" compatibility="8.2.000" expanded="true" height="82" name="Clustering" width="90" x="514" y="136"/>
    <operator activated="true" class="select_attributes" compatibility="8.2.000" expanded="true" height="82" name="Select Attributes" width="90" x="648" y="136">
    <parameter key="attribute_filter_type" value="subset"/>
    <parameter key="attributes" value="id|cluster"/>
    <parameter key="include_special_attributes" value="true"/>
    </operator>
    <operator activated="true" class="rename" compatibility="8.2.000" expanded="true" height="82" name="Rename" width="90" x="782" y="34">
    <parameter key="old_name" value="cluster"/>
    <parameter key="new_name" value="cluster1"/>
    <list key="rename_additional_attributes"/>
    </operator>
    <operator activated="true" class="set_role" compatibility="8.2.000" expanded="true" height="82" name="Set Role" width="90" x="916" y="34">
    <parameter key="attribute_name" value="cluster1"/>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="select_attributes" compatibility="8.2.000" expanded="true" height="82" name="Select Attributes (2)" width="90" x="782" y="289">
    <parameter key="attribute_filter_type" value="subset"/>
    <parameter key="attributes" value="id|cluster"/>
    <parameter key="include_special_attributes" value="true"/>
    </operator>
    <operator activated="true" class="rename" compatibility="8.2.000" expanded="true" height="82" name="Rename (2)" width="90" x="849" y="493">
    <parameter key="old_name" value="cluster"/>
    <parameter key="new_name" value="cluster2"/>
    <list key="rename_additional_attributes"/>
    </operator>
    <operator activated="true" class="set_role" compatibility="8.2.000" expanded="true" height="82" name="Set Role (2)" width="90" x="916" y="289">
    <parameter key="attribute_name" value="cluster2"/>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="concurrency:join" compatibility="8.2.000" expanded="true" height="82" name="Join" width="90" x="983" y="136">
    <list key="key_attributes"/>
    </operator>
    <connect from_op="Retrieve Iris" from_port="output" to_op="Generate ID" to_port="example set input"/>
    <connect from_op="Generate ID" from_port="example set output" to_op="Normalize" to_port="example set input"/>
    <connect from_op="Normalize" from_port="example set output" to_op="Multiply" to_port="input"/>
    <connect from_op="Multiply" from_port="output 1" to_op="Clustering" to_port="example set"/>
    <connect from_op="Multiply" from_port="output 2" to_op="Clustering (2)" to_port="example set"/>
    <connect from_op="Clustering (2)" from_port="cluster model" to_op="Flatten Clustering" to_port="hierarchical"/>
    <connect from_op="Clustering (2)" from_port="example set" to_op="Flatten Clustering" to_port="example set"/>
    <connect from_op="Flatten Clustering" from_port="example set" to_op="Select Attributes (2)" to_port="example set input"/>
    <connect from_op="Clustering" from_port="clustered set" to_op="Select Attributes" to_port="example set input"/>
    <connect from_op="Select Attributes" from_port="example set output" to_op="Rename" to_port="example set input"/>
    <connect from_op="Rename" from_port="example set output" to_op="Set Role" to_port="example set input"/>
    <connect from_op="Set Role" from_port="example set output" to_op="Join" to_port="left"/>
    <connect from_op="Select Attributes (2)" from_port="example set output" to_op="Rename (2)" to_port="example set input"/>
    <connect from_op="Rename (2)" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/>
    <connect from_op="Set Role (2)" from_port="example set output" to_op="Join" to_port="right"/>
    <connect from_op="Join" from_port="join" 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>