【问题标题】:RapidMiner - k-Medoids. Identify the medoidRapidMiner - k-Medoids。识别中点
【发布时间】:2016-05-17 15:14:31
【问题描述】:

我正在使用 Rapid Miner 查看 k-Medoids 算法的一些结果和性能。我能够创建方案并查看输出,但我想看到在每个集群内部创建了中心点(选择的中心点)有没有办法做到这一点?

Img1:设计

Img2:结果

【问题讨论】:

  • 如果我没记错的话,rapidminer 中的 K-medoids 是一个有缺陷的实现。我相信它实际上并没有实现 k-medoids,而是 k-means 的非标准变体。但是我已经有一段时间没有考虑使用 rapidminer 进行集群了,因为我更喜欢 ELKI。

标签: cluster-analysis rapidminer


【解决方案1】:

您可以使用Extract Cluster Prototypes 运算符创建与集群质心对应的示例集。然后,您可以使用 Append 运算符将其连接到原始数据,尽管要使示例集兼容还有一些工作要做。

这是一个例子

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="7.0.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="7.0.001" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="7.0.001" 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="k_medoids" compatibility="7.0.001" expanded="true" height="82" name="Clustering" width="90" x="179" y="136">
        <parameter key="k" value="3"/>
      </operator>
      <operator activated="true" class="generate_attributes" compatibility="7.0.001" expanded="true" height="82" name="Generate Attributes" width="90" x="313" y="136">
        <list key="function_descriptions">
          <parameter key="type" value="&quot;data&quot;"/>
        </list>
      </operator>
      <operator activated="true" class="select_attributes" compatibility="7.0.001" expanded="true" height="82" name="Select Attributes" width="90" x="447" y="136">
        <parameter key="attribute_filter_type" value="subset"/>
        <parameter key="attributes" value="label|id"/>
        <parameter key="invert_selection" value="true"/>
        <parameter key="include_special_attributes" value="true"/>
      </operator>
      <operator activated="true" class="extract_prototypes" compatibility="7.0.001" expanded="true" height="82" name="Extract Cluster Prototypes" width="90" x="313" y="34"/>
      <operator activated="true" class="generate_attributes" compatibility="7.0.001" expanded="true" height="82" name="Generate Attributes (2)" width="90" x="447" y="34">
        <list key="function_descriptions">
          <parameter key="type" value="&quot;centroid&quot;"/>
        </list>
      </operator>
      <operator activated="true" breakpoints="before" class="append" compatibility="7.0.001" expanded="true" height="103" name="Append" width="90" x="581" y="85"/>
      <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="Extract Cluster Prototypes" to_port="model"/>
      <connect from_op="Clustering" from_port="clustered set" to_op="Generate Attributes" to_port="example set input"/>
      <connect from_op="Generate Attributes" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
      <connect from_op="Select Attributes" from_port="example set output" to_op="Append" to_port="example set 2"/>
      <connect from_op="Extract Cluster Prototypes" from_port="example set" to_op="Generate Attributes (2)" to_port="example set input"/>
      <connect from_op="Generate Attributes (2)" from_port="example set output" to_op="Append" to_port="example set 1"/>
      <connect from_op="Append" from_port="merged set" 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>

type 属性可用作绘图中的颜色,以便您查看质心。

【讨论】:

    猜你喜欢
    • 2014-02-28
    • 1970-01-01
    • 2017-05-12
    • 2021-11-24
    • 2023-04-02
    • 2021-04-29
    • 2017-03-19
    • 1970-01-01
    • 2020-11-17
    相关资源
    最近更新 更多