1
00:00:11,040 --> 00:00:15,780
So in this lecture, we will be summarizing what we learned in this section, which was all about a

2
00:00:15,780 --> 00:00:22,260
Facebook time series library called Profit, we observe that this library is a lot like the ETS methods

3
00:00:22,260 --> 00:00:26,880
we learned about before and that they both explicitly model trend and seasonality.

4
00:00:27,570 --> 00:00:31,470
But profit has many differences compared to the methods we've studied before.

5
00:00:32,400 --> 00:00:35,340
Firstly, we saw that profit is not auto regressive.

6
00:00:35,610 --> 00:00:37,230
Instead, it's only regressive.

7
00:00:37,230 --> 00:00:38,600
It is time itself.

8
00:00:39,180 --> 00:00:42,750
Because of this, we saw that profit handles missing data with ease.

9
00:00:43,980 --> 00:00:48,180
Furthermore, we saw that profit allows you to explicitly handle holidays.

10
00:00:48,540 --> 00:00:53,910
You can either enter these yourself or you can use profits built in functions for standard holidays

11
00:00:53,910 --> 00:00:54,750
in each country.

12
00:00:55,740 --> 00:00:59,790
We also saw that profit model seasonality at multiple scales at once.

13
00:01:00,000 --> 00:01:06,330
Unlike other methods, it's able to model yearly, weekly and daily seasonal patterns using a four year

14
00:01:06,330 --> 00:01:07,090
series.

15
00:01:08,160 --> 00:01:11,500
Finally, we learned that the profit model is a Bayesian model.

16
00:01:11,910 --> 00:01:17,190
Thus, when you're working with clients, you can help them tune the model by modifying its priors.

17
00:01:18,150 --> 00:01:23,520
Because of these factors, we learn that profit is an excellent choice for business use cases such as

18
00:01:23,520 --> 00:01:26,190
modeling, sales, CPU usage or ads.

19
00:01:26,190 --> 00:01:32,250
But we also learn that it is not very good at predicting stock prices, as some blog articles would

20
00:01:32,250 --> 00:01:33,300
have you believe.

21
00:01:38,060 --> 00:01:41,430
In this section, we learned how easy it is to use.

22
00:01:41,900 --> 00:01:45,440
Let's go over the steps one more time to summarize what we've learned.

23
00:01:46,490 --> 00:01:49,640
So we always start by instantiating a profit object.

24
00:01:50,120 --> 00:01:55,070
At this point, we can choose various options like the growth pattern, the types of seasonality and

25
00:01:55,070 --> 00:01:55,910
the Pryors.

26
00:01:56,900 --> 00:01:58,580
The next step is to fit the model.

27
00:01:59,120 --> 00:02:06,560
As you saw, this requires a specially formatted data frame with the specific columns D and Y, optionally,

28
00:02:06,560 --> 00:02:09,500
you can add more columns as exoticness or grassers.

29
00:02:10,490 --> 00:02:16,040
However, you have to be aware that when you make a forecast, you must have the values of those exoticness

30
00:02:16,040 --> 00:02:18,500
progressors for the forecasting dates.

31
00:02:20,630 --> 00:02:24,470
The next step is to make predictions, which actually involves multiple steps.

32
00:02:25,190 --> 00:02:28,530
We start by creating a placeholder data frame, which we call future.

33
00:02:29,210 --> 00:02:35,060
This contains the dates we want to make predictions for when we call, predict profit, takes these

34
00:02:35,060 --> 00:02:38,160
dates and makes predictions for the given dates.

35
00:02:39,290 --> 00:02:43,820
Once we have our predictions, we can easily plot them with a single call to the plot function.

36
00:02:44,480 --> 00:02:48,590
Those plots, both the sample predictions and the out of sample forecast.

37
00:02:49,580 --> 00:02:53,650
And with just one additional function call, we can plot the change points as well.

38
00:02:55,210 --> 00:03:00,040
The next step is to applaud the individual components of our prediction, which, again, is just a

39
00:03:00,040 --> 00:03:00,830
single call.

40
00:03:01,870 --> 00:03:07,540
So this gives us the trend that seasonal and holiday components and external progressors if you had

41
00:03:07,540 --> 00:03:08,060
them.

42
00:03:08,950 --> 00:03:14,110
We also learned that we can do cross-validation and just a single line of code which works precisely

43
00:03:14,110 --> 00:03:17,110
like the walk forward validation I previously described.

44
00:03:17,680 --> 00:03:22,600
This returns a data frame of predictions from which we can compute performance metrics.
