How to build a workspace with Input and Output nodes for Live Score deployment?

How to build a workspace with Input and Output nodes for Live Score deployment?

book

Article ID: KB0077237

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.5

Description

In Statistica workspaces, you can specify an Input node and an Output node for different use cases. For example,  In Live Score, you can explicitly designate a node as Input Node and another node as Output Node in the workspace UI (User Interface) . Live Score will look for such designation and just use it for injection of input data case and extract output case (score output) to return the SOAP response. Please note that the behavior is not "hard-coded", but this is something that the sample Live.svb server-side macro does. This article walks through an example of building a workspace that is ready for scoring in Livescore. This example uses the Statistica example data CreditRisk.sta

Issue/Introduction

This article walks through an example of marking Input and Output nodes in workspaces for Live Score.

Resolution

1. Click File|Open Examples|Datasets|CreditRisk.sta, this will open the CreditRisk spreadsheet in Statistica.

2. Click Home|Add Workspace|Add to New Workspace.

3. Under Data Mining, click "Boosted Trees"|"Boosted Classification Trees" and connect the node with the input spreadsheet node.

4. Double click Boosted Classification Trees node to configure the node.

5. Click Variables to select variables. To simplify the example, select "Credit Standing" as the Dependent Variable, "Purpose", "Employment", "Gender", "Housing" and"Jobs" as "Categorical predictors", and then "Age" as Continuous predictors. 

User-added image

Please note the body of the SOAP request is treated as a single case of data to match to the columns of the input dataset in the workspace, and similarly for output. Due to that those XML elements can't have spaces, the names of the input predictor variables can't have spaces. You will need to rename predictors in such scenarios.

6.  Click Downstream to select "Predicted Values" as the output document for downstream and keep other options as default.

User-added image

7. Click "Run All" to run the workspace.

8. Disconnect the "CreditRisk" input data with the "Boosted Classification Tree" node and reconnect it with the "Rapid Deployment" node.

User-added image

9. Under "Rapid Deployment" node|Quick, select "Predict case(s) with missing data inputs".

User-added image

10.  Under "Rapid Deployment" node|Downstream, select "Input data, predictions and residuals" as the Downstream document. Click "OK".

11. Right-click "CreditRisk" spreadsheet node and select "Input Node".

User-added image

12. Right-click "Rapid Deployment" and select "Output Node".

User-added image

13. Run the modified workspace and click "Deploy" to save the workspace under Enterprise. This will save the workspace to the Enterprise metadatabase.

14. In the SOAP UI, create a SOAP request based on the example wsdl file "Live Score Sample.wsdl" and fill in the predictors' value as needed to file a scoring request for a single record. This scoring outcome will return the predicted output.

User-added image