U vb@s8ddlmZmZddlZddlmZddZddZ dS))displayHTMLNc Cs>|d}|d}|D]}ttd|d|D]}||d|k|d|k@}tj|d}||d|k}tjdd} t} | d|d |d | j tj|d|d d d dd| j ||d|dddd| j ||dd dd| j ||dd dd| d| d| tq:qdS)Nmodel customer_type



timestampfigsize Forecast z demand ()demand-blackActualfmtcolorlabelp10p90333333?z80% Confidence Intervalalpharp50zPrediction MedianrrmeanzPrediction MeanDateRides Taken (Demand))uniquerrmpldatesdate2numpltfiguregca set_title plot_date fill_between set_xlabel set_ylabellegendshow) actuals predictionsmodelscustomer_typesrr predictionprediction_tsnumsactualfigaxr9H/home/ec2-user/SageMaker/time-series-forecasting-on-aws/util/plotting.pyplot_fcst_resultss^         r;c CsH|d}|d}|D]$}ttd|d||d|k}tjdd}t}|d||jtj |d|d d d d d |D]}||d|k|d|k@} tj | d} |j | | d| ddd|d|j| | dd d|d|j| | dd d|dq| d| d|tqdS)Nrrrrr r rrrrrrrrrrz80% Confidence Interval for rrzPrediction Median for rrzPrediction Mean for r r!)r"rrr&r'r(r)r*r#r$r%r+r,r-r.r/) r0r1r2r3rr6r7r8rr4r5r9r9r:plot_fcst_merge_results@s^         r<) IPython.core.displayrr matplotlibr#matplotlib.pyplotpyplotr&r;r<r9r9r9r:s :