Showing results for 
Search instead for 
Did you mean: 

Make predictions - deployment

Make predictions - deployment



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, 


Labels (2)
2 Replies

Hi Jean-Eudes, please refer to section 7 in this extensive script for making predictions using a deployed time series model - Hope this helps!

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.