ThingWorx Analytics Training: Module 7 Part 2
- December 23, 2022
- 0 replies
- 1118 views
This video concludes Module 7: Predictive & Prescriptive Scoring of the ThingWorx Analytics Training videos. It describes how ThingWorx Analytics automatically evaluates a range of values for chosen fields to produce prescriptive scores.
This video contains a couple hands-on exercises, and it is recommended to complete them before moving on to subsequent sections. In one exercise you will use the model you trained in Module 6 to perform a batch prescriptive scoring job. In the other you will export a predictive model from your ThingWorx Analytics environment as a .pmml file, and then import it back in.
This video has chapters — use the chapter menu in the player to jump to any section.
Chapter Summaries:
0:00 – Real-Time Scoring: ThingWorx Analytics Prediction Thing Service
Introduces the RealTimeScore service on the Analytics Server prediction thing for fast, single-record scoring, contrasts it with batch scoring for large datasets, and shows how it binds into custom ThingWorx Foundation mashups for on-the-fly predictions.
1:06 – Prescriptive Scoring: Espresso Machine Failure Use Case
Explains how prescriptive scoring extends predictive scoring, using a BeanPro espresso machine failure scenario to ask what controllable actions could have prevented failure and how to reduce the risk of grinder error occurrence.
1:49 – Levers & Optimization Logic: Categorical, Ordinal, Boolean & Continuous Features
Defines "levers" as the controllable variables ThingWorx Analytics adjusts, trying all categorical, ordinal, and Boolean values plus incremental ranges for continuous features to prescribe the lever combination that minimizes or maximizes the goal.
2:29 – Prescriptive Setup via Microservices: BeanPro Model & Dataset Job IDs
Because prescriptive scoring isn't part of the Builder UI, this walks through copying the trained BeanPro model Job ID and the dataset URI from the Models and Data sections and pasting them into Notepad for use in the microservices.
3:26 – Batch Score Service: Dataset Ref, URI, Parquet Format & record_purpose Filter
Opens the Analytics Server Prescriptive thing, executes the Batch Score service, and configures the job name, dataset reference, dataset URI, parquet format, and a record_purpose = 'scoring' filter to limit which records are scored.
5:31 – Excluded Fields, Goal Field & Identifier Fields Configuration
Covers optionally excluding fields (noting identifier and record_purpose were already dropped during training), setting the goal field to GrinderErrorOccurrence with no spaces, and adding the identifier field to track records.
6:59 – Model URI & Cleanings Lever: AvgDailyCleaningsTempPrior7Days
Builds the model URI (results:/models/) from the copied Job ID and adds the AvgDailyCleaningsTempPrior7Days lever, explaining how allowed-values entries and min/max settings can constrain the prescriptions ThingWorx Analytics returns.
9:21 – Maximize Parameter, Save Input Set & Execute Job
Sets the maximize parameter to false to minimize grinder error risk, saves the configuration as the BP_prescriptive_inputs input set, and executes the batch prescriptive scoring job.
10:03 – Retrieving Results: GetJobInfos & SaveJobResult Services
Copies the resulting job ID, runs GetJobInfos to confirm the job state is "completed," then executes SaveJobResult to generate the output file path for the prescription results.
11:02 – Downloading Prescriptions: Analytics Result Storage & Optimization Folder
Navigates through the Manage (gear) icon to Analytics Result Storage, expands the optimization folder, and downloads the prescription results CSV from the Actions menu.
11:53 – Interpreting the CSV: Original vs. Optimized Scores & Prescribed Lever Values
Reviews the ~1,000-record CSV—identifier, original score, optimized score, and original vs. prescribed daily-cleanings values—showing how raising cleanings from two to five sharply lowers grinder error risk, then outlines the iterative act-measure-retrain modeling loop.
13:47 – Importing JPMML Models: Export, Upload Storage, Rename & UploadModel Service
Demonstrates exporting a trained model and re-importing a JPMML-format model via Analytics Upload Storage, renaming the file to BeanPro_NN_Imported.xml, and running the UploadModel service on the Analytics Server Results thing to get a reusable job ID.
17:16 – Module Seven Conclusion: Predictive & Prescriptive Scoring Recap
Wraps up Module Seven of the ThingWorx Analytics training, previews the upcoming course modules, and points viewers to a PTC customer success representative to learn more about using ThingWorx Analytics in their organization.

