首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rapidminer - k-means查询

Rapidminer - k-means查询
EN

Stack Overflow用户
提问于 2016-01-29 19:48:26
回答 1查看 90关注 0票数 0

很抱歉,如果这是一个非常新手的问题,但我最近开始探索Rapidminer。我已经使用它通过K-means聚类对我的样本数据进行了聚类。我的疑问是,如果我使用一个excel原始数据文件进行聚类,我如何在excel文件中得到我的excel数据输出数据拆分成K个聚类。我知道如何创建集群并在设计和结果屏幕之间切换。

提前谢谢。

EN

回答 1

Stack Overflow用户

发布于 2016-01-29 21:19:51

大家好,欢迎来到stackoverflow和RapidMiner。

如果我没有理解错你的问题,你从excel中读取数据,进行聚类,然后想要将单个聚类写回excel。

如果您想手动执行此操作,可以使用"Filter Examples“运算符,并针对特定集群进行筛选。您还可以使用"Loop Values“操作符自动执行此操作,您可以将循环属性设置为cluster,并在循环中使用迭代宏来过滤数据。然后,您可以存储数据并使用迭代宏作为文件名。

请参阅下面的示例过程(您可以直接将其复制并粘贴到RapidMiner中的XML面板中):

代码语言:javascript
复制
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="7.0.0">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="7.1.000-SNAPSHOT" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="generate_data" compatibility="7.1.000-SNAPSHOT" expanded="true" height="68" name="Generate Data" width="90" x="112" y="34"/>
      <operator activated="true" class="generate_id" compatibility="7.1.000-SNAPSHOT" expanded="true" height="82" name="Generate ID" width="90" x="246" y="34"/>
      <operator activated="true" class="k_means" compatibility="7.1.000-SNAPSHOT" expanded="true" height="82" name="Clustering" width="90" x="447" y="34">
        <parameter key="k" value="5"/>
      </operator>
      <operator activated="true" class="loop_values" compatibility="7.1.000-SNAPSHOT" expanded="true" height="82" name="Loop Values" width="90" x="715" y="34">
        <parameter key="attribute" value="cluster"/>
        <process expanded="true">
          <operator activated="true" breakpoints="after" class="filter_examples" compatibility="7.1.000-SNAPSHOT" expanded="true" height="103" name="Filter Examples" width="90" x="179" y="34">
            <list key="filters_list">
              <parameter key="filters_entry_key" value="cluster.equals.%{loop_value}"/>
            </list>
          </operator>
          <connect from_port="example set" to_op="Filter Examples" to_port="example set input"/>
          <connect from_op="Filter Examples" from_port="example set output" to_port="out 1"/>
          <portSpacing port="source_example set" spacing="0"/>
          <portSpacing port="sink_out 1" spacing="0"/>
          <portSpacing port="sink_out 2" spacing="0"/>
        </process>
      </operator>
      <connect from_op="Generate Data" from_port="output" to_op="Generate ID" to_port="example set input"/>
      <connect from_op="Generate ID" from_port="example set output" to_op="Clustering" to_port="example set"/>
      <connect from_op="Clustering" from_port="clustered set" to_op="Loop Values" to_port="example set"/>
      <connect from_op="Loop Values" from_port="out 1" 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>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35083827

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档