2013-04-08 341 views
1

我正在使用Rapidminer进行分析。我在几个模型上使用交叉验证来获得最佳工作模型。现在我想用这个模型来测试我使用Split Data来估计性能的单独测试集。如何使用Rapidminer测试测试集?

如何使用测试装置?据我所知,所有的验证模块都使用模型制作的训练集。我可以在模型和测试集中使用哪种性能指标?

回答

3

在模型中使用“应用模型”运算符作为第一个输入,使用您的测试集作为第二个输入。该操作员将返回带有一些额外特殊属性的标记数据集,这是您的数据输入,例如,预测和信心。 “性能”操作符需要这些属性来测量应用于测试集的模型的性能。

下面是一个使用“Samples”存储库中的训练和测试集的小例子。

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<process version="5.3.007"> 
    <context> 
    <input/> 
    <output/> 
    <macros/> 
    </context> 
    <operator activated="true" class="process" compatibility="5.3.007" expanded="true" name="Process"> 
    <process expanded="true"> 
     <operator activated="true" class="retrieve" compatibility="5.3.007" expanded="true" height="60" name="Golf" width="90" x="45" y="30"> 
     <parameter key="repository_entry" value="//Samples/data/Golf"/> 
     </operator> 
     <operator activated="true" class="decision_tree" compatibility="5.3.007" expanded="true" height="76" name="Decision Tree" width="90" x="179" y="30"/> 
     <operator activated="true" class="retrieve" compatibility="5.3.007" expanded="true" height="60" name="Golf-Testset" width="90" x="179" y="120"> 
     <parameter key="repository_entry" value="//Samples/data/Golf-Testset"/> 
     </operator> 
     <operator activated="true" breakpoints="before,after" class="apply_model" compatibility="5.3.007" expanded="true" height="76" name="Apply Model" width="90" x="313" y="30"> 
     <list key="application_parameters"/> 
     </operator> 
     <operator activated="true" class="performance" compatibility="5.3.007" expanded="true" height="76" name="Performance" width="90" x="447" y="30"/> 
     <connect from_op="Golf" from_port="output" to_op="Decision Tree" to_port="training set"/> 
     <connect from_op="Decision Tree" from_port="model" to_op="Apply Model" to_port="model"/> 
     <connect from_op="Golf-Testset" from_port="output" to_op="Apply Model" to_port="unlabelled data"/> 
     <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/> 
     <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>