Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi,
I am currently developing a project for a client where I need to apply Thingworx Analytics.
I need to predict the number of people in a room every hour for the next 7 days.
To create the model I am gathering the following data:
I exclude the timestamp because it has no relevance to the model.
The room has a sensor which sends the # of people every hour.
To make the process automatic I created a thing which receives the data onto an infotable. Now I will make a service which uses CreateJob() from "analytics_TrainingThing". There is no parameter to exclude fields from data on the service as there are on the Analytics Builder mashup. I have noticed that the thing "TW_ML_Toolkit_Helper" has a service "CreateModelAMS" which has the desired fields.
My question are:
Thank you!
Hi
Here are some answers that I hope will help you:
- You should not use the TW_ML_Toolkit_Helper. If you need to define exclusion those can be define inside the DatasetRef infotable. This infotable has got a nested one named exclusions.
- you can refer the datset in different way, posisbly the easiest is to upload it first to Analytics Server and then set the rui (of type dataset://<datasetid>) in the datasetUri field
- once the model is created you can score new fields using RealtimeScore service indeed. You will need to specify the new rows to score in the datasetRef info table of RealtimeScore
You might find the following post of interest as they show some example of how this can be done:
- simple using OOTB service: https://community.ptc.com/t5/IoT-Tech-Tips/How-to-work-with-ordinal-and-categorical-data-in-ThingWorx/m-p/542406
- a bit more complex/advanced: https://community.ptc.com/t5/IoT-Tech-Tips/Example-ThingWorx-Analytics-8-1-Mashup/m-p/535029
Hope this helps
Christophe