Jump to content

Datetime error


Marlina

Recommended Posts

Hi all,
 I'm currently working on Holt's Winter modeling and encountering this error. I need your advice on how to solve this.

Error in eval(script, envir = .GlobalEnv) : Please include a time column of date/datetime type from the training dataset.
eval(script, envir = .GlobalEnv)
eval(script, envir = .GlobalEnv)
withCallingHandlers({
stop("Please include a time column of date/datetime type from the training dataset.")

Link to comment
Share on other sites

Hi Gaia,

If u read the error, it refers to the data in training dataset, not in timecolumn. Training dataset i already choose date datatype.

image.png.b30807bac6b3a08d3b77880b84e3baea.png\

 

 

When I read through read me pdf from spotfire, 

 

It mention that the time_column data type allowed is string as i marked in yellow

image.thumb.png.79219de0c896e35e88572be308b10482.png

Link to comment
Share on other sites

time_column is the name of the column, not the column itself. You see is not a column but a value.
There is no training video for the new version of Holt Winters. There is an example Spotfire dxp that is downloaded with the data function:

 

Link to comment
Share on other sites

  • 2 weeks later...

Your data is not ready to be used in the Holt Winters application:
1) there are multiple values of cpk  per date. Your cpk column has up to 1340 values for the same date. Is this right or do you need to slice by some other column? The supplied pre-processing data function can aggregate multiple values, as long as you think this is correct. Note that the Holt Winters application provided does not do forecast by group.
2) the data is not a regular time series. There are gaps, sometimes very big in the data. You can close some gaps by aggregating via the pre-processing data function.
I have tested it with the pre-processing and after aggregation the data appears weekly and has only 77 values.

However, I am seeing an issue with the TERR engine (I am on Spotfire 14.4). If you are on an earlier Spotfire version can you do the following test?
Upload your dataset as the Training dataset into the provided example Spotfire dxp. Use the pre-processing data function before the Holt Winters one. Set the Test data to None.

 

 

Link to comment
Share on other sites

I tried on Spotfire 14.3 and it works. However, your data does not have any seasonal trend, so I suspect Holt Winters is not the appropriate method:
setting the tolerance very high during pre-processing, I get a lot of interpolated data on a daily basis.
applying Holt Winters gets me a forecast but only it I set the frequency manually, and I do not see any frequency in the data
image.thumb.png.1753dfa76161bfcb4e3e0ee3d3671ffb.png

Link to comment
Share on other sites

Hi Gaia, thank u so much for your advise. Yes, my data has no seasonality and i also plan to set gamma as 0 to remove the seasonality. My study on Holt Winter article which mention about pre-processing data function only available for spotfire 12.5. As I'm using the below version Spotfire, pls advise how can i pre-process my data.

 

image.png.94ba4a71f0509c86fce2b3938803ea58.png

Link to comment
Share on other sites

Hi Gaia,

Regarding your question on why multiple CPK per date.

The data submitted by different suppliers, by different program, and 1 program could have multiple critical parameters. Each critical parameter will have its own CPK (supplier will measure the dimension). That is why it seems to have multiple CPK per date but it from different supplier, program and critical parameter.

Link to comment
Share on other sites

Your version should be ok. Please download the example dxp that comes with the Holt Winters data functions in the Community. You will find that there is already a pre-processing data function.
The only thing you need to make sure of is to set the Test data input parameter to None in both the pre-processing and the Holt Winters data functions.

In terms of data, it is your business case that will dictate how you aggregate it. I don't know the meaning of the different columns, I can only advise to look into it. It seems that at any given date, the number of cpk values varies from 1 to 1300, so not all the suppliers, programs and critical parameters are represented in all dates. 

 image.thumb.png.ac5c51d0ce2cf7193bfc2ec423dcbc05.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...