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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Timeseries in dataset

drichter
15-Moonstone

Timeseries in dataset

Hi,

 

I'm experimenting with some data for analytics. My data (data.json, data.csv) are always no-timeseries. What I have todo (in json and csv file) have timeseries data?

 

Or have someone example data which is timeseries?

ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:drichter)

Hi

 

I am assuming you are using ThingWorx Analytics 8.1 or over.

For a dataset to be seen as a time series one you need to have in the csv

- one column that represents the asset id (for example pump1, pump2 ...)

- one column representing the time interval.

 

in the json file you need to set

- opType: ENTITY_ID for the field that define the column representing the asset id in csv

- opType: TEMPORAL for the field representing the column for the time interval in csv. 

you also indicate the attribute timeSamplingInterval for this TEMPORAL field which indicate the time in milliseconds at which the data should come in

The Transition Guide has got some information about this  around page 28 -29

 

For example

 

Device  --  timing  --- sensor1  --- sensor 2

Pump1 --   1             ---  12               ---   84

Pump2 --- 1             ---- 7                 ---- 56

Pump1 --   2            ---- 18              ---- 110

Pump2---  2           ---- 25               ---   64

Pump1 --- 3         ----- 5                 ---- 58

Pump2 ---3         ------ 30             ---- 80

 

in the json you would have

 

{
"fieldName": "Device",
"dataType": "STRING",
"opType": "ENTITY_ID",
},
{
"fieldName": "timing",
"dataType": "DOUBLE",
"opType": "TEMPORAL",
"timeSamplingInterval": 1,
},

 

Hope this helps

Kind regards

Christophe

View solution in original post

6 REPLIES 6
PaiChung
22-Sapphire I
(To:drichter)

Can you describe a little better

1. How you are gathering the data

2. When you say Analysis, how do you intend to use it

3. Why does that Analysis require timeseries

drichter
15-Moonstone
(To:PaiChung)

The gathering process is for my example irrelevant. I only need the look of the *.json and the *.csv, so I can create data by hand or via excel or something else.

 

At the moment a create prediction models with non-timeseries data but for a real project I will predict something like "xx days to failure" so I will test the prediction stuff with timeseries data.

cmorfin
19-Tanzanite
(To:drichter)

Hi

 

I am assuming you are using ThingWorx Analytics 8.1 or over.

For a dataset to be seen as a time series one you need to have in the csv

- one column that represents the asset id (for example pump1, pump2 ...)

- one column representing the time interval.

 

in the json file you need to set

- opType: ENTITY_ID for the field that define the column representing the asset id in csv

- opType: TEMPORAL for the field representing the column for the time interval in csv. 

you also indicate the attribute timeSamplingInterval for this TEMPORAL field which indicate the time in milliseconds at which the data should come in

The Transition Guide has got some information about this  around page 28 -29

 

For example

 

Device  --  timing  --- sensor1  --- sensor 2

Pump1 --   1             ---  12               ---   84

Pump2 --- 1             ---- 7                 ---- 56

Pump1 --   2            ---- 18              ---- 110

Pump2---  2           ---- 25               ---   64

Pump1 --- 3         ----- 5                 ---- 58

Pump2 ---3         ------ 30             ---- 80

 

in the json you would have

 

{
"fieldName": "Device",
"dataType": "STRING",
"opType": "ENTITY_ID",
},
{
"fieldName": "timing",
"dataType": "DOUBLE",
"opType": "TEMPORAL",
"timeSamplingInterval": 1,
},

 

Hope this helps

Kind regards

Christophe

cmorfin
19-Tanzanite
(To:cmorfin)

Hi

 

I have just made some update to the article https://www.ptc.com/en/support/article?n=CS258345 and added a sample dataset for time series  that works with release 8.2

 

Hope that helps

Kind regards

Christophe

 

skef
12-Amethyst
(To:cmorfin)

I am using the Version 8.2, the analysis of time series based models always fails with

 

The dataset must contain entity ID and temporal fields in order to perform TimeSeries training. Please set the timeSeries post body field to null to perform standard training or supply a TimeSeries appropriate dataset.

 

Even, if I import your pump example. ENTIT_ID and TEMPORAL are always provided, but analysis fails with the error above.

 

cmorfin
19-Tanzanite
(To:skef)

Hi skef

 

This post was about the syntax in for a time series model. What you are mentionning is a different issue.

From what I can grasp is an error while usign ThignPredictor.

 

You could use the scoring in Analytics Builder directly and you would not have this error.

 

For ThingPredictor look at this post: https://community.ptc.com/t5/ThingWorx-Developers/Analytics-Prediction-with-time-series-data/m-p/538717/highlight/false#M26541 .

 

Kind rgeards

Christophe

 

Announcements


Top Tags