Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plot with confidence intervals in ARIMA

>>> import statsmodels.api as sm
>>> import matplotlib.pyplot as plt
>>> import pandas as pd
>>>
>>> dta = sm.datasets.sunspots.load_pandas().data[['SUNACTIVITY']]
>>> dta.index = pd.date_range(start='1700', end='2009', freq='A')
>>> res = sm.tsa.ARMA(dta, (3, 0)).fit()
>>> fig, ax = plt.subplots()
>>> ax = dta.loc['1950':].plot(ax=ax)
>>> fig = res.plot_predict('1990', '2012', dynamic=True, ax=ax,
...                        plot_insample=False)
>>> plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: add colorbar to 2d hist 
Python :: logarithmic 2d histogram 
Python :: numpy count occurrences in interval array 
Python :: plt.imshow typeerror invalid dimensions for image data 
Python :: how to map data to a scale python 
Python :: check status of subprocess 
Python :: daraframe get top n max value 
Python :: JET token authentication in Django UTC-1 
Python :: wait_for_message definition 
Python :: i=int(input("enter the number")); sum=0; pro=1; while(i0): d=1%10; if (d%2==0): sum=sum+d; else: pro=pro*d; i=i//10; print("sum=",sum,"product=",pro); 
Python :: Grid-Strategy 
Python :: Random Average 
Python :: drawmolecule rdkit 
Python :: coger elementos de un string python expresiones regulares 
Python :: Python Split list into chunks using lambda Method 
Python :: List Get a Element-2 
Python :: 3x3 gaussian kernel 
Python :: save lines from a file 
Python :: get method to create a set of counters in python 
Python :: python chunks iterator 
Python :: join items in set with newline character 
Python :: dice rolling app in python 
Python :: form is undefined flask 
Python :: cx_freeze include images in specific path 
Python :: df.loc 
Python :: onetoone vs foreign key django 
Python :: Python Print Variable Using the + operator to join variables 
Python :: update cell in sheet by column name using pandas 
Python :: plot every nth label in barplot 
Python :: pandas plot column titles vertical 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =