문제

I have been using Rapidminer and created a series of processes which preform a standard set of tasks. Now, I want allow the user to dynamically set the parameters of a process at the start.

For example, when writing a CSV, I want to prompt the user to type a string containing the location where it should be saved via some prompt (either at the start of the script, or at some other stage during the process.

Is this possible via Rapidminer, or should I be creating some script to generate and runt he process on the fly?

도움이 되었습니까?

해결책

To change the parameters you want passed to your processes, I believe that you must edit the .xml file of your process. For example,

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.0.10" expanded="true" name="Process">
    <process expanded="true" height="145" width="212">
      <operator activated="true" class="generate_data" compatibility="5.0.10" expanded="true" height="60" name="Generate Data" width="90" x="112" y="30">
        <parameter key="number_examples" value="10"/>
      </operator>
      <operator activated="true" class="write_csv" compatibility="5.0.10" expanded="true" height="60" name="Write CSV" width="90" x="271" y="39">
        <parameter key="csv_file" value="C:\Users\wessel\Desktop\gendata.csv"/>
      </operator>
      <connect from_op="Generate Data" from_port="output" to_op="Write CSV" to_port="input"/>
      <connect from_op="Write CSV" from_port="through" 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>

You can see that for the write_csv operator, the value contains the path of the file to be written to. Changing the parameters as you describe would involve writing a script to get the values from the user, edit the corresponding values in the .xml file to these desired values and then throwing the process at RapidMiner.

다른 팁

It's possible to create a Groovy script that will allow a user to enter prompts at run time. This avoids having to edit the process each time.

Here is an example based on an original from the RapidMiner forum.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top