Neural network forecasting python

A Quick Deep Learning Recipe: Time Series Forecasting with Keras in Python

In this tutorial, we’ll discuss/compare three different ANNs(DNN, RNN and LTSM) on the same univariate dataset — advertising daily spend of an e-commerce company.

Table of Contents

  1. Introduction
  • Time Series Analysis
  • Why Deep Learning
  • Process of conducting deep learning

3. Comparing Models

4. Closing Summary

1.1 Time Series Analysis

Details explained in my previous post here.

1.2 Why Deep Learning

We’ve known that statistical models work for forecasting time-series. However, there are some limitations for those methods:

  1. Need complete data for training. Some missing values can cause a very bad performing result on your model. Even though there are some ways to handle missing values but it’s very hard to
  2. Usually, deal with univariate dataset and it’s challenging to be applied on multivariate dataset
  3. Sensitive to missing values

Deep learning methods are able to deal with those challenges above:

  1. Not sensitive to missing value
  2. Ease of incorporating exogenous variables (apply on both univariate dataset and multivariate dataset)
  3. Captures non-linear feature interactions
  4. Automatic feature extraction

I’ll briefly explain key components/concept of neural network methods and show how to apply neural networks step by step with Keras in python code. For each model, I will follow the 5 steps to show how to use Keras to build a basic NNets to forecast time-series.

  1. Preprocessing
  2. Define neural network shape and Model Compilation
  3. Fit Model
  4. Evaluation
  5. Visualize prediction
Читайте также:  Javascript popup window scripts

First of all, takes a quick look at the dataset: Advertising daily spend from 1/1/17–9/23/19 includes 996 days. The first five rows of the dataset:

Источник

Оцените статью