cancel
Showing results for 
Search instead for 
Did you mean: 

Make predictions - deployment

Make predictions - deployment

Hello, 

 

I would like to make predictions using a deployed model.

The model is a time serie model, so input data are : 

 

- Derivative window

- Forecast window (with target column fill with " ")

 

I'm using the Python API and I would like to get the result in a pandas DataFrame.

 

I'm facing a problem. In the Datarobot Python API doc, it seems that there are two functions that allow to make predictions : 

 

- datarobot.models.deployment.predict_batch()

- datarobot.BatchPredictionJob.score_pandas()

 

The problem, as stated in the doc, is that "The output from the prediction will be joined to the passed DataFrame and returned." But with a time serie model, output size is different from input size (since the model make only predictions for the forecast window), and therefore the output dataframe is joined with the derivative window of the input dataframe ... 

 

Is there a solution to get a correct result dataframe ?

 

I have tried to be as clear as possible, but feel free to ask for more information.

 

Thank you, 

Jean-Eudes

Labels (2)
0 Kudos
1 Solution

Accepted Solutions

Hi Jean-Eudes, please refer to section 7 in this extensive script for making predictions using a deployed time series model - https://github.com/datarobot-community/tutorials-for-data-scientists/blob/master/Time%20Series/Deman.... Hope this helps!

View solution in original post

0 Kudos
2 Replies
ngoudreault
DataRobot Employee
DataRobot Employee

DataRobot should be able to handle joining in both of those situations. However, if you want greater control, you can probably output to a CSV, read the CSV into Pandas and handle the dataframe that way.

Hi Jean-Eudes, please refer to section 7 in this extensive script for making predictions using a deployed time series model - https://github.com/datarobot-community/tutorials-for-data-scientists/blob/master/Time%20Series/Deman.... Hope this helps!

0 Kudos