cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to work with ordinal and categorical data in ThingWorx Analytics ?

Highlighted
Level 12

How to work with ordinal and categorical data in ThingWorx Analytics ?

Datasets with ordinal or categorical goal cannot currently be used in ThingWorx Analytics Builder.

However this is only a UI limitation, ThingWorx Analytics Server can handle those data.

It does simply require to use the services from the AnalyticsServer-Training and AnalyticsServer-Prediction things to perform the operations.

 

This can be done using a mashup or via Rest API call (see https://www.ptc.com/en/support/article?n=CS271485 ) .

The below video expands on the mashup solution.

Attached are also the entities used during the video and a sample dataset with ordinal goal.

 

 

 

 

7 REPLIES

Re: How to work with ordinal and categorical data in ThingWorx Analytics ?

Chris @cmorfin , this doesn't seem to work with 8.3 (getting error from CMOCreateModelLearner service - "Please select at least one learner" on the first step, when creating the model)

Do I miss something, or could you please provide a list of parameters for a REST call?

Re: How to work with ordinal and categorical data in ThingWorx Analytics ?

Hi Dmitry

 

I did test it recently in 8.3 and that was working.

However there were some other issues, so I have attached anew version of entities that corrected some of those problems. It would be best if you reuse this new ones.

 

Regarding the error you get on Learners, the service reads the value from a property named Learner, by default it is empty, so you would get this error.

You need to first set some value in this Learner property to define at least one learner, then you can execute it.

Note that the services also calls some other properties for the training and scoring thing , if I recall correctly, so you need to set those properties with the correct value for your environment.

The properties are on the thing  cmo_Helper

 

Kind regards

Christophe

 

Re: How to work with ordinal and categorical data in ThingWorx Analytics ?

Hi Chris

 

Uhh... Those properties were not mentioned in the video.

Now, after setting them (Learner, PredictionThing and TrainingThing), I'm getting

 

[context: com.thingworx.webservices.context.HttpExecutionContext@2dde78b5][message: Execution error in service script [CMOCreateModelLearner] :: TypeError: Cannot call method "CreateJob" of null (CMOCreateModelLearner#109)] 

 

Do I miss some other properties / should I edit something inside the services?

Re: How to work with ordinal and categorical data in ThingWorx Analytics ?

Hi Dimitry

 

You will get this error if the TrainingThing property is not set in cmo_Helper

 

Kind regards

Christophe

 

Re: How to work with ordinal and categorical data in ThingWorx Analytics ?

Thank you, Chris

 

It works now, there was an extra space before the name of the Training thing.

Re: How to work with ordinal and categorical data in ThingWorx Analytics ?

One more question regarding the categorical data...

Are AnalyticsServer_SignalsThing and ProfilingThing supposed to work with models generated for categorical data?

Re: How to work with ordinal and categorical data in ThingWorx Analytics ?

Hi

 

Ordinal and categorical goal are currently  supported for training and scoring only.

 

Kind regards

Christophe