How Predictive Scoring Works Using the Analytics Server Connector
You can perform both real time and batch predictive scoring on models by using the TW.AnalysisServices.AnalyticsServer.AnalyticsServerConnector in Analytics Manager. The prediction microservice in the Analytics Server is used to score the models. With this connector, you can perform predictive scoring on both, non-time series as well as time series models.
For procedural information, see the following tutorials:
The Analytics Server connector is not built as an analysis SDK agent. Instead it leverages the Analytics Server to submit prediction jobs, either synchronously or asynchronously. In case of a simulation event, a simulation job is created by the Analytics Manager framework and a virtual thing is created that binds it to the client (agent) implementation. Since the Analytics Server connector is not using the client-server architecture (Analytics Manager-agent); the simulation event is not useful. Hence, we have disabled simulation event for this connector.
The analysis replay functionality of Analytics Manager is not supported by the Analytics Server connector.
Prerequisites
Ensure that you have the following prerequisites set before you perform predictive scoring by using the TW.AnalysisServices.AnalyticsServer.AnalyticsServerConnector in Analytics Manager and the prediction microservice in the Analytics Server:
• Install and configure the ThingWorx Analytics Server.
• Start the Analytics Server, and ensure that the following services are running:
◦ results
◦ prediction
• Install and configure the ThingWorx Analytics Extension.
Process Flow
The following diagram illustrates how predictive scoring works by using the Analytics Server:
User Actions
1. Configure the Analytics Server.
2. Configure an analysis provider by using the TW.AnalysisServices.AnalyticsServer.AnalyticsServerConnector connector in Analytics Manager.
3. Publish a model from Analytics Builder to Analytics Manager or upload an existing model in Analytics Manager.
4. Test the model in Analytics Manager and enable it.
5. Create the thing in ThingWorx Composer.
6. Create an event on the thing.
7. Subscribe the event to a property of the thing.
| Predictive scoring will be handled synchronously by default unless you enable the runJobAsAsync property on the AnalyticsServerConnector Thing: TW.AnalysisServices.AnalyticsServer.AnalyticsServerConnector. For more information, see the tutorials in Related Links. |
Automated Actions
1. When an event is detected in Analytics Manager, it submits a scoring request to the Analytics Server.
2. The prediction microservice runs scoring on the submitted data.
3. The results are returned to Analytics Manager. According to the result mapping, the results are returned to the thing in ThingWorx Composer.
Related Links