Technical requirements
In this chapter, as usual, we will need the NumPy package imported under the np
alias, the Matplotlib pyplot
module imported as plt
, and the Pandas package imported as pd
. We can do this using the following commands:
import numpy as np import matplotlib.pyplot as plt import pandas as pd
We will also need some new packages in this chapter. The statsmodels
package is used for regression and time series analysis, the scikit-learn
package (sklearn
) provides general data science and machine learning tools, and the Prophet package (prophet
) is used for automatically modeling time series data. These packages can be installed using your favorite package manager, such as pip
:
python3.10 -m pip install statsmodels sklearn prophet
The Prophet package can prove difficult to install on some operating systems because of its dependencies. If installing prophet
causes a problem, you might want to try using the Anaconda distribution of Python and its package manager...