【问题标题】:Rapidminer - k-means queryRapidminer - k-means 查询
【发布时间】:2016-01-29 21:19:50
【问题描述】:

对不起,如果这是一个非常新手的问题,但我最近开始探索 Rapidminer。我用它来聚类我的样本数据[使用 K-means 聚类]。我的查询是,如果我使用 excel 原始数据文件进行集群,我将如何将我的 excel 数据返回 [输出数据] 拆分为 excel 文件中的 K 个集群。我知道如何创建集群并在设计和结果屏幕之间切换。

提前致谢。

【问题讨论】:

    标签: rapidminer


    【解决方案1】:

    您好,欢迎使用 stackoverflow 和 RapidMiner。

    如果我正确理解您的问题,您可以从 excel 中读取数据,进行聚类,然后将单个聚类写回 excel。
    如果您想手动执行此操作,您可以使用“过滤示例”运算符并针对特定集群进行过滤。 您还可以使用“循环值”运算符自动执行此操作,您可以在其中将循环属性设置为集群并使用循环内的迭代宏来过滤数据。然后,您可以存储数据并使用迭代宏作为文件名。
    参见下面的示例流程(您可以直接在 RapidMiner 中将其复制并粘贴到 XML 面板中):

        <?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>
    

    【讨论】:

    • 非常感谢大卫。是的,我有点理解你的解决方案。我会进一步谷歌它。是否有任何现成的教程。我也可以将所有集群写入excel中的不同工作表吗?感谢您的帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-05-23
    • 2013-07-03
    • 2020-03-03
    • 2013-07-03
    • 2016-01-07
    • 2010-12-11
    • 2021-01-27
    相关资源
    最近更新 更多