#NEWLINE# def summarize_simulations( self , mean_values , sim_vector , date_index , h , past_values ) : #NEWLINE# #INDENT# ' Summarizes a simulation vector and a mean vector of predictions\n\n\t\tParameters\n\t\t----------\n\t\tmean_values : np.ndarray\n\t\t\tMean predictions for h-step ahead forecasts\n\n\t\tsim_vector : np.ndarray\n\t\t\tN simulation predictions for h-step ahead forecasts\n\n\t\tdate_index : pd.DateIndex or np.ndarray\n\t\t\tDates for the simulations\n\n\t\th : int\n\t\t\tHow many steps ahead are forecast\n\n\t\tpast_values : int\n\t\t\tHow many past observations to include in the forecast plot\n\n\t\tintervals : Boolean\n\t\t\tWould you like to show prediction intervals for the forecast?\n\t\t' #NEWLINE# error_bars = [ ] #NEWLINE# for pre in range ( 5 , 100 , 5 ) : #NEWLINE# #INDENT# error_bars . append ( np . insert ( ( [ np . percentile ( i , pre ) for i in sim_vector ] - mean_values [ ( len ( mean_values ) - h ) : len ( mean_values ) ] ) , 0 , 0 ) ) #NEWLINE# #UNINDENT# forecasted_values = mean_values [ ( ( len ( mean_values ) - h ) - 1 ) : len ( mean_values ) ] #NEWLINE# plot_values = mean_values [ ( ( len ( mean_values ) - h ) - past_values ) : len ( i ) ] #NEWLINE# plot_index = date_index [ ( ( len ( date_index ) - h ) - past_values ) : len ( date_index ) ] #NEWLINE# return ( error_bars , forecasted_values , plot_values , plot_index )