Set dynamical parameters in RapidMiner process

yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:363RM Data Scientist
edited November 2018 inKnowledge Base

Question

我们可以动态地选择/取消选择“启用他相比l execution’ for a loop based on time of day it is scheduled to run?

Answer

Absolutely.

That is a smart idea to avoid API rate limits during a rush hour on RapidMiner server. Suppose we would like to schedule the job on a weekday 9-5. The server is busy during that time and a loop without parallelization may be a good choice. As for the jobs scheduled on Friday evening or weekends, we would like to leverage all the computing power and enable parallel execution of the loop.

First things first, you will need the extension "Operator Toolbox" from marketplace or manually download & install from

https://marketplace.www.turtlecreekpls.com/UpdateServer/faces/product_details.xhtml?productId=rmx_operator_toolbox

In the process, you can easily get the timestamp of the execution and make good use of the operator "Set Parameters from ExampleSet" from Toolbox.

Screen Shot 2017-05-19 at 9.58.52 AM.png

You can generate macro with built-in date_now() function and put it in an example set. The input data for "Set Parameters from ExampleSet" need at least three columns: 1. operator name, 2. parameter name, 3. value of that parameter

这里附加的示例流程。

Screen Shot 2017-05-19 at 10.01.32 AM.png

Make sure you have the right execution order: "Set parameters from ExampleSet" before the operators (e.g. loop) you wanna execute dynamically.











<参数键= "timestamp" value="date_now()"/>
<参数键= "hour" value="date_get(date_now(),DATE_UNIT_HOUR)"/>




<参数键= "operator" value=""Loop Attributes""/>
<参数键= "parameter" value=""enable_parallel_execution""/>
<参数键= "value" value="if(eval(%{hour})>9 && eval(%{hour})<17,true, false)"/>




<参数键= "Operator name column" value="operator"/>
<参数键= "Parameter name column" value="parameter"/>
<参数键= "Value column" value="value"/>


<参数键= "repository_entry" value="//Samples/data/Iris"/>























CraigBostonUSA sgenzer rm1971
    Sign InorRegisterto comment.