【问题标题】:Clustering with Cross Validation in Rapid MinerRapid Miner 中的交叉验证聚类
【发布时间】:2015-02-12 20:13:26
【问题描述】:

我不确定我在这里做错了什么,但我希望有人可以帮助我。我正在尝试使用 k-means 聚类作为我的模型在快速矿工中运行 x-validation。

我导入我的数据集,在一个属性上设置“标签”角色,将数据从名义转换为数字,然后将该输出连接到 x 验证过程。然后,我将训练数据连接到 k-means 聚类模型,并将聚类模型连接到测试数据模型。我应用来自 k-means 模型的模型,然后应用性能过程。

我不断收到我需要特殊属性“标签”的错误。

我不确定我在这里做错了什么,感谢任何帮助。

主要流程:

X-验证过程:

错误信息:

【问题讨论】:

    标签: data-mining k-means cross-validation rapidminer


    【解决方案1】:

    X-Validation 需要标签和预测。聚类不会产生预测;它将示例分配给不同的集群。要将分配的集群更改为预测,您可以使用Map Clustering on Labels 运算符。将其放在 Apply ModelPerformance 运算符之间。

    如果聚类的数量与有效标签值的数量不同,则该过程将出错。

    【讨论】:

      【解决方案2】:

      如果您想在验证中检查您的集群,引导程序可能也适合您。可以使用循环和示例运算符轻松归档引导。附上一个过程。

      如果您使用集群中的映射来标记,您只会从验证中获得性能。如果您想获得聚类示例,您可以使用 X-Prediction 和相同的技巧。

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <process version="6.1.001-SNAPSHOT">
        <context>
          <input/>
          <output/>
          <macros/>
        </context>
        <operator activated="true" class="process" compatibility="6.1.001-SNAPSHOT" expanded="true" name="Process">
          <process expanded="true">
            <operator activated="true" class="retrieve" compatibility="6.1.001-SNAPSHOT" expanded="true" height="60" name="Retrieve Sonar" width="90" x="112" y="75">
              <parameter key="repository_entry" value="//Samples/data/Sonar"/>
            </operator>
            <operator activated="true" class="loop" compatibility="6.1.001-SNAPSHOT" expanded="true" height="76" name="Loop" width="90" x="313" y="75">
              <parameter key="iterations" value="10"/>
              <process expanded="true">
                <operator activated="true" class="sample_bootstrapping" compatibility="6.1.001-SNAPSHOT" expanded="true" height="76" name="Sample (Bootstrapping)" width="90" x="179" y="30"/>
                <operator activated="true" class="k_means" compatibility="6.1.001-SNAPSHOT" expanded="true" height="76" name="Clustering (2)" width="90" x="313" y="30"/>
                <connect from_port="input 1" to_op="Sample (Bootstrapping)" to_port="example set input"/>
                <connect from_op="Sample (Bootstrapping)" from_port="example set output" to_op="Clustering (2)" to_port="example set"/>
                <connect from_op="Clustering (2)" from_port="cluster model" to_port="output 1"/>
                <portSpacing port="source_input 1" spacing="0"/>
                <portSpacing port="source_input 2" spacing="0"/>
                <portSpacing port="sink_output 1" spacing="0"/>
                <portSpacing port="sink_output 2" spacing="0"/>
              </process>
            </operator>
            <connect from_op="Retrieve Sonar" from_port="output" to_op="Loop" to_port="input 1"/>
            <connect from_op="Loop" from_port="output 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>
      

      【讨论】:

        猜你喜欢
        • 2017-11-07
        • 1970-01-01
        • 2015-01-05
        • 1970-01-01
        • 2016-03-10
        • 1970-01-01
        • 2018-07-26
        • 2014-03-09
        • 2021-10-08
        相关资源
        最近更新 更多