1 00:00:00,360 --> 00:00:01,250 Welcome back. 2 00:00:01,290 --> 00:00:03,120 It's time to do a fun exercise. 3 00:00:03,330 --> 00:00:08,490 Even though we've barely scratched the surface and we just started the course we're going to build a 4 00:00:08,490 --> 00:00:10,360 YouTube recommendation engine. 5 00:00:10,440 --> 00:00:11,160 But our own. 6 00:00:11,670 --> 00:00:11,930 OK. 7 00:00:11,940 --> 00:00:13,830 So how can we do that. 8 00:00:13,830 --> 00:00:17,580 Well I have here a great Web site a machine learning playground. 9 00:00:17,850 --> 00:00:20,550 And what we have here is a blank box. 10 00:00:20,550 --> 00:00:21,570 I want you to open it up. 11 00:00:21,570 --> 00:00:24,990 I'll link to this resource and try this out yourself as well. 12 00:00:24,990 --> 00:00:32,430 Now let's imagine that on the y axis here it represents the length of the video. 13 00:00:32,430 --> 00:00:36,240 That is the length of the YouTube video now. 14 00:00:36,290 --> 00:00:41,400 In here we have the length and across the x axis. 15 00:00:41,420 --> 00:00:42,800 That is right here. 16 00:00:42,830 --> 00:00:46,470 Let's say that this represents the likes on the video. 17 00:00:46,490 --> 00:00:56,320 So from less likes to more likes from shorter length courses to longer length and we look at our users 18 00:00:56,380 --> 00:01:02,450 data let's say we have a user Bob and Bob likes to watch videos. 19 00:01:02,680 --> 00:01:11,860 And this area and he has clicked like on these types of videos and with the purple. 20 00:01:11,910 --> 00:01:17,560 If I click on purple here he has clicked dislikes on all these videos. 21 00:01:17,850 --> 00:01:19,380 OK let's think about this. 22 00:01:19,620 --> 00:01:30,060 So he has disliked a lot of videos that have lower likes from others and videos that seem to be shorter 23 00:01:30,060 --> 00:01:38,530 and length and he has liked a lot of videos that have really good likes but tend to be longer and length 24 00:01:39,830 --> 00:01:46,520 so if I click train here and we can ignore all these little buttons and the parameters let's just click 25 00:01:46,610 --> 00:01:47,840 train. 26 00:01:48,000 --> 00:01:50,640 This is what a machine learning model does. 27 00:01:50,730 --> 00:01:53,340 It tries to predict based on data. 28 00:01:53,340 --> 00:02:00,210 So we've given it this information of what Bob likes and what Bob dislikes. 29 00:02:00,210 --> 00:02:08,880 And we trained it to figure out the pattern so that when we now recommend a video to Bob we know which 30 00:02:08,880 --> 00:02:12,780 ones we should recommend and which ones we shouldn't. 31 00:02:12,790 --> 00:02:20,200 For example let's say a new video is uploaded to YouTube and this video well right off the bat gets 32 00:02:20,290 --> 00:02:26,560 a lot of likes and it gets a lot of likes and it's super long. 33 00:02:26,710 --> 00:02:28,270 So it's right here. 34 00:02:28,270 --> 00:02:30,460 Should we recommend this video to Bob. 35 00:02:30,460 --> 00:02:31,390 Yes or no. 36 00:02:31,390 --> 00:02:32,460 Well yes right. 37 00:02:32,470 --> 00:02:38,620 Because from past data we've learned that we should recommend any videos that fall into this orange 38 00:02:38,620 --> 00:02:39,940 category. 39 00:02:39,940 --> 00:02:43,100 But let's say there's some new data point. 40 00:02:43,150 --> 00:02:47,680 Let's say Bob starts watching new videos and then we see that. 41 00:02:47,710 --> 00:02:48,110 Oh yeah. 42 00:02:48,130 --> 00:02:49,900 Bob also likes these videos. 43 00:02:49,900 --> 00:02:51,820 This videos these videos. 44 00:02:51,820 --> 00:02:52,480 What happens. 45 00:02:52,480 --> 00:02:54,390 Well let's train our model again. 46 00:02:55,410 --> 00:03:00,450 And this is the new model that we created. 47 00:03:00,480 --> 00:03:07,890 So now are machine learning model is telling us Hey recommend any videos to Bob that fall in this orange 48 00:03:07,890 --> 00:03:09,120 category. 49 00:03:09,120 --> 00:03:11,690 You see it's a little bit more complicated now. 50 00:03:11,880 --> 00:03:20,700 So with each data point we're able to learn about what Bob's preferences are and then train the model 51 00:03:20,880 --> 00:03:29,040 to decide if we should recommend and add the video to Bob's YouTube feed or we should not recommend 52 00:03:29,040 --> 00:03:37,580 it because they're probably not going to watch what we just witnessed here is us building our own recommendation 53 00:03:37,670 --> 00:03:38,470 engine. 54 00:03:38,480 --> 00:03:44,210 Now obviously this is a simplified version but at the end of the day this is exactly what we want to 55 00:03:44,210 --> 00:03:44,870 do. 56 00:03:45,080 --> 00:03:54,170 We give inputs to machines and the machine decides and draws a line to figure out what we should predict 57 00:03:54,230 --> 00:03:55,810 for a future input. 58 00:03:55,820 --> 00:04:00,190 That is a new video comes up should we recommend it to Bob or should we not. 59 00:04:00,560 --> 00:04:07,690 Congratulation you just created your own YouTube recommendation engine kind of. 60 00:04:07,700 --> 00:04:10,820 Now I want to play around with this play around with the parameters. 61 00:04:10,820 --> 00:04:16,020 Let's say we add five here and we train we do decision tree and click train. 62 00:04:16,100 --> 00:04:23,190 Now you don't need to know anything about these just to play around and see what happens and I'll see 63 00:04:23,190 --> 00:04:24,140 you in the next video.