1. Home
2. Training Library
3. Big Data
4. Courses
5. Getting Started With Deep Learning: Recurrent Neural Networks

# Time Series Forecasting

1
Introduction
PREVIEW1m 5s
2
Time Series
PREVIEW5m 27s
9
10
12

## The course is part of these learning paths

Start course
Overview
Difficulty
Beginner
Duration
45m
Students
773
Ratings
4.2/5
Description

From the internals of a neural net to solving problems with neural networks to understanding how they work internally, this course expertly covers the essentials needed to succeed in machine learning.

This course moves on from cloud computing power and covers Recurrent Neural Networks. Learn how to use recurrent neural networks to train more complex models.

Understand how models are built to allow us to treat data that comes in sequences. Examples of this could include unstructured text, music, and even movies.

This course is comprised of 9 lectures with 2 accompanying exercises.

### Learning Objective

• Understand how recurrent neural network models are built
• Learn the various applications of recurrent neural networks

### Prerequisites

Transcript

The next thing we're going to do is rescale our data. Now, one thing that is important when you do train, test, split and rescaling is to fit and transform your training data and then transform just your test data. So, this is exactly what we're gonna do and the reason for this is you don't want to assume that you know the scale of your test data, so you transform everything but you only fit, so you learn what the range of data is from your training data. Practically what his means means that in the new scaled variables, we will be between zero and one up to here and the test data will be slightly bigger but that's okay. These are our new scaled data points and then the next thing we do is we define our target variable to be the next point with respect to each point, so we're building a model that given this number will predict this one and then given this number will predict this one and then given this number will predict this one. So, our model learns from the previous value and this is why we take the scaled values for training up to the second to last one and those are our training data and our training labels for our regression, for our forecasting are gonna be the same data but shifted by one. Okay, the first model we're going to build is a fully connected model with one input and one output. We use the mean_squared_error because it's a regression problem and we set an inner layer of 12 nodes. So, this is what our model looks like. We have two layers, the first one has 12 nodes and one input and the second one is the output node and has only one.

Notice that the second layer doesn't have an activation function because this is a regression problem and so, we want this node to be able to output any value. We also set the EarlyStopping callback now that we know about it and we run our training. So, as you can see, the loss is decreasing, so our model is learning from our data but at some point, it stops learning, so 20 epochs is the maximum but we got far and the EarlyStopping callback stopped the training. Since we've split the data into training and testing, we can predict the values for X_test and compare them with the actual value. So, as you can see, our model is not really good. It's essentially repeating the previous value which is actually really bad. As you can see, the two curves are shifted, so our model learn to mirror what the input is and not so well either. The fully connected model is not really able to predict the future from the single previous value. This is why we will need to use recurring neural networks in order to have some better results, so thank you for watching and see you in the next video. 