1
00:00:00,027 --> 00:00:01,896
Welcome to week three.

2
00:00:01,896 --> 00:00:07,454
In this week, you get to apply RNNs and
LCMs to the time sequence data.

3
00:00:07,454 --> 00:00:10,100
Last week you'd applied DNNs to this data.

4
00:00:10,100 --> 00:00:14,200
But time series is temporal data, seems
like you should be applying a sequence

5
00:00:14,200 --> 00:00:16,500
model, like an RNN or an LCM to that.

6
00:00:16,500 --> 00:00:18,356
So that's what you do this week.

7
00:00:18,356 --> 00:00:21,257
>> Yes, so it's,
if you remember in the previous courses,

8
00:00:21,257 --> 00:00:23,163
we did natural language processing.

9
00:00:23,163 --> 00:00:26,167
And we learned a lot about RNNs and
LSTMs there.

10
00:00:26,167 --> 00:00:28,446
And how things like the state vector and

11
00:00:28,446 --> 00:00:32,533
the cell state in these allow you to
maintain context across a series.

12
00:00:32,533 --> 00:00:35,260
And with something like
a time series data,

13
00:00:35,260 --> 00:00:39,827
if you're looking at maybe a 30-day
window, or a 30 period window,

14
00:00:39,827 --> 00:00:44,471
the likelihood in some time series of
data closer to your predictive date,

15
00:00:44,471 --> 00:00:48,700
having a bigger impact on data
further away, it's there, right?

16
00:00:48,700 --> 00:00:50,100
There is a higher likelihood for that.

17
00:00:50,100 --> 00:00:51,841
So being able to use RNNs and

18
00:00:51,841 --> 00:00:57,100
LSTMs might factor that in to our data to
give us a much more accurate prediction.

19
00:00:57,100 --> 00:01:00,020
>> Yeah, that's right,
looking over a much bigger windows and

20
00:01:00,020 --> 00:01:01,700
carrying context from far away.

21
00:01:01,700 --> 00:01:05,722
>> Yeah, yeah, exactly, and you know
my old favorite LSTMs, and the way

22
00:01:05,722 --> 00:01:10,363
they have that cell state, that allows
you, we should call it L state, after me.

23
00:01:10,363 --> 00:01:14,938
[LAUGH] And the way you have that cell
state that allows you to carry context

24
00:01:14,938 --> 00:01:17,047
across a long learning process.

25
00:01:17,047 --> 00:01:21,400
And I think in some time series data,
that would be a really large impact.

26
00:01:21,400 --> 00:01:23,677
So for example, like financial data,

27
00:01:23,677 --> 00:01:28,301
today's closing price has probably got
a bigger impact on tomorrow's closing

28
00:01:28,301 --> 00:01:33,216
price than the closing price from 30 days
ago, or 60 days ago, or 90 days ago.

29
00:01:33,216 --> 00:01:37,283
So being able to use recurrent networks
and LSTMs I think it will help us be able

30
00:01:37,283 --> 00:01:40,178
to be much more accurate in
predicting seasonal data.

31
00:01:40,178 --> 00:01:41,220
>> Yeah, cool, and

32
00:01:41,220 --> 00:01:45,396
one of the fun things that we'll see
this week as well is Lambda layers.

33
00:01:45,396 --> 00:01:47,093
>> Lambda layers, yeah.

34
00:01:47,093 --> 00:01:50,920
So as a coder,
Lambda layers give me comfort.

35
00:01:50,920 --> 00:01:53,418
Because sometimes one of
the hardest things for me,

36
00:01:53,418 --> 00:01:56,880
when I first started doing neural
networks was, I write all this code for

37
00:01:56,880 --> 00:02:00,088
pre-processing and
I write all this code for post-processing.

38
00:02:00,088 --> 00:02:01,909
And then I define a neural network and

39
00:02:01,909 --> 00:02:04,275
it does all this magic
inside a neural network.

40
00:02:04,275 --> 00:02:06,900
But I may not have control
over what's going on in there.

41
00:02:06,900 --> 00:02:08,800
>> It just does whatever it wants to do.

42
00:02:08,800 --> 00:02:11,200
>> Or
whatever it's been designed to do [LAUGH].

43
00:02:11,200 --> 00:02:15,878
And so, but in Tensorflow and with Keras,
Lambda layers allow us to write

44
00:02:15,878 --> 00:02:20,488
effectively an arbitrary piece of code
as a layer in the neural network.

45
00:02:20,488 --> 00:02:22,260
>> So rather than, for example,

46
00:02:22,260 --> 00:02:26,764
scaling your data with an explicit
pre-processing step and then feeding that

47
00:02:26,764 --> 00:02:30,665
data into the neural network,
you can instead have a Lambda layer.

48
00:02:30,665 --> 00:02:33,938
Basically a Lambda function,
an unnamed function, but

49
00:02:33,938 --> 00:02:38,451
implemented as a layer in the neural
network that resend the data, scales it.

50
00:02:38,451 --> 00:02:42,195
And now that pre-processing step is no
longer a separate and distinct step,

51
00:02:42,195 --> 00:02:43,874
it's part of the neural network.

52
00:02:43,874 --> 00:02:45,848
>> So as a programmer that just
gives me a lot more comfort,

53
00:02:45,848 --> 00:02:46,900
having that kind of control.

54
00:02:46,900 --> 00:02:50,000
And it makes it even more fun to be
able to build this kind of stuff.

55
00:02:50,000 --> 00:02:57,301
>> Yeah, so in this week, you get to apply
our RNNs and LCMs to the sequence data.

56
00:02:57,301 --> 00:03:00,848
And, as one of the fun features
of Tensorflow you learn as well,

57
00:03:00,848 --> 00:03:03,161
you also get to implement Lambda layers.

58
00:03:03,161 --> 00:03:04,323
Please go on to the next video.