cancel
Showing results for 
Search instead for 
Did you mean: 

Predictive analytics Forecast service

Former Member
0 Kudos

Hi,

We have created the table with fields Temperature,Pressure and Date. Requirement is to forecast the temperature value. We have inserted 300+ data's for the table and we have successfully registered the data set. With the data set ID we tried to run the forecast service in synchronous mode with date column as :Date" and target column as "temperature". But we are getting the following error

{ "errors": [ { "errorCode": "EXX114", "errorMessage": "An internal error has occurred : The training data set does not contain enough values for the\nextra-predictable variables to cover the number of requested forecasts." } ] }

May I know what is the minimum number of records we need to predict the values or the other possibilities to get the above error.

We are following the blog " https://www.sap.com/developer/tutorials/hcpps-rest-ps-forecast.html "

PFA for the issue.

Accepted Solutions (1)

Accepted Solutions (1)

abdel_dadouche
Active Contributor

Hi @Suriya Chidambaram,

Thanks for raising this question.

As you have noticed, when using the Forecast service, you can provide extra predictable variables, in your case SLNO, PRESSURE and HOUR.

This means that in order to get the next 2 predictions as configured in your service call, you will need to provide the value of these 3 extra predictors.

Let's imagine a dataset like this:

 	SLNO	TEMP	PRES	HOURS	DATE
	1	14	20	1	01-01-2017
	1	13	30	2	02-01-2017
	1	17	80	10	03-01-2017
	1	19	90	20	04-01-2017
	1	25	25	7	05-01-2017
	1	21	56	9	06-01-2017
	1	23	81	19	07-01-2017

Now with this dataset, and the current configuration where the number of forecast is 2, the date column is DATE and the predicted column is TEMPERATURE, you have to use the reference date set to '05-01-2017'.
The reason is because the service needs the extra predictor values for the next 2 forecasts.

In fact, the service will use the following dataset to build the model:

 	SLNO	TEMP	PRES	HOURS	DATE
	1	14	20	1	01-01-2017
	1	13	30	2	02-01-2017
	1	17	80	10	03-01-2017
	1	19	90	20	04-01-2017
	1	25	25	7	05-01-2017
	1		56	9	06-01-2017
	1		81	19	07-01-2017

The alternative is to not use the extra predictors using the skip variables parameters, then you don't need to set the reference date but the results might be degraded.

In other words, if you want to use extra predictors, you will need to use a reference date to tell the service where it should stop looking for training data and start predicting.

You can also submit an "idea" in the Idea Place for Predictive (https://ideas.sap.com/PredictiveAnalytics), where the service would set the reference date accordingly based on the last entry minus the number of requested forecast.

Best Regards

@bdel

Former Member
0 Kudos

Hi @Abdel DADOUCHE

Thanks for your reply 🙂

Here am having two queries.

1. CashFlow : As per my understanding the Forecast service will predict the next values. but following the steps in your tutorial leads to the outcome as Shown in cashflow.png. the concern here is that the data for the forecasted value is already existing in the dataset , which contradicts the the actual meaning of the forecast service, we are expecting the forecast for the dates which are not available in the database. have i missed any steps please guide me. the forecasting for the next dates is giving the error as shown in last-date.png. here i have tried to give the last entry(Date) as the reference date. is there any other method to obtain the next date values? please suggest.

2. Temperature: When i tried to replicate the forecasting service for temperature i ended up with this error. temperror.png.

This is the format of our table tableformat.png

Thanks in advance.

Best regards

Suriya.

abdel_dadouche
Active Contributor

Hi,

As stated in my earlier response, it all dépends on the fact that you are using extra predictors to forecast your value or not.

In my tutorial, the dataset has extra predictors that will be used to forecast a cash flow value.

Therefore I must provide a value for each extra predictor for each cash flow value I'd like to forecast.

This will allow the algorithm to apply an auto regressive approach if this can enhance the quality of the model.

This is also why you must pick a reference date before the end of the dataset where the cash flow is not null. You can pick a date up to the one that has no cash flow value.

If you don't pick a reference date then it will assume that you are using the last one but in the last row the cash flow is missing which is not allowed.

Keep in mind that people use time series algorithm not only to predict but also to validate existing/current data as well.

If you don't use extra predictors, then you are free to set or not a reference date and ask as many forecast as you want.

Hope this clarifies the way the algorithm works.

I will try to add a dataset with two columns only in the tutoto make it clearer.

Regards

@bdel

Former Member
0 Kudos

Dear Abdel,

That was a great explanation for the query. But I still seek some more clarification. Let me explain the scenario for you.

We are trying to build a solution where we would like to predict an eventual failure of some particular devices based on temperature, vibration and RPM. We gathered information from the customer where they gave us regular, warning and danger values of each.

Accordingly we populated the predictive schema from 01/01/18 to 28/02/18, once a day at 12 midnight. Now after dataset registration when we call the forecast API, the result is as follows.

- When the date is in a range say 15/01 or 15/02, we are able to get some values in the table. But the values are what we see in the table. No intelligence applied so far.

- When we are trying to forecast for next 10 days, we get really nothing. We get an exception "Not enough values".

If based on couple of months of data we are not able predict the trend for next week then I feel I am missing something.

Need your guidance.

Regards

Amitabh

Answers (3)

Answers (3)

abdel_dadouche
Active Contributor
0 Kudos

Hi suriya_chidambaram & prashanth_d,

I missed your comments as you didn't mentioned me using the "at sign".

As per the doc, the EXX114 relates to an error that occurred while training a data mining model. <submessage> refers to an error message raised by the predictive model engine.

This means that the predictive service cannot access your data most likely. Did you create the table using the same database user as the one used by the predictive service (in the datasource binding).

Can recreate your table with the database user used by the predictive service datasource binding?


Thanks


Former Member
0 Kudos

Hi Suriya,

Have you got your answer as I have same question & scenario & could not know the answer ? Please reply,

Thank you in advance

Former Member
0 Kudos

Hi @bdel

As per your suggestion we have created the table with only "date" and "temperature" column and without any extra predictors. When we register the dataset and tried to run the forecast service in Postman,we face the error as per the attached screen shot exx114.png.

Please suggest.

Thanks in advance,

Suriya

Former Member
0 Kudos

Hi Suriya,

did you get any solution for the problem? I am also facing the same issue.

abdel_dadouche
Active Contributor
0 Kudos

Hi Suriya,

Can you share the dataset description for datasetID 42? It seems that this error is linked to the dataset description.

Thanks

Abdel

Former Member
0 Kudos

Hi Abdel,

Thanks for your response.

datasetid-42.png ,this is our dataset description. Please suggest solution.

Thanks

Suriya

Former Member
0 Kudos

Hi Suriya,

Have you got your answer as I have same question & scenario & could not know the answer ? Please reply,

Thank you in advance