Oracle Financial Services Enterprise Modeling application enables you to
create techniques based on scripts. The supported scripting languages are R or ORE.
After registering the techniques, they can be used in model definitions. In the Model
Script tab, you can write the script in your preferred language. The Declaration Block
in the script is used to declare the input and output parameters. The format of the
declaration block and the content should not be altered. The scripting should start only
from the line after the declaration block.
There are three types of input parameters that can be used in the
script, namely Variable, Single Value Parameter, and Model Input. The input parameters
can be defined from the Declaration block in the Script Console
pane, or by right-clicking the parameter and selecting the Input type. The value of a
single value parameter is defined from the Inputs window. However, the value of
variables and model inputs are mapped during the model definition in which the technique
is used.
You can configure the numeric output by declaring it in the
Declaration block (## Output -->), or by right-clicking the parameter and selecting the
Output type. It is not required to declare output parameters for plots or graphical
outputs.
The script should be valid. You can use ORE functions instead of R
functions for better performance in the R script. All the object names or functions used
in the script should be syntactically valid. Validation of the script is not done while
registering the technique. If you already have defined a technique using an R script and
saved it in a .R file, you can upload it and register it as a technique.
To create a technique using scripts, follow these steps:
- Click Technique Registration from the
Navigation list. The Technique Registration window is
displayed.
- Click the Add icon from the Technique Registration
toolbar. The Technique Definition window is displayed.
- Enter the details as described in the following table. Fields marked in red
asterisk (*) are mandatory.
- In the Script Console pane, enter the R script for the
technique. For more information on how to use fitting and prediction, see the
Fitting and Prediction Using R Script section.
- By default, the Script Console is displayed as shown above. Enter the following
details:
- ## Variable --> Enter the variables you want to use in the R script
separated by commas. You should map these variables to the corresponding
variables which are available in the Variable Management window, during
defining the model.
- ## Single Value Parameter --> Enter the input parameters you want to use
in the R script.
- ## Model Input--> Enter the script variable names to which you want to
load the output of another model in case of model chaining.
- ## Output --> Enter the output parameters you want to use in the R
script.
- ## Model Output--> Enter the output object names you want to
persist.
Note:
The variables and input parameters are case-sensitive. The same name
cannot be used for both variable and input parameters.
- Click the Downward Arrow icon on the Script Console
toolbar. The Inputs window is displayed.
- Enter Display Name for the Variables or Model Inputs you defined. The mapping
of variables is done during the model definition.
- Enter Display Name and Value for single value parameters you defined.
- Select the parameter and click the Delete icon to delete
it.
- Click the Upward Arrow icon from the Script Console
toolbar. The Outputs window is displayed.
- Enter Display Name for the output parameter you defined.
- Click the Upload icon to browse and upload .R file. You
can use this option if you have already defined a technique and saved it in an R
file. Once uploaded successfully, the script is displayed in the
Script Console pane.
- Select the Include Scripts tab if you want to source already defined algorithms
to your script.
- Select the required algorithms/ scripts from the Scripts List tree and
click the Forward Arrow icon.
- You can view the scripts by selecting the script and clicking the
Book icon.
- After adding scripts, you can position the scripts as required by
selecting them and clicking the Upward Arrow and
Downward Arrow icons.
- Click the Comments tab and click the
Add icon to add additional information, if
required.
- Click Save. If you have authorization privilege, then
the technique is auto authorized and it can be used in creating models.