使用 RapidMiner 构建高精度分类器
Posted
技术标签:
【中文标题】使用 RapidMiner 构建高精度分类器【英文标题】:Building high-precision classifier with RapidMiner 【发布时间】:2017-03-27 07:13:35 【问题描述】:假设,我需要构建具有高精度和低召回率的分类器。我应该在 RapidMiner 中使用哪个运算符?例如,ApplyModel 算子不支持对阈值的任何干预?还不清楚同一个 ApplyModel 运算符如何与不同建模的模型一起使用:NeuralNetworks、SVN 等。
【问题讨论】:
【参考方案1】:您可以使用Select Recall
运算符。这将找到获得您选择的召回所需的阈值。
此运算符的输入是一个包含置信度的标记示例集,输出是一个阈值,该阈值使用Apply Threshold
运算符应用于标记数据。
Apply Model
运算符需要一个示例集和一个模型作为输入。
我做了一个简单的例子来说明这一切。
<?xml version="1.0" encoding="UTF-8"?><process version="7.2.003">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.2.003" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="7.2.003" expanded="true" name="Retrieve Sonar" x="45" y="34">
<parameter key="repository_entry" value="//Samples/data/Sonar"/>
</operator>
<operator activated="true" class="naive_bayes" compatibility="7.2.003" expanded="true" name="Naive Bayes" x="45" y="289"/>
<operator activated="true" class="apply_model" compatibility="7.2.003" expanded="true" name="Apply Model" x="179" y="289">
<list key="application_parameters"/>
</operator>
<operator activated="true" class="multiply" compatibility="7.2.003" expanded="true" name="Multiply" x="246" y="136"/>
<operator activated="true" class="materialize_data" compatibility="7.2.003" expanded="true" name="Materialize Data" x="380" y="136"/>
<operator activated="true" class="select_recall" compatibility="7.2.003" expanded="true" name="Select Recall" x="313" y="34">
<parameter key="min_recall" value="0.1"/>
</operator>
<operator activated="true" class="apply_threshold" compatibility="7.2.003" expanded="true" name="Apply Threshold" x="447" y="34"/>
<operator activated="true" class="performance_binominal_classification" compatibility="7.2.003" expanded="true" name="Performance" x="581" y="34"/>
<operator activated="true" class="performance_binominal_classification" compatibility="7.2.003" expanded="true" name="Performance (2)" x="581" y="136"/>
<connect from_op="Retrieve Sonar" from_port="output" to_op="Naive Bayes" to_port="training set"/>
<connect from_op="Naive Bayes" from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_op="Naive Bayes" from_port="exampleSet" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Multiply" to_port="input"/>
<connect from_op="Multiply" from_port="output 1" to_op="Select Recall" to_port="example set"/>
<connect from_op="Multiply" from_port="output 2" to_op="Materialize Data" to_port="example set input"/>
<connect from_op="Materialize Data" from_port="example set output" to_op="Performance (2)" to_port="labelled data"/>
<connect from_op="Select Recall" from_port="example set" to_op="Apply Threshold" to_port="example set"/>
<connect from_op="Select Recall" from_port="threshold" to_op="Apply Threshold" to_port="threshold"/>
<connect from_op="Apply Threshold" from_port="example set" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="result 1"/>
<connect from_op="Performance (2)" from_port="performance" to_port="result 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>
希望对您有所帮助。
【讨论】:
以上是关于使用 RapidMiner 构建高精度分类器的主要内容,如果未能解决你的问题,请参考以下文章