Frage

Ich habe Rapidminer wurde mit und erstellt eine Reihe von Prozessen, die einen Standardsatz von Aufgaben Vorform. Jetzt will ich es dem Benutzer erlauben, um dynamisch die Parameter eines Prozesses zu Beginn festgelegt.

Wenn zum Beispiel eine CSV-Schreiben, ich möchte den Benutzer aufzufordern, eine Zeichenfolge an den Speicherort enthält, wo es über einige prompt (entweder am Anfang des Skripts, oder zu einem anderen Zeitpunkt während des Prozesses gespeichert werden sollen.

Ist das möglich über Rapidminer, oder sollte ich ein Skript erschaffen zu generieren und runt er im Fluge verarbeiten?

War es hilfreich?

Lösung

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top