1 00:00:00,000 --> 00:00:02,000 Hello my friends, welcome to this course. 2 00:00:02,000 --> 00:00:02,733 My name is Adil. 3 00:00:02,733 --> 00:00:05,833 On the point of this, I am the second instructor of this course 4 00:00:05,833 --> 00:00:06,800 and it is with me 5 00:00:06,800 --> 00:00:11,000 that you will be coding all the machine learning models of this course from parts 6 00:00:11,000 --> 00:00:12,000 one, two parts in. 7 00:00:12,000 --> 00:00:14,666 And so here that's the beginning of our journey. 8 00:00:14,666 --> 00:00:18,466 It is this page containing all the resources of this course, 9 00:00:18,600 --> 00:00:22,600 including the course slides and references, the Colab notebooks 10 00:00:22,600 --> 00:00:25,600 on which we will be coding our models in Python. 11 00:00:25,800 --> 00:00:28,166 And you also have the whole machine learning. 12 00:00:28,166 --> 00:00:33,133 It is that folder containing all the codes in Python, and are all the data 13 00:00:33,133 --> 00:00:37,500 sets and colorblind friendly images whenever we do some visualization. 14 00:00:37,600 --> 00:00:38,000 All right. 15 00:00:38,000 --> 00:00:41,666 So first thing first, make sure to have downloaded the slides on your machine 16 00:00:41,833 --> 00:00:44,833 as well as the zip folder containing everything. 17 00:00:44,966 --> 00:00:46,133 Now it is downloaded. 18 00:00:46,133 --> 00:00:47,466 And that's the first thing I'm going to do here. 19 00:00:47,466 --> 00:00:49,766 I'm going to introduce this folder very quickly. 20 00:00:49,766 --> 00:00:52,600 So here it is machine learning. It is it codes in data set. 21 00:00:52,600 --> 00:00:56,233 You have the ten parts containing all the codes and data set. 22 00:00:56,233 --> 00:00:58,900 So for example let's go to part three classification 23 00:00:58,900 --> 00:01:01,633 then into the logistic regression model folder. 24 00:01:01,633 --> 00:01:02,500 And then there you go. 25 00:01:02,500 --> 00:01:06,900 You will find the codes in Python and in R and in Python. 26 00:01:07,033 --> 00:01:10,166 Know that you have the two formats ipynb. 27 00:01:10,166 --> 00:01:14,166 If you want to code on Google Colab or Jupyter Notebook, and py 28 00:01:14,233 --> 00:01:17,800 if you want to code on another ID like Spyder in Anaconda. 29 00:01:17,800 --> 00:01:18,133 All right. 30 00:01:18,133 --> 00:01:19,000 And of course in each folder 31 00:01:19,000 --> 00:01:22,000 you have two data sets that we will use to train the model. 32 00:01:22,133 --> 00:01:24,366 Okay. So now let's go back to the page. 33 00:01:24,366 --> 00:01:30,300 And now what I want to do is introduce to you Google Colab, because it is for me 34 00:01:30,300 --> 00:01:34,800 the best interface to start with when coding machine learning models. 35 00:01:34,800 --> 00:01:38,733 And the reason for this is that not only it is super user friendly, you will see, 36 00:01:38,933 --> 00:01:43,166 but also the beauty is that everything is already pre-installed 37 00:01:43,166 --> 00:01:47,866 so we won't have anything to worry about when it comes to installing packages. 38 00:01:47,866 --> 00:01:48,600 I'll show this to you. 39 00:01:48,600 --> 00:01:52,266 In this tutorial, you will see that TensorFlow for Deep learning is already 40 00:01:52,266 --> 00:01:55,900 installed, XGBoost is already installed, Lightgbm is already installed. 41 00:01:55,900 --> 00:01:58,533 All the powerful libraries are used to code. 42 00:01:58,533 --> 00:02:00,866 Machine learning models are already pre-installed, 43 00:02:00,866 --> 00:02:03,633 so we can just import them and directly code. 44 00:02:03,633 --> 00:02:07,466 And that's awesome compared to having to, you know, install packages 45 00:02:07,466 --> 00:02:09,866 or libraries in the terminal. All right. 46 00:02:09,866 --> 00:02:13,000 So this is exactly what you should get when opening 47 00:02:13,000 --> 00:02:14,466 the link of the Colab notebooks. 48 00:02:14,466 --> 00:02:17,566 To show you this, I created a brand new Gmail address, 49 00:02:17,700 --> 00:02:21,100 rent Machine Learning at gmail.com so that we can all start 50 00:02:21,100 --> 00:02:25,166 from the same page, and so that I can show you how to use Google Colab. 51 00:02:25,166 --> 00:02:27,966 And to do so, let's go to part three classification. 52 00:02:27,966 --> 00:02:32,000 I'm going to illustrate this with again let's take the logistic regression model. 53 00:02:32,266 --> 00:02:33,800 So then you go to Python. 54 00:02:33,800 --> 00:02:38,433 And in this folder you will find two files two logistic regression, the Ipynb 55 00:02:38,633 --> 00:02:43,333 notebook of the whole logistic regression model and the data set okay. 56 00:02:43,333 --> 00:02:45,900 So now we're going to open the notebook in Google Colab. 57 00:02:45,900 --> 00:02:48,833 But first before you do this make sure to be connected 58 00:02:48,833 --> 00:02:51,600 to your Google account with your Gmail address. Right. 59 00:02:51,600 --> 00:02:54,700 Otherwise you cannot open the notebook in Collaboratory. 60 00:02:54,933 --> 00:02:57,900 And if you don't have a Gmail dress with a Google account, 61 00:02:57,900 --> 00:02:59,200 then that's totally fine. 62 00:02:59,200 --> 00:03:02,200 That's exactly why we gave you the Pi and Ipy. 63 00:03:02,200 --> 00:03:03,766 We found the whole machine learning. 64 00:03:03,766 --> 00:03:07,133 It is a zipped folder so that you can open them in your favorite ID. 65 00:03:07,633 --> 00:03:09,600 All right. So now let's open the notebook. 66 00:03:09,600 --> 00:03:14,066 It will open the model in Collaboratory or Google Colab. 67 00:03:14,300 --> 00:03:16,200 And now the first very important thing 68 00:03:16,200 --> 00:03:20,100 to understand is that this is a read only notebook. 69 00:03:20,100 --> 00:03:24,300 In other words, you can't modify it, you can't make a modification and save it. 70 00:03:24,300 --> 00:03:25,266 And the reason for this is, 71 00:03:25,266 --> 00:03:28,466 of course, that you all have access to the same Google Drive folder. 72 00:03:28,633 --> 00:03:30,633 So of course no one can make modification. 73 00:03:30,633 --> 00:03:31,600 But no worries. 74 00:03:31,600 --> 00:03:34,800 What we'll do in the course is that we will recode each of the machine 75 00:03:34,800 --> 00:03:37,600 learning models so that you can really learn by doing. 76 00:03:37,600 --> 00:03:41,300 And to do so, what you have to do is create a copy of this notebook. 77 00:03:41,300 --> 00:03:45,566 And so you go to file and then click save a copy and drive. 78 00:03:45,566 --> 00:03:47,666 And as you can see this is creating a copy 79 00:03:47,666 --> 00:03:50,533 in which you will be able to make some modifications. 80 00:03:50,533 --> 00:03:51,100 All right. 81 00:03:51,100 --> 00:03:52,066 So let me show you this. 82 00:03:52,066 --> 00:03:55,933 First we're going to click this little folder here to import this data set. 83 00:03:56,100 --> 00:03:58,966 To do so we then click this upload button here. 84 00:03:58,966 --> 00:04:01,633 Then you're going to find the machine learning in that folder. 85 00:04:01,633 --> 00:04:04,000 And then you're going to go to part three classification. 86 00:04:04,000 --> 00:04:06,433 Then logistic regression Python. 87 00:04:06,433 --> 00:04:09,000 And then you're going to upload the social network 88 00:04:09,000 --> 00:04:12,000 that which is the data set for the logistic regression model. 89 00:04:12,200 --> 00:04:16,133 Then you click open and it will open right here the data set. 90 00:04:16,133 --> 00:04:17,100 There you go. 91 00:04:17,100 --> 00:04:19,300 And then now just for fun let's run this whole code. 92 00:04:19,300 --> 00:04:22,033 So we click run time here and then run. 93 00:04:22,033 --> 00:04:25,533 Oh and as you can see all the cells are now running one by one. 94 00:04:25,866 --> 00:04:30,233 And at the end well we will see you know, all the predictions. 95 00:04:30,233 --> 00:04:31,866 And right now this cell is coding. 96 00:04:31,866 --> 00:04:33,933 It will plot the training set results 97 00:04:33,933 --> 00:04:37,700 of our logistic regression model and the test set results just below. 98 00:04:37,900 --> 00:04:39,166 All right there we go. 99 00:04:39,166 --> 00:04:41,100 So you see that's how Google Colab works. 100 00:04:41,100 --> 00:04:44,666 Now note that this copy of this 101 00:04:44,666 --> 00:04:48,066 logistic regression notebook is created in your drive. 102 00:04:48,066 --> 00:04:51,300 More specifically in this folder Colab notebooks. 103 00:04:51,433 --> 00:04:52,800 If we double click on it, there you go. 104 00:04:52,800 --> 00:04:55,800 You will find the copy that we just created. 105 00:04:56,000 --> 00:04:56,433 Okay. 106 00:04:56,433 --> 00:05:00,233 And now to finish as I promised, I want to show you this 107 00:05:00,233 --> 00:05:03,333 beauty of Google Colab, which is the fact that everything is already pre-installed. 108 00:05:03,333 --> 00:05:08,800 So let's open a new notebook and let's for example, import TensorFlow or XGBoost. 109 00:05:08,933 --> 00:05:12,866 You will see that it is already here and we don't even have to install it. 110 00:05:13,000 --> 00:05:15,900 So there we go import TensorFlow. 111 00:05:15,900 --> 00:05:17,233 That's the first one. 112 00:05:17,233 --> 00:05:18,600 Let's run the cell. 113 00:05:18,600 --> 00:05:21,400 And as you can see the cell was executed successfully. 114 00:05:21,400 --> 00:05:22,333 And let's do the same. 115 00:05:22,333 --> 00:05:25,333 For example with XY boost XGBoost. 116 00:05:25,400 --> 00:05:28,300 Let's play the cell and same. 117 00:05:28,300 --> 00:05:32,100 It will import extra boost without telling us that we need to install it. 118 00:05:32,100 --> 00:05:33,466 Right. There you go. 119 00:05:33,466 --> 00:05:34,833 So that's the beauty of Google Colab. 120 00:05:34,833 --> 00:05:38,300 We will directly be able to code without worrying about anything. 121 00:05:38,433 --> 00:05:41,566 And so I look forward to starting the implementations with you. 122 00:05:41,700 --> 00:05:43,966 And until then, enjoy machine learning.