摘要： Using PMDArima for Time Series Forecasting
Time-series forecasting is one of the important applications for Machine Learning and Deep Learning. There are multiple models which can be used for time series forecasting like Arima, Prophet, Holt-Winters, etc. Multiple Python libraries can be used for loading these models and using them but they are not user-friendly and are difficult to use.
PMDArima is an open-source Python library that is used for time series forecasting and also helps in creating time series plots. It is easy to use and generates time-series forecast on the ARIMA model.
In this article, we will explore PMDArima and generate a time-series forecast using it.
Let’s get started…
Installing required libraries
We will start by installing a PMDArima library by using pip. For downloading the data we will use the yfinance library. The command given below will do that.
Importing required libraries
In this step, we will import the required libraries for loading a dataset and creating the ARIMA model.
For downloading the dataset we will use Yahoo finance. You can follow the code given below for downloading the data for the particular ticker and can also follow the article to understand yfinance and its functionalities.
Data Preprocessing & Modelling
Next, we will preprocess the data by splitting it into test and train. Also, we will define the function for forecasting.
Visualizing Actual Vs Predicted Values
In this step, we will visualize the actual vs. predicted values given by the model. Similarly, we will also plot the confidence intervals with the predicted values.
Here we can clearly visualize the predicted and actual values and use them for analysis. Go ahead try this with different datasets and perform forecasting and visualizations using PMDArima. In case you find any difficulty please let me know in the response section.
This article is in collaboration with Piyush Ingale .
若喜歡本文，請關注我們的臉書 Please Like our Facebook Page： Big Data In Finance