Как я могу сохранить «Автоматическую модель» с быстрого майнера на локальный диск - PullRequest
0 голосов
/ 05 ноября 2018

Я построил регрессионную модель, используя Rapid Miner. После тонкой настройки модели точность хорошая. Теперь я хочу использовать тот же файл Model для запуска следующего набора данных. Есть ли способ экспортировать модель классификатора RapidMiner на локальный диск и прогнозировать новые данные.

1 Ответ

0 голосов
/ 05 ноября 2018

, чтобы получить доступ к результату AutoModel, вы нажимаете «Открыть процесс» в окне результатов Затем вы можете либо щелкнуть правой кнопкой мыши по третьему выходному порту (для модели), либо повторно запустить процесс, а затем сохранить модель, щелкнув правой кнопкой мыши заголовок вкладки модели.

Как правило, вы можете хранить любую модель в вашем хранилище RapidMiner. Либо щелкнув правой кнопкой мыши заголовок вкладки в представлении результатов, либо с помощью оператора «Store» после порта вывода модели.

Если вы затем хотите запустить модель на новых данных, вы используете оператор "Применить модель" с сохраненной моделью и новым набором данных.

См. Учебный процесс для примера (просто скопируйте и вставьте XML в своем окне процесса). Вы также можете проверить сообщество RapidMiner для получения дополнительных учебных материалов:
https://community.rapidminer.com/t5/Machine-Learning-Essentials-K-nn/tkb-p/IntroductoryML

Apply Model tutorial process

<?xml version="1.0" encoding="UTF-8"?><process version="9.0.003">
 <context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process" origin="GENERATED_TUTORIAL">
<process expanded="true">
  <operator activated="true" class="retrieve" compatibility="9.0.003" expanded="true" height="68" name="Retrieve Polynomial" origin="GENERATED_TUTORIAL" width="90" x="112" y="85">
    <parameter key="repository_entry" value="//Samples/data/Polynomial"/>
  </operator>
  <operator activated="true" class="split_data" compatibility="9.0.003" expanded="true" height="103" name="Split Data" origin="GENERATED_TUTORIAL" width="90" x="246" y="85">
    <enumeration key="partitions">
      <parameter key="ratio" value="0.8"/>
      <parameter key="ratio" value="0.2"/>
    </enumeration>
  </operator>
  <operator activated="true" class="select_attributes" compatibility="9.0.003" expanded="true" height="82" name="Select Attributes" origin="GENERATED_TUTORIAL" width="90" x="447" y="289">
    <parameter key="attribute_filter_type" value="single"/>
    <parameter key="attribute" value="label"/>
    <parameter key="invert_selection" value="true"/>
    <parameter key="include_special_attributes" value="true"/>
  </operator>
  <operator activated="true" class="linear_regression" compatibility="9.0.003" expanded="true" height="103" name="Linear Regression" origin="GENERATED_TUTORIAL" width="90" x="447" y="85"/>
  <operator activated="true" class="apply_model" compatibility="7.1.001" expanded="true" height="82" name="Apply Model" origin="GENERATED_TUTORIAL" width="90" x="715" y="187">
    <list key="application_parameters"/>
  </operator>
  <connect from_op="Retrieve Polynomial" from_port="output" to_op="Split Data" to_port="example set"/>
  <connect from_op="Split Data" from_port="partition 1" to_op="Linear Regression" to_port="training set"/>
  <connect from_op="Split Data" from_port="partition 2" to_op="Select Attributes" to_port="example set input"/>
  <connect from_op="Select Attributes" from_port="example set output" to_op="Apply Model" to_port="unlabelled data"/>
  <connect from_op="Linear Regression" from_port="model" to_op="Apply Model" to_port="model"/>
  <connect from_op="Apply Model" from_port="labelled data" to_port="result 2"/>
  <connect from_op="Apply Model" from_port="model" 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"/>
  <portSpacing port="sink_result 3" spacing="0"/>
  <description align="center" color="green" colored="true" height="189" resized="true" width="210" x="391" y="23">Generating a model within the training of a linear regression</description>
  <description align="center" color="blue" colored="true" height="188" resized="true" width="309" x="74" y="23">Loading labelled data</description>
  <description align="center" color="purple" colored="true" height="187" resized="true" width="208" x="390" y="250">Unlabelled data&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Removing the label to emulate an unlabelled data set.</description>
  <description align="left" color="yellow" colored="false" height="305" resized="true" width="325" x="645" y="134">Applying the model obtained from training to an unlabelled data set&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Labelled data output:&lt;br&gt;ExampleSet from the unlabelled input port enriched with predictions obtained from applying the model.&lt;br&gt;Model output:&lt;br&gt;Have a look into the Results view showing the formula for linear regression with coefficients obtained from the training process.&lt;br&gt; 
 </description>
 </process>
 </operator>
 </process>
...