Outline:
Part 1) Setting up Your Python Environment
Part 2) Modeling Time Series Data
Part 3) Analytics: Forecasting and Predicting
TODO:
- search optimal parameters
- performance evaluation - inputs data set treated consistently
- de-season data and implement statistical models that require seasonality to be removed
Make predictions with heat and temperature data using both classic Statistics and Machine Learning algorithms
Installing Plotly Use Jupyter Notebook ()not sure if it works with Jupyter Lab) https://github.com/plotly/plotly.py#installation shut down kernels and restart jupyter notebook
Troubleshooting Plotly jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10 Trusted Mode
Model | Type | Seasonality | Trend |
---|---|---|---|
Autoregression (AR) | uni | n | n |
Moving Average (MA) | uni | n | n |
Autoregressive Moving Average (ARMA) | uni | n | n |
Autoregressive Integrated Moving Average (ARIMA) | uni | n | y |
Seasonal ARIMA (SARIMA) | uni | y | y |
Seasonal ARIMA with Exogenous Regressors (SARIMAX) | uni | y | y |
Vector Autoregression (VAR) | uni | n | n |
VAR Moving-Average (VARMA) | mulit | n | n |
VARMA with Exogenous Regressors (VARMAX) | mulit | n | n |
Simple Exponential Smoothing (SES) | uni | n | n |
Holt Winter’s Exponential Smoothing (HWES) | uni | y | y |
In many applications, such as Electricity Dataset, you have many similar time series across a set of cross-sectional units. For this type of application, you can benefit from training a single model jointly over all of the time serie - when dataset contains hundreds of related time series, the standard ARIMA and ETS methods may not be the best approach.
Goal: Visualize the data to understand what type of model we should use.
-
Q: Does the plot make sense?
-
Q: Is the data seasonal?
-
Q: Does the data have a trend?
-
Q: Is the Data Additive or Multiplicative
-
Q: Is the data Stationary
-
Q: Does the data contain outliers that can potentially hinder algo performance
-
Q: Is there missing data, can missing data be explained?
How prepare data for time series analysis
- Smoothing Data
-
Predict Temperature and Humidity: a single step in future - by using past observations of single variable (univariate) or past observations of
-
Predict Season: given more than one time series variables (multivariate)
Univariate Regression : Single variable input (temperature or humidity) and forecast a numerical quantity (temperature)
Algorithms Classical Statistics:
- Triple Exponential Smoothing
- SARIMA: Seasonal ARIMA
Machine Learning:
- MLP
- BNN
- Multivariate : Multiples variables used as input
- Classification : predict label (season)
Machine Learning Algorithm
- LSTM
- RNN