Rule: Demo-a-simple-timeseries-prediction
loading x elements...

Name: Demo-a-simple-timeseries-prediction

Version: 10

Discussion Thread

Creator: tutorial_developer_demo

This Rule is part of the tutorial.
This Rule reacts to demo_a_simple_timeseries_prediction and creates and presents an Option.
That option allows the user to select parameters for the Program Demo_a_simple_timeseries_prediction and executes it.

ID: 417

Created: May 29, 2019, 3:56 p.m.

full definition:

The below is the JSON description of this object.

It is annotated with links to the documentation of each component.

You can hide fields with default values to make things clearer, and copy it to a clipboard to make creating similar Rules and Options easier.

Rule

{ "name" : "Demo-a-simple-timeseries-prediction", "description" : "This Rule is part of the tutorial.
This Rule reacts to demo_a_simple_timeseries_prediction and creates and presents an Option.
That option allows the user to select parameters for the Program Demo_a_simple_timeseries_prediction and executes it."
, "dependencies" : [

Dependency

{ "_comment" : "This Rule has only a single dependency, which is a Tag that should be created manually, as part of the Scenario Plan.", "symbol" : "demo_a_simple_timeseries_prediction" }
], "threshold" : 1.0, "trigger" :

Trigger

{ "_comment" : "This Rule does not need a trigger. It should execute immediately when the dependency is fulfilled.
By leaving this field blank, the default trigger is used: The Rule fires, but only once."
}
, "actions" : [

Create an Option

{ "type" : "create_option", "_comment" : "Some explanations about the Option created here:
-The 'confidence' is set to 1000 because that is very high and guarantees that the Option will be displayed.
-The 'display' has 'must_always_be_shown' because normally an Option who's confidence is this high will be executed immediately without being displayed to the user first. Since we rely on parameters entered by the user, we must force the Option to be displayed instead of executed.
-By specifying a 'parameter_file_name' in the 'display', we make sure that any parameters later selected in an 'option_parameter_selector' are stored in a file. This creates a named variable called 'userParametersFile' that is referenced later.
-When the Option is executed, its 'actions' are run and an 'execute_program' Event is created.
-The Program Demo_a_simple_timeseries_prediction referenced here is the Program we will upload as the next step of this tutorial.
-The Program execution uses the 'userParametersFile' as an argument, so that Demo_a_simple_timeseries_prediction has access to the data entered by the user."
, "var" : "demo-a-simple-timeseries-prediction", "name" : "demo-a-simple-timeseries-prediction", "description" : "This Option will ask the user for parameters, then execute Demo_a_simple_timeseries_prediction with those parameters.", "confidence" : 1000.0, "trigger" :

Trigger

{ }
, "display" :

Option Display

{ "must_always_be_shown" : true, "parameter_file_name" : "userParametersFile", "message_components" : [

Text message component

{ "type" : "text", "text" : "This is a demonstration of a simple way to interactively run a program through your browser. This will run a python program on our server to perform a timeseries prediction, then show you the results." }
,

Text message component

{ "type" : "text", "text" : "Please select parameters for the prediction." }
,

Option Parameter Selector

{ "type" : "option_parameter_selector", "name" : "timeseries", "title" : "Timeseries to predict", "description" : "The timeseries, as a string of comma-separated values:", "value" :

String Parameter

{ "type" : "string", "default" : "1.0, 2.0, 3.0" }
}
,

Option Parameter Selector

{ "type" : "option_parameter_selector", "name" : "c", "title" : "Number of elements to predict", "value" :

Integer Parameter

{ "type" : "int", "default" : 5, "min" : 1 }
}
,

Option Parameter Selector

{ "type" : "option_parameter_selector", "name" : "use_inbuilt_visualization", "title" : "Use inbuilt visualization?", "description" : "If selected, the predicted timeseries will be visualized with a simple built-in program. Otherwise it will be left to the Programs of other users to visualize the result (this is not part of the tutorial and may not work!)", "optional" : true, "value" :

Boolean Parameter

{ "type" : "bool", "default" : true }
}
], "buttons" : [

Option Display Submit Button

{ "text" : "Perform the prediction", "style" : "cta" }
] }
, "actions" : [

Execute a Program

{ "type" : "execute_program", "program" : "Demo_a_simple_timeseries_prediction", "arguments" : { "user_parameters_file" :

Variable

{ "type" : "variable", "var" : "userParametersFile" }
} }
] }
], "existing_variables" : { "demo-a-simple-timeseries-prediction" :

Variable

{ "type" : "option" }
} }

Rule

{ "name" : "Demo-a-simple-timeseries-prediction", "description" : "This Rule is part of the tutorial.
This Rule reacts to demo_a_simple_timeseries_prediction and creates and presents an Option.
That option allows the user to select parameters for the Program Demo_a_simple_timeseries_prediction and executes it."
, "dependencies" : [

Dependency

{ "_comment" : "This Rule has only a single dependency, which is a Tag that should be created manually, as part of the Scenario Plan.", "symbol" : "demo_a_simple_timeseries_prediction", "weight" : 1.0, "comment_filter" : null }
], "threshold" : 1.0, "trigger" :

Trigger

{ "_comment" : "This Rule does not need a trigger. It should execute immediately when the dependency is fulfilled.
By leaving this field blank, the default trigger is used: The Rule fires, but only once."
, "repeat" : "never", "arguments" : [], "deactivate_if" : {} }
, "actions" : [

Create an Option

{ "type" : "create_option", "_comment" : "Some explanations about the Option created here:
-The 'confidence' is set to 1000 because that is very high and guarantees that the Option will be displayed.
-The 'display' has 'must_always_be_shown' because normally an Option who's confidence is this high will be executed immediately without being displayed to the user first. Since we rely on parameters entered by the user, we must force the Option to be displayed instead of executed.
-By specifying a 'parameter_file_name' in the 'display', we make sure that any parameters later selected in an 'option_parameter_selector' are stored in a file. This creates a named variable called 'userParametersFile' that is referenced later.
-When the Option is executed, its 'actions' are run and an 'execute_program' Event is created.
-The Program Demo_a_simple_timeseries_prediction referenced here is the Program we will upload as the next step of this tutorial.
-The Program execution uses the 'userParametersFile' as an argument, so that Demo_a_simple_timeseries_prediction has access to the data entered by the user."
, "var" : "demo-a-simple-timeseries-prediction", "name" : "demo-a-simple-timeseries-prediction", "description" : "This Option will ask the user for parameters, then execute Demo_a_simple_timeseries_prediction with those parameters.", "confidence" : 1000.0, "trigger" :

Trigger

{ "repeat" : "never", "arguments" : [], "deactivate_if" : {} }
, "display" :

Option Display

{ "must_always_be_shown" : true, "parameter_file_name" : "userParametersFile", "message_components" : [

Text message component

{ "type" : "text", "text" : "This is a demonstration of a simple way to interactively run a program through your browser. This will run a python program on our server to perform a timeseries prediction, then show you the results." }
,

Text message component

{ "type" : "text", "text" : "Please select parameters for the prediction." }
,

Option Parameter Selector

{ "type" : "option_parameter_selector", "name" : "timeseries", "title" : "Timeseries to predict", "description" : "The timeseries, as a string of comma-separated values:", "optional" : false, "value" :

String Parameter

{ "type" : "string", "default" : "1.0, 2.0, 3.0", "multiline" : false }
}
,

Option Parameter Selector

{ "type" : "option_parameter_selector", "name" : "c", "title" : "Number of elements to predict", "description" : "", "optional" : false, "value" :

Integer Parameter

{ "type" : "int", "default" : 5, "min" : 1, "max" : null }
}
,

Option Parameter Selector

{ "type" : "option_parameter_selector", "name" : "use_inbuilt_visualization", "title" : "Use inbuilt visualization?", "description" : "If selected, the predicted timeseries will be visualized with a simple built-in program. Otherwise it will be left to the Programs of other users to visualize the result (this is not part of the tutorial and may not work!)", "optional" : true, "value" :

Boolean Parameter

{ "type" : "bool", "default" : true }
}
], "buttons" : [

Option Display Submit Button

{ "text" : "Perform the prediction", "style" : "cta", "replace_normal_actions" : false, "is_the_default_button" : false, "actions" : [] }
] }
, "actions" : [

Execute a Program

{ "type" : "execute_program", "var" : null, "program" : "Demo_a_simple_timeseries_prediction", "arguments" : { "user_parameters_file" :

Variable

{ "type" : "variable", "nullable" : false, "var" : "userParametersFile" }
}, "argument_lists" : {} }
] }
], "existing_variables" : { "demo-a-simple-timeseries-prediction" :

Variable

{ "type" : "option", "value" : null }
} }

all versions of this Rule:

Version 10

Version 9 (deleted)

Version 8 (deleted)

Version 7 (deleted)

Version 6 (deleted)

Version 5 (deleted)

Version 4 (deleted)

Version 3 (deleted)

Version 2 (deleted)

Version 1 (deleted)