def predict(self,h=5,past_values=20,intervals=True,**kwargs):

		figsize = kwargs.get('figsize',(10,7))
		
		""" Makes forecast with the estimated model

		Parameters
		----------
		h : int (default : 5)
			How many steps ahead would you like to forecast?

		past_values : int (default : 20)
			How many past observations to show on the forecast graph?

		intervals : Boolean
			Would you like to show prediction intervals for the forecast?

		Returns
		----------
		- Plot of the forecast
		- Error bars, forecasted_values, plot_values, plot_index
		"""		

		if len(self.params) == 0:
			raise Exception("No parameters estimated!")
		else:
			# Retrieve data, dates and (transformed) parameters			
			a, P = self.forecast_model(self.params,h)
			date_index = self.shift_dates(h)

			plot_values = a[0][len(a[0])-h-past_values:len(a[0])]
			forecasted_values = a[0][len(a[0])-h:len(a[0])]
			lower = forecasted_values - 1.98*np.power(P[0][0][len(P[0][0])-h:len(P[0][0])],0.5)
			upper = forecasted_values + 1.98*np.power(P[0][0][len(P[0][0])-h:len(P[0][0])],0.5)
			lower = np.append(plot_values[len(plot_values)-h-1],lower)
			upper = np.append(plot_values[len(plot_values)-h-1],upper)

			plot_index = date_index[len(date_index)-h-past_values:len(date_index)]

			plt.figure(figsize=figsize)
			if intervals == True:
				plt.fill_between(date_index[len(date_index)-h-1:len(date_index)], lower, upper, alpha=0.2)			

			plt.plot(plot_index,plot_values)
			plt.title("Forecast for " + self.data_name)
			plt.xlabel("Time")
			plt.ylabel(self.data_name)
			plt.show()

			self.predictions = {'error_bars' : np.array([lower,upper]), 'forecasted_values' : forecasted_values, 'plot_values' : plot_values, 'plot_index': plot_index}
dataset/ETHPy150Open RJT1990/pyflux/pyflux/ssm/llm.py/LLEV.predict/original