Time Series Analysis using the StatsModels library in python

The following recipe shows you how to perform Time Series Analysis using the StatsModels library in Python

Recipe Objective - How to perform Time Series Analysis using the StatsModels library in python?

The statsmodels.TSA contains model classes and functions that are useful for time series analysis. The base models include the univariate autoregressive model (AR), the vector autoregressive model (VAR), and the univariate autoregressive moving average model (ARMA). Non-linear models include dynamic Markov switching regression and autoregressive. It also includes time-series descriptive statistics such as autocorrelation, partial autocorrelation functions, periodograms, and the corresponding theoretical properties of ARMA or related processes. It also includes methods for manipulating autoregressive and moving average lag polynomials. Related statistical tests and some useful utility functions are also available.
Estimation is performed by either accurate or conditional maximum likelihood or conditional least squares, using either a Kalman filter or a direct filter.

Get Access to Time Series Analysis Real World Projects in Python 

For more related projects -

https://www.projectpro.io/projects/data-science-projects/deep-learning-projects
https://www.projectpro.io/projects/data-science-projects/neural-network-projects

Estimation

Below are the most critical inference classes and their result classes that can be accessed via statsmodels.Time Series Analysis api:

Univariate Autoregressive Processes (AR):

The basic autoregressive model in Statsmodels is:

1. ar_model.AutoReg: Autoregressive AR-X(p) model

2. ar_model.AutoRegResults: Class to hold results from fitting an AutoReg model.

3. ar_model.ar_select_order: Autoregressive AR-X(p) model order selection.

Autoregressive Moving-Average Processes (ARMA) and Kalman Filter:

Basic ARIMA model and results classes are as follows:

1. arima.model.ARIMA: Autoregressive Integrated Moving Average (ARIMA) model, and extensions

2. arima.model.ARIMAResults: Class to hold results from fitting a SARIMAX model.

Exponential Smoothing

Linear and non-linear exponential smoothing models are available:

1. ExponentialSmoothing: Holt Winter's Exponential Smoothing

2. SimpleExpSmoothing: Simple Exponential Smoothing

3. Holt: Holt's Exponential Smoothing

4. HoltWintersResults: Results from fitting Exponential Smoothing models.

5. exponential_smoothing.ets.ETSModel: ETS models.

6. exponential_smoothing.ets.ETSResults: Results from an error, trend, seasonal (ETS) exponential smoothing model

Time Series Filters:

1. bkfilter: Filter a time series using the Baxter-King bandpass filter.

2. hpfilter: Hodrick-Prescott filter.

3. cffilter: Christiano Fitzgerald asymmetric, random walk filter.

4. convolution_filter: Linear filtering via convolution.

5. recursive_filter: Autoregressive, or recursive, filtering.

6. miso_lfilter: Filter multiple time series into a single time series.

What Users are saying..

profile image

Anand Kumpatla

Sr Data Scientist @ Doubleslash Software Solutions Pvt Ltd
linkedin profile url

ProjectPro is a unique platform and helps many people in the industry to solve real-life problems with a step-by-step walkthrough of projects. A platform with some fantastic resources to gain... Read More

Relevant Projects

Create Your First Chatbot with RASA NLU Model and Python
Learn the basic aspects of chatbot development and open source conversational AI RASA to create a simple AI powered chatbot on your own.

Build a Churn Prediction Model using Ensemble Learning
Learn how to build ensemble machine learning models like Random Forest, Adaboost, and Gradient Boosting for Customer Churn Prediction using Python

Ola Bike Rides Request Demand Forecast
Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.

PyTorch Project to Build a GAN Model on MNIST Dataset
In this deep learning project, you will learn how to build a GAN Model on MNIST Dataset for generating new images of handwritten digits.

Learn How to Build a Logistic Regression Model in PyTorch
In this Machine Learning Project, you will learn how to build a simple logistic regression model in PyTorch for customer churn prediction.

Recommender System Machine Learning Project for Beginners-2
Recommender System Machine Learning Project for Beginners Part 2- Learn how to build a recommender system for market basket analysis using association rule mining.

Predict Churn for a Telecom company using Logistic Regression
Machine Learning Project in R- Predict the customer churn of telecom sector and find out the key drivers that lead to churn. Learn how the logistic regression model using R can be used to identify the customer churn in telecom dataset.

Locality Sensitive Hashing Python Code for Look-Alike Modelling
In this deep learning project, you will find similar images (lookalikes) using deep learning and locality sensitive hashing to find customers who are most likely to click on an ad.

Time Series Python Project using Greykite and Neural Prophet
In this time series project, you will forecast Walmart sales over time using the powerful, fast, and flexible time series forecasting library Greykite that helps automate time series problems.

ML Model Deployment on AWS for Customer Churn Prediction
MLOps Project-Deploy Machine Learning Model to Production Python on AWS for Customer Churn Prediction