﻿1
00:00:00,233 --> 00:00:02,566
Hello and welcome to this art tutorial.

2
00:00:02,566 --> 00:00:06,033
So in the previous tutorial,
we got the exciting result of the total

3
00:00:06,033 --> 00:00:09,033
reward being 2178

4
00:00:09,200 --> 00:00:12,100
and therefore
almost doubling the total reward

5
00:00:12,100 --> 00:00:15,933
we get with the random selection
algorithm, which was around 1002 hundred.

6
00:00:16,200 --> 00:00:18,333
So that was the first exciting result.

7
00:00:18,333 --> 00:00:22,600
And we also got another exciting result,
which was, you know, the best add

8
00:00:22,866 --> 00:00:26,966
to show to the user given
by this add selected vector.

9
00:00:27,300 --> 00:00:32,533
By looking at the last round here
containing only five, that showed us

10
00:00:32,533 --> 00:00:37,033
that the ad with the highest conversion
rate is the version number five of the ad.

11
00:00:37,466 --> 00:00:39,100
So two exciting results.

12
00:00:39,100 --> 00:00:42,200
And now to finish the section even better,
we will have a look

13
00:00:42,200 --> 00:00:45,400
at the histogram to have a quick
look at the overall strategy.

14
00:00:45,566 --> 00:00:48,900
You know, to see the number of times
each ad was selected

15
00:00:49,233 --> 00:00:53,533
and how the selections of ad number five
dominate the selections of the other ads.

16
00:00:53,900 --> 00:00:58,933
So that's going to be very quick and easy
because we simply need to use hist

17
00:00:59,600 --> 00:01:01,433
which is right here enter.

18
00:01:01,433 --> 00:01:05,133
And now as input
we simply need to get the variable

19
00:01:05,133 --> 00:01:08,300
that contains the values
we want to plot on this histogram.

20
00:01:08,433 --> 00:01:11,633
And that's of course the ads selected

21
00:01:12,700 --> 00:01:13,533
vector.

22
00:01:13,533 --> 00:01:17,166
Because you know this vector tells us
which ad was selected at each round.

23
00:01:17,466 --> 00:01:21,000
And so this histogram method
here will look at the number of times

24
00:01:21,000 --> 00:01:24,000
each ad was selected
in this ad selected vector.

25
00:01:24,233 --> 00:01:26,366
And that will plot the histogram.

26
00:01:26,366 --> 00:01:28,466
So basically we're done.

27
00:01:28,466 --> 00:01:31,466
And now just to make it better
we can add a color.

28
00:01:31,633 --> 00:01:34,833
So we type call equals blue in quotes.

29
00:01:35,233 --> 00:01:37,166
If of course we want the blue color.

30
00:01:37,166 --> 00:01:41,266
And then add a title
by adding this main equals.

31
00:01:41,533 --> 00:01:43,566
And then in quotes we add a title.

32
00:01:43,566 --> 00:01:46,566
And so let's say histogram

33
00:01:46,800 --> 00:01:50,066
of well add selections.

34
00:01:50,766 --> 00:01:51,866
Here we go.

35
00:01:51,866 --> 00:01:55,400
And we can also add a label to the x axis.

36
00:01:55,766 --> 00:01:59,400
So same we use in quotes we add here add.

37
00:01:59,933 --> 00:02:00,233
All right.

38
00:02:00,233 --> 00:02:01,100
Because you know

39
00:02:01,100 --> 00:02:05,466
basically what we'll have on the x axis
are going to be the labels of the ads.

40
00:02:05,700 --> 00:02:07,866
So that's why I'm adding here ads.

41
00:02:07,866 --> 00:02:11,700
And of course let's add y label quotes.

42
00:02:12,566 --> 00:02:15,266
And let's say of times

43
00:02:17,033 --> 00:02:20,900
each ad was selected.

44
00:02:21,700 --> 00:02:24,500
Great. And basically we're done.

45
00:02:24,500 --> 00:02:25,866
So now let's have a look.

46
00:02:25,866 --> 00:02:28,166
We will select this code section here

47
00:02:28,166 --> 00:02:31,166
and press Command and Control
Plus enter to execute.

48
00:02:31,433 --> 00:02:32,966
And here is the histogram.

49
00:02:32,966 --> 00:02:36,300
And well we can clearly see
that the ad number

50
00:02:36,300 --> 00:02:39,600
five is the ad
that was most selected by the users.

51
00:02:39,900 --> 00:02:42,300
That is the ad
that has the highest conversion rate.

52
00:02:42,300 --> 00:02:46,266
And therefore no doubt that's the ad
we need to show to our users

53
00:02:46,266 --> 00:02:50,100
for the marketing campaigns of this cheap,
brand new luxury SUV.

54
00:02:50,500 --> 00:02:53,100
So no doubt the fifth ad.

55
00:02:53,100 --> 00:02:54,133
Wonderful.

56
00:02:54,133 --> 00:02:58,300
We completed our job as a machine
learning scientist and so congratulations!

57
00:02:58,600 --> 00:03:01,200
We implemented a great algorithm.

58
00:03:01,200 --> 00:03:05,766
So now what we'll do is implement another
algorithm to see if we can do better.

59
00:03:06,166 --> 00:03:09,600
And this other algorithm will be Thompson
sampling algorithm.

60
00:03:09,900 --> 00:03:13,566
So let's
see if Thompson sampling can beat UCB.

61
00:03:13,800 --> 00:03:16,166
And we'll find out in the next section.

62
00:03:16,166 --> 00:03:17,833
And so then enjoy machine learning.
