October 2019
Intermediate to advanced
426 pages
10h 8m
English
In this section, the trained model will be deployed, so that we can predict weekly sales for the next nine weeks for a given department.
Let's have a look at the following code :
deepAR_predictor = deepAR.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge')
In the preceding code, the deploy function of the deepAR estimator is used to host the model as an endpoint. The number and type of hosting instances should be specified through the following parameters :
To assess the model performance, we use department number 90, as shown in the following code:
#Predict last 9 weeks of a department and compare to ground truthdeepAR_predictor.content_type = 'application/json' ...
Read now
Unlock full access