Feeding data in running process / Pre-load data for repeating process

JensJens Member Posts: 6 Contributor II
edited November 2018 in Help
Hi,
I've created a model, saved it and use it as follows (unfortunately I don't have the project xml at hand at the moment, but it looks pretty similar to)

+ Textinput
  + String Tokenizer
+ Model Loader
+ Model Applier
+ Exampleset writer

I'm going to repeat the test with changing test data (which is loaded throug TextInput) but the same model

Unfortunately the most time consuming part of the precess is loading the model. Is there a way to somehow pre-load the model and keep it in memory such that the only thing that has to be loaded is the test data?
Or - different approach same result - load the model and feed data into Textinput (or similar class) while the process is running?

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Jens,
    here is some example process which should solve your problem.
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ModelLoader" class="ModelLoader">
            <parameter key="model_file" value="model File"/>
        </operator>
        <operator name="ParameterIteration" class="ParameterIteration" expanded="yes">
            <list key="parameters">
              <parameter key="SingleMacroDefinition (2).value" value="..\samples\Beispiel1,..\samples\Beispiel2,..\samples\Beispiel3"/>
            </list>
            <operator name="SingleMacroDefinition (2)" class="SingleMacroDefinition">
                <parameter key="macro" value="dir"/>
                <parameter key="value" value="..\sample\newsgroup\"/>
            </operator>
            <operator name="TextInput" class="TextInput" expanded="yes">
                <list key="namespaces">
                </list>
                <list key="texts">
                  <parameter key="one" value="%{dir}\classOneFiles"/>
                  <parameter key="two" value="%{dir}\classTwoFiles"/>
                </list>
                <operator name="StringTokenizer" class="StringTokenizer">
                </operator>
            </operator>
            <operator name="ModelApplier" class="ModelApplier">
                <list key="application_parameters">
                </list>
                <parameter key="keep_model" value="true"/>
            </operator>
        </operator>
    </operator>
    Greetings,
      Sebastian
  • JensJens Member Posts: 6 Contributor II
    Thanks Sebastian.
    Initially I thought Rapidminer is not working if I load the model previous to the Test ExampleSet because an error message is displayed in the process log.

    [Error] ModelApplier: ModelApplier: ModelApplier: Missing input: Model
    [Error] There was 1 error.

    The results of the process are correct, but do you know why the error is shown? And is it really safe to disregard it?
Sign In or Register to comment.