如何针对我的训练模型运行新示例的分类,而无需再次重新运行训练模型?
经过训练的模型需要一些时间来处理(1 小时),我想对新的观察结果进行分类,而不必每次都等待使用训练数据再次创建模型。
我以前从未将这两个流程分开,我总是将它们放在同一个流程流窗口中,因为我不知道要独立执行这些流程。
如何针对我的训练模型运行新示例的分类,而无需再次重新运行训练模型?
经过训练的模型需要一些时间来处理(1 小时),我想对新的观察结果进行分类,而不必每次都等待使用训练数据再次创建模型。
我以前从未将这两个流程分开,我总是将它们放在同一个流程流窗口中,因为我不知道要独立执行这些流程。
可以将经过训练的模型存储在存储库中(使用“Store”运算符)或作为文件(运算符“Write model”)。通常,您将使用“Store”操作符并使用“Retrieve”操作符从存储库中读取模型,例如在同一进程或任何其他进程中。
可能是 RapidMiner 会抱怨它没有得到一个模型对象,而是一个 IOObject,但是进程无论如何都会运行,并且在 IOObejct 的元数据传播后消息将消失。
这是一个例子:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.013">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve Golf" width="90" x="45" y="75">
<parameter key="repository_entry" value="//Samples/data/Golf"/>
</operator>
<operator activated="true" class="decision_tree" compatibility="5.3.013" expanded="true" height="76" name="Decision Tree" width="90" x="179" y="75"/>
<operator activated="true" class="store" compatibility="5.3.013" expanded="true" height="60" name="Store" width="90" x="313" y="75">
<parameter key="repository_entry" value="my_model"/>
</operator>
<operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve" width="90" x="45" y="210">
<parameter key="repository_entry" value="my_model"/>
</operator>
<operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve Golf-Testset" width="90" x="45" y="300">
<parameter key="repository_entry" value="//Samples/data/Golf-Testset"/>
</operator>
<operator activated="true" class="apply_model" compatibility="5.3.013" expanded="true" height="76" name="Apply Model" width="90" x="179" y="210">
<list key="application_parameters"/>
</operator>
<connect from_op="Retrieve Golf" from_port="output" to_op="Decision Tree" to_port="training set"/>
<connect from_op="Decision Tree" from_port="model" to_op="Store" to_port="input"/>
<connect from_op="Retrieve" from_port="output" to_op="Apply Model" to_port="model"/>
<connect from_op="Retrieve Golf-Testset" from_port="output" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" 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>