categorical - ordinal data clustering

ezouliasezoulias Member Posts: 28 Maven
I have some categorigal - ordinal data and I would like to apply k-means
I use the following model. As far as the k-means everything seems ok. When I try to use Cluster Distance Performance I have a problem get an error message "Wrong data f type Cluster Model was delivered at the port cluster model. Expected data of type Centroid Model. The data delivered at the specified port was the wrong type. Please make sure your ports are connected correctly"

thank you in advance
Best regards,
manolis

Answers

  • awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    Hello

    Swap the inputs to the Cluster Distance Performance operator

    For example
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.015">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="5.3.015" expanded="true" height="60" name="Retrieve Iris" width="90" x="112" y="120">
            <parameter key="repository_entry" value="//Samples/data/Iris"/>
          </operator>
          <operator activated="true" class="k_means" compatibility="5.3.015" expanded="true" height="76" name="Clustering" width="90" x="313" y="120">
            <parameter key="k" value="3"/>
          </operator>
          <operator activated="true" class="cluster_distance_performance" compatibility="5.3.015" expanded="true" height="94" name="Performance" width="90" x="514" y="120"/>
          <connect from_op="Retrieve Iris" from_port="output" to_op="Clustering" to_port="example set"/>
          <connect from_op="Clustering" from_port="cluster model" to_op="Performance" to_port="cluster model"/>
          <connect from_op="Clustering" from_port="clustered set" to_op="Performance" to_port="example set"/>
          <connect from_op="Performance" from_port="performance" 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>
    regards

    Andrew
  • ezouliasezoulias Member Posts: 28 Maven
    Thank you for the quick reply.

    I tried to swap the lines in the graphical interface but I still have a problem. Do you mean that I have to change the code? How can I do that? I know nothing about how to program in Rapid Miner but I am willing and capable to learn.

    Manolis
  • awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    Hello Manolis

    You can copy the XML in the previous post into your process. There is an XML view that you need to enable to do that if you haven't already. This XML is a working process that you can then modify to suit your own problem.

    regards

    Andrew
  • ezouliasezoulias Member Posts: 28 Maven
    Dear Andrew,

    Thank you very much for the answer. It sounds interesting. I have never seen the XML view, is this a feature that can be enabled per module or globally for all modules.

    By the way and since I have asked a few years ago about programming in rapid Miner. Your reply was that I can create a module with Java and you gave me a manual but it was not so explanatory to my view.

    If I understand well I can modify a working process using XML, is there any manuals or videos that you can provide me to read about the XML way that you use in Rapid Miner.

    In addition to that is there any manuals or videos that I can read/see about developing a new component in Rapid Miner.

    Thank you in advance for the answers and your perfect product!

    Manolis
  • awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    Hello Manolis

    I don't work for RapidMiner - perhaps it was someone else who gave you the manual.

    The XML should never be edited directly unless you know what you are doing - the GUI creates this and the XML view allows an easy way to share complete processes. Simply delete everything in the XML view and replace it with the XML in the post. You have to press the validate button (the one with the green tick) to validate that it's correct. Then you can run it.

    regards

    Andrew
  • ezouliasezoulias Member Posts: 28 Maven
    Hello again,

    Your example work but I have to make the one with my own data and I can not see the difference or the problem. My XML is the following:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="6.4.000">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="6.4.000" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="read_excel" compatibility="6.4.000" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
            <parameter key="excel_file" value="F:\Users\ezoulias\Documents\Data\Personal\Δημοσιεύσεις\Paper Με Στοιχεία ερωτηματολογίων\Leadership_with_Job_Performance.xls"/>
            <parameter key="imported_cell_range" value="A1:BA247"/>
            <parameter key="first_row_as_names" value="false"/>
            <list key="annotations">
              <parameter key="0" value="Name"/>
            </list>
            <list key="data_set_meta_data_information">
              <parameter key="0" value="L6_01.true.polynominal.attribute"/>
              <parameter key="1" value="L6_02.true.polynominal.attribute"/>
              <parameter key="2" value="L6_03.true.polynominal.attribute"/>
              <parameter key="3" value="L6_04.true.polynominal.attribute"/>
              <parameter key="4" value="L6_05.true.polynominal.attribute"/>
              <parameter key="5" value="L6_06.true.polynominal.attribute"/>
              <parameter key="6" value="L6_07.true.polynominal.attribute"/>
              <parameter key="7" value="L6_08.true.polynominal.attribute"/>
              <parameter key="8" value="L6_09.true.polynominal.attribute"/>
              <parameter key="9" value="L6_10.true.polynominal.attribute"/>
              <parameter key="10" value="L6_11.true.polynominal.attribute"/>
              <parameter key="11" value="L6_12.true.polynominal.attribute"/>
              <parameter key="12" value="L6_13.true.polynominal.attribute"/>
              <parameter key="13" value="L6_14.true.polynominal.attribute"/>
              <parameter key="14" value="L6_15.true.polynominal.attribute"/>
              <parameter key="15" value="L6_16.true.polynominal.attribute"/>
              <parameter key="16" value="P12_01.false.polynominal.attribute"/>
              <parameter key="17" value="P12_02.false.polynominal.attribute"/>
              <parameter key="18" value="P12_03.false.polynominal.attribute"/>
              <parameter key="19" value="P12_04.false.polynominal.attribute"/>
              <parameter key="20" value="P12_05.false.polynominal.attribute"/>
              <parameter key="21" value="P12_06.false.polynominal.attribute"/>
              <parameter key="22" value="P12_07.false.polynominal.attribute"/>
              <parameter key="23" value="P12_08.false.polynominal.attribute"/>
              <parameter key="24" value="P12_09.false.polynominal.attribute"/>
              <parameter key="25" value="P12_10.false.polynominal.attribute"/>
              <parameter key="26" value="P12_11.false.polynominal.attribute"/>
              <parameter key="27" value="P12_12.false.polynominal.attribute"/>
              <parameter key="28" value="P12_13.false.polynominal.attribute"/>
              <parameter key="29" value="P12_14.false.polynominal.attribute"/>
              <parameter key="30" value="P12_15.false.polynominal.attribute"/>
              <parameter key="31" value="P12_16.false.polynominal.attribute"/>
              <parameter key="32" value="P12_17.false.polynominal.attribute"/>
              <parameter key="33" value="P12_18.false.polynominal.attribute"/>
              <parameter key="34" value="P12_19.false.polynominal.attribute"/>
              <parameter key="35" value="P12_20.false.polynominal.attribute"/>
              <parameter key="36" value="P12_21.false.polynominal.attribute"/>
              <parameter key="37" value="P12_22.false.polynominal.attribute"/>
              <parameter key="38" value="P12_23.false.polynominal.attribute"/>
              <parameter key="39" value="P12_24.false.polynominal.attribute"/>
              <parameter key="40" value="P12_25.false.polynominal.attribute"/>
              <parameter key="41" value="P12_26.false.polynominal.attribute"/>
              <parameter key="42" value="P12_27.false.polynominal.attribute"/>
              <parameter key="43" value="P12_28.false.polynominal.attribute"/>
              <parameter key="44" value="P12_29.false.polynominal.attribute"/>
              <parameter key="45" value="P12_30.false.polynominal.attribute"/>
              <parameter key="46" value="P12_31.false.polynominal.attribute"/>
              <parameter key="47" value="P12_32.false.polynominal.attribute"/>
              <parameter key="48" value="P12_33.false.polynominal.attribute"/>
              <parameter key="49" value="P12_34.false.polynominal.attribute"/>
              <parameter key="50" value="P12_35.false.polynominal.attribute"/>
              <parameter key="51" value="P12_36.false.polynominal.attribute"/>
            </list>
          </operator>
          <operator activated="true" class="replace_missing_values" compatibility="6.4.000" expanded="true" height="94" name="Replace Missing Values" width="90" x="179" y="30">
            <list key="columns"/>
          </operator>
          <operator activated="true" class="random_clustering" compatibility="6.4.000" expanded="true" height="76" name="Clustering" width="90" x="380" y="30"/>
          <operator activated="true" class="cluster_distance_performance" compatibility="6.4.000" expanded="true" height="94" name="Performance" width="90" x="581" y="30"/>
          <connect from_op="Read Excel" from_port="output" to_op="Replace Missing Values" to_port="example set input"/>
          <connect from_op="Replace Missing Values" from_port="example set output" to_op="Clustering" to_port="example set"/>
          <connect from_op="Clustering" from_port="clustered set" to_op="Performance" to_port="example set"/>
          <connect from_op="Performance" from_port="performance" to_port="result 1"/>
          <connect from_op="Performance" from_port="example set" to_port="result 2"/>
          <connect from_op="Performance" from_port="cluster model" to_port="result 3"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
          <portSpacing port="sink_result 3" spacing="0"/>
          <portSpacing port="sink_result 4" spacing="0"/>
        </process>
      </operator>
    </process>
  • ezouliasezoulias Member Posts: 28 Maven
    Hello Andrew,

    thank you for your time could you please try it with my data.

    I can not sent an attachment but I sent you the data in csv format. Copy paste the data into a .csv file and import them as .xls.

    L6_01,L6_02,L6_03,L6_04,L6_05,L6_06,L6_07,L6_08,L6_09,L6_10,L6_11,L6_12,L6_13,L6_14,L6_15,L6_16
    2,3,4,4,3,2,6,7,2,6,3,3,2,1,2,2
    3,2,2,3,3,5,5,4,3,4,3,2,2,4,4,4
    6,6,5,5,4,7,5,5,5,5,7,5,5,5,7,7
    5,6,7,7,6,7,7,7,7,7,6,6,7,6,7,7
    3,2,3,1,3,4,3,4,4,4,1,3,3,3,2,2
    1,1,3,3,2,2,2,2,2,2,4,2,2,3,2,1
    3,2,2,2,3,2,2,2,2,3,5,2,2,2,3,3
    3,3,3,2,3,3,3,3,3,4,4,3,3,4,4,4
    1,1,7,5,3,3,1,3,1,1,5,4,1,4,1,1
    2,4,2,2,4,5,5,4,2,2,2,2,2,2,4,4
    5,4,3,3,5,5,7,6,6,6,6,6,6,6,5,4
    6,5,5,4,5,4,5,5,3,6,1,1,1,1,1,1
    2,1,1,2,3,3,2,2,1,2,2,1,1,1,2,2
    4,3,4,3,3,6,6,6,6,5,5,5,5,4,5,4
    4,4,4,6,7,7,7,6,5,7,6,6,6,7,7,7
    2,2,2,4,4,3,4,5,4,5,4,3,3,3,2,2
    2,2,2,2,3,3,6,6,6,6,4,4,2,2,2,2
    4,4,4,3,4,4,5,5,3,4,3,5,5,5,3,3
    5,4,3,3,3,5,5,5,4,5,5,5,5,5,3,3
    4,4,5,5,6,5,5,5,3,4,4,4,3,4,4,3
    3,3,4,5,5,4,4,4,4,4,4,4,4,4,4,3
    1,1,2,2,3,1,5,3,2,4,2,2,2,1,3,3
    7,5,3,3,5,5,4,4,4,5,2,2,6,6,6,7
    5,2,6,6,6,6,7,7,6,7,6,7,7,6,6,7
    1,1,2,2,2,2,2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,3,2,3,3,1,4,4,1,4,3
    1,1,3,3,3,1,2,1,1,1,2,1,1,1,1,1


    Thank you in advance
    Manolis
  • awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    Change the clustering operator to k-means. The one you are using does not produce a cluster model that is compatible with the cluster distance operator.

    Andrew
  • ezouliasezoulias Member Posts: 28 Maven
    Yes you are correct but I probably apart from the title I did not mention that although numbers my data are categorical, so I can not apply k-means.
    Any idea?

    manolis
  • awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    The process below works with your data. It converts the attributes to be numeric and uses Euclidean distance (the default is a weird Bregman divergence which doesn't work) with k-means. The process also has a commented out operator "Nominal to Numerical". Insert it before "Guess Types" to use it. This will create a new attribute for each value of an attribute and is probably what you want if your data is not ordinal.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.015">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="read_excel" compatibility="5.3.015" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
            <parameter key="excel_file" value="/home/andrew/Downloads/rapidminer/data.xls"/>
            <parameter key="imported_cell_range" value="A1:BA247"/>
            <parameter key="first_row_as_names" value="false"/>
            <list key="annotations">
              <parameter key="0" value="Name"/>
            </list>
            <list key="data_set_meta_data_information">
              <parameter key="0" value="L6_01.true.polynominal.attribute"/>
              <parameter key="1" value="L6_02.true.polynominal.attribute"/>
              <parameter key="2" value="L6_03.true.polynominal.attribute"/>
              <parameter key="3" value="L6_04.true.polynominal.attribute"/>
              <parameter key="4" value="L6_05.true.polynominal.attribute"/>
              <parameter key="5" value="L6_06.true.polynominal.attribute"/>
              <parameter key="6" value="L6_07.true.polynominal.attribute"/>
              <parameter key="7" value="L6_08.true.polynominal.attribute"/>
              <parameter key="8" value="L6_09.true.polynominal.attribute"/>
              <parameter key="9" value="L6_10.true.polynominal.attribute"/>
              <parameter key="10" value="L6_11.true.polynominal.attribute"/>
              <parameter key="11" value="L6_12.true.polynominal.attribute"/>
              <parameter key="12" value="L6_13.true.polynominal.attribute"/>
              <parameter key="13" value="L6_14.true.polynominal.attribute"/>
              <parameter key="14" value="L6_15.true.polynominal.attribute"/>
              <parameter key="15" value="L6_16.true.polynominal.attribute"/>
              <parameter key="16" value="P12_01.false.polynominal.attribute"/>
              <parameter key="17" value="P12_02.false.polynominal.attribute"/>
              <parameter key="18" value="P12_03.false.polynominal.attribute"/>
              <parameter key="19" value="P12_04.false.polynominal.attribute"/>
              <parameter key="20" value="P12_05.false.polynominal.attribute"/>
              <parameter key="21" value="P12_06.false.polynominal.attribute"/>
              <parameter key="22" value="P12_07.false.polynominal.attribute"/>
              <parameter key="23" value="P12_08.false.polynominal.attribute"/>
              <parameter key="24" value="P12_09.false.polynominal.attribute"/>
              <parameter key="25" value="P12_10.false.polynominal.attribute"/>
              <parameter key="26" value="P12_11.false.polynominal.attribute"/>
              <parameter key="27" value="P12_12.false.polynominal.attribute"/>
              <parameter key="28" value="P12_13.false.polynominal.attribute"/>
              <parameter key="29" value="P12_14.false.polynominal.attribute"/>
              <parameter key="30" value="P12_15.false.polynominal.attribute"/>
              <parameter key="31" value="P12_16.false.polynominal.attribute"/>
              <parameter key="32" value="P12_17.false.polynominal.attribute"/>
              <parameter key="33" value="P12_18.false.polynominal.attribute"/>
              <parameter key="34" value="P12_19.false.polynominal.attribute"/>
              <parameter key="35" value="P12_20.false.polynominal.attribute"/>
              <parameter key="36" value="P12_21.false.polynominal.attribute"/>
              <parameter key="37" value="P12_22.false.polynominal.attribute"/>
              <parameter key="38" value="P12_23.false.polynominal.attribute"/>
              <parameter key="39" value="P12_24.false.polynominal.attribute"/>
              <parameter key="40" value="P12_25.false.polynominal.attribute"/>
              <parameter key="41" value="P12_26.false.polynominal.attribute"/>
              <parameter key="42" value="P12_27.false.polynominal.attribute"/>
              <parameter key="43" value="P12_28.false.polynominal.attribute"/>
              <parameter key="44" value="P12_29.false.polynominal.attribute"/>
              <parameter key="45" value="P12_30.false.polynominal.attribute"/>
              <parameter key="46" value="P12_31.false.polynominal.attribute"/>
              <parameter key="47" value="P12_32.false.polynominal.attribute"/>
              <parameter key="48" value="P12_33.false.polynominal.attribute"/>
              <parameter key="49" value="P12_34.false.polynominal.attribute"/>
              <parameter key="50" value="P12_35.false.polynominal.attribute"/>
              <parameter key="51" value="P12_36.false.polynominal.attribute"/>
            </list>
          </operator>
          <operator activated="true" class="replace_missing_values" compatibility="5.3.015" expanded="true" height="94" name="Replace Missing Values" width="90" x="45" y="120">
            <list key="columns"/>
          </operator>
          <operator activated="false" breakpoints="after" class="nominal_to_numerical" compatibility="5.3.015" expanded="true" height="94" name="Nominal to Numerical" width="90" x="179" y="120">
            <list key="comparison_groups"/>
          </operator>
          <operator activated="true" class="guess_types" compatibility="5.3.015" expanded="true" height="76" name="Guess Types" width="90" x="313" y="30"/>
          <operator activated="true" class="k_means" compatibility="5.3.015" expanded="true" height="76" name="Clustering" width="90" x="447" y="30">
            <parameter key="measure_types" value="MixedMeasures"/>
          </operator>
          <operator activated="true" class="cluster_distance_performance" compatibility="5.3.015" expanded="true" height="94" name="Performance" width="90" x="581" y="30"/>
          <connect from_op="Read Excel" from_port="output" to_op="Replace Missing Values" to_port="example set input"/>
          <connect from_op="Replace Missing Values" from_port="example set output" to_op="Guess Types" to_port="example set input"/>
          <connect from_op="Guess Types" from_port="example set output" to_op="Clustering" to_port="example set"/>
          <connect from_op="Clustering" from_port="cluster model" to_op="Performance" to_port="cluster model"/>
          <connect from_op="Clustering" from_port="clustered set" to_op="Performance" to_port="example set"/>
          <connect from_op="Performance" from_port="performance" to_port="result 1"/>
          <connect from_op="Performance" from_port="example set" to_port="result 2"/>
          <connect from_op="Performance" from_port="cluster model" to_port="result 3"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
          <portSpacing port="sink_result 3" spacing="0"/>
          <portSpacing port="sink_result 4" spacing="0"/>
        </process>
      </operator>
    </process>


    Andrew
Sign In or Register to comment.