Implementation of scoring models

Scoring Engine supports scoring models in 3 formats: Java, PMML or R code. Added codes can be queried by engine or used in scenarios.

Adding new code

Scoring code can be added in Scoring code management panel. To add a scoring code, click the Add New Scoring Code button, then enter the name of the code and drag the file (or a .zip file in case of R models) with the code to designated area on the right side of the screen, or click this area and select the file with the code to add. A .zip file containing R model must contain:

  • .R file with script containing transformations, calculations and/or models stored in RDS files. A variable with script output must be named rResult, RDS files can be used by refering to their names
  • CSV file with input variables (as described in Creating and testing a scenario section)
  • (optionally) RDS file(s) with model(s), these models can be used in the script by reference by file name. To save model as an RDS file, use saveRDS function in R.

A list of added codes is presented on the bottom of the panel.

Testing a code

Added codes can be queries in Forms panel. For this purpose, select a model from model drop-down list, enter proper values of displayed input variables (defined in the code), and then click the Query button. If the query is correct, output variables (defined in the code) will be displayed. Otherwise, the engine will display an appropriate error. Queries can be viewed in Browse scoring results panel, after choosing Scoring model or Pmml model in Result type drop-down list.