1 00:00:00,080 --> 00:00:05,580 Welcome back to the class of our course about the complete introduction to The Science Show in this 2 00:00:05,580 --> 00:00:13,230 class, we are going to talk about another algorithm that is really present inside of machine learning. 3 00:00:13,650 --> 00:00:16,770 And in this case, it would be logistic regression. 4 00:00:17,550 --> 00:00:23,640 So basically what we do today is we are going to work with another tool that is pretty important in 5 00:00:23,640 --> 00:00:25,890 machine learning that is called Eskild. 6 00:00:26,430 --> 00:00:33,810 Basically, Skillern is a machine learning library that will offer you various machine learning tools 7 00:00:33,810 --> 00:00:35,460 that you guys will be able to work with. 8 00:00:35,490 --> 00:00:38,130 So basically, you will have access to all the algorithms. 9 00:00:38,360 --> 00:00:41,010 So logistic regression will be in it. 10 00:00:41,580 --> 00:00:47,730 You will have all the other algorithms that we talked about a little bit before in the class in a more 11 00:00:47,730 --> 00:00:48,930 theoretical way. 12 00:00:50,220 --> 00:00:50,600 All right. 13 00:00:50,610 --> 00:00:54,750 So basically, the first thing that you guys will need to do is import. 14 00:00:54,750 --> 00:00:59,160 What import is killoran inside of your by expeditor? 15 00:00:59,610 --> 00:01:05,190 So that's always simply go on your file right here instead of your settings project and the operator, 16 00:01:05,610 --> 00:01:11,420 click on the plus button right here and simply write down ASCII learn. 17 00:01:13,320 --> 00:01:18,600 So when it's done, it should be this one right here, simply click on install package and you guys 18 00:01:18,600 --> 00:01:20,500 should be able to have it. 19 00:01:20,510 --> 00:01:23,090 So as you can see, I'm having it right here. 20 00:01:24,130 --> 00:01:24,350 Right. 21 00:01:24,390 --> 00:01:29,880 So when it's all done, the next thing that we want to do is really jump into it to jump into what we 22 00:01:29,880 --> 00:01:30,570 are going to create. 23 00:01:30,960 --> 00:01:37,080 So for the purpose of this class, what I decided to do to make it the most simple possible is to work 24 00:01:37,080 --> 00:01:42,560 with confusion, metrics, basically confusion, metrics that will give us well, we'll explain this 25 00:01:42,570 --> 00:01:50,880 more easily our model, and will allow us to know how well how our model is good in terms of predicting 26 00:01:50,880 --> 00:01:51,300 something. 27 00:01:51,510 --> 00:01:56,460 So basically, what I decided to do is create a really basic example. 28 00:01:57,150 --> 00:01:58,250 What I'm talking about example. 29 00:01:58,270 --> 00:02:03,540 What I mean here is let's say someone is looking for a job and this person have what? 30 00:02:03,540 --> 00:02:06,090 It's Emmonak management position job. 31 00:02:06,090 --> 00:02:08,640 And this person needs to have experience in three fields. 32 00:02:09,000 --> 00:02:13,710 And basically, depending on the experience of the person in those three fields, this person will get 33 00:02:13,710 --> 00:02:15,740 a job or not get a job. 34 00:02:15,750 --> 00:02:22,050 And basically, we want to predict the fact that this person will well, the accuracy of our system 35 00:02:22,050 --> 00:02:28,680 to predict if this person will get a job or not get a certain job depending of its experience. 36 00:02:29,640 --> 00:02:36,660 So what I'm planning to do is with pendas, create areas where we are going to store everything well, 37 00:02:36,750 --> 00:02:41,280 basically databases where we are going to create our own data. 38 00:02:41,470 --> 00:02:44,250 So basically you will create your own database in this case. 39 00:02:44,280 --> 00:02:49,980 So what I suggest you do is really use twenty five elements inside of your database. 40 00:02:50,400 --> 00:02:57,810 And from this moment, from this moment, we will create our little program that will be able to predict 41 00:02:57,810 --> 00:03:02,370 if yes or no, our model works fine or well, if it's accurate or not. 42 00:03:03,030 --> 00:03:03,840 So let's start. 43 00:03:04,320 --> 00:03:07,350 So basically the first thing that we need to do is pretty simple. 44 00:03:08,100 --> 00:03:14,950 We need to import the everything that we will need for our well, for our class. 45 00:03:15,540 --> 00:03:16,380 So pretty simple. 46 00:03:16,380 --> 00:03:18,360 We are going to start with Seabourne. 47 00:03:18,360 --> 00:03:24,220 So we'll import Seabourne, as I said. 48 00:03:25,230 --> 00:03:29,370 You also need matplotlib to be able to work with grafs. 49 00:03:30,600 --> 00:03:33,500 Well, live from that five block, 50 00:03:36,510 --> 00:03:39,170 then we'll need also would be Fender's. 51 00:03:44,430 --> 00:03:48,780 We also would need some things from Escalon. 52 00:03:48,960 --> 00:03:56,130 So basically we will import them from as she learned that model. 53 00:04:02,730 --> 00:04:05,790 We want to import train. 54 00:04:07,420 --> 00:04:16,750 This split and we also need logistic regression, since we are going to perform a logistic regression 55 00:04:16,750 --> 00:04:23,940 and show the results inside of a confusion matrix, so we are going to read it down right here. 56 00:04:40,120 --> 00:04:40,610 Here we go. 57 00:04:41,110 --> 00:04:45,560 And finally, the last thing that we will need just correct. 58 00:04:45,600 --> 00:04:48,150 To be sure, it's written correctly. 59 00:04:51,030 --> 00:04:58,170 Look, just the progression, here we go and finally, we'll need metrics so from. 60 00:04:59,910 --> 00:05:01,580 Escape, learn 61 00:05:04,750 --> 00:05:07,770 would need to import metrics. 62 00:05:09,510 --> 00:05:16,560 All right, so right now we have all the elements that we need to be able to create our well, basically 63 00:05:16,560 --> 00:05:18,090 our database. 64 00:05:18,600 --> 00:05:20,720 And so for the database, it's pretty simple. 65 00:05:20,730 --> 00:05:26,430 What I did is, as I said, I created twenty five elements or the elements are already pre created, 66 00:05:26,610 --> 00:05:27,780 so just show them to you. 67 00:05:28,530 --> 00:05:29,860 So basically it's pretty simple. 68 00:05:29,880 --> 00:05:35,680 I have my candidate right here or the person let's call it the person I prefer person. 69 00:05:37,740 --> 00:05:42,870 So basically the person will have experience in finances, management, logistics. 70 00:05:43,110 --> 00:05:46,500 And finally, do the person get work, yes or no? 71 00:05:47,220 --> 00:05:48,190 So it's pretty simple. 72 00:05:48,210 --> 00:05:54,660 Once again, we have our person, number one, and that what we have here is how many years of experience 73 00:05:54,660 --> 00:05:55,850 this person has. 74 00:05:55,860 --> 00:06:01,800 So they said that it could be one year or two years, five years, anything that you want. 75 00:06:02,250 --> 00:06:02,610 All right. 76 00:06:02,620 --> 00:06:07,410 So the first thing that you guys are going to do is create a simple database that looks something like 77 00:06:07,410 --> 00:06:07,680 this. 78 00:06:08,460 --> 00:06:15,480 And then what we'll do is we will simply put all this together and create a data frame where we are 79 00:06:15,480 --> 00:06:17,050 going to store everything. 80 00:06:17,820 --> 00:06:23,910 So when you guys are done, what will do will create is that a frame that we will call data? 81 00:06:27,420 --> 00:06:32,010 And inside of this data, we are going to with the help of vendors. 82 00:06:32,040 --> 00:06:34,110 So basically we are going to refer to pendas. 83 00:06:36,360 --> 00:06:41,490 We're going to create a data frame that will store person. 84 00:06:43,400 --> 00:06:49,790 So basically, all the elements inside of person and basically in our columns, we want to have finance, 85 00:06:49,790 --> 00:06:51,230 management and logistics. 86 00:06:55,030 --> 00:06:55,970 So here we go. 87 00:06:56,380 --> 00:06:59,830 So instead of our columns, we want to have finance 88 00:07:07,570 --> 00:07:10,030 management and. 89 00:07:13,590 --> 00:07:14,070 Here 90 00:07:17,370 --> 00:07:19,260 and finally, logistics. 91 00:07:27,370 --> 00:07:30,820 And what we need also is our get work. 92 00:07:36,230 --> 00:07:37,080 Here we go. 93 00:07:39,950 --> 00:07:42,140 Good work. 94 00:07:43,130 --> 00:07:49,280 All right, so right now we have everything that we need, the next thing we want to do is verify if 95 00:07:49,280 --> 00:07:50,270 everything works fine. 96 00:07:50,270 --> 00:07:52,910 So we'll simply print our little data. 97 00:07:53,060 --> 00:07:58,430 So we print our variable data just to be sure that everything works fine. 98 00:08:02,780 --> 00:08:07,170 All right, so as you can see, it's generating perfectly right here, everything works fine. 99 00:08:07,460 --> 00:08:08,980 So let me just explain the data to you. 100 00:08:09,000 --> 00:08:13,340 As I said here, we have our years of experience for the three, first of them. 101 00:08:13,340 --> 00:08:16,250 So finance, management and logistics and years of experience. 102 00:08:16,730 --> 00:08:21,200 And the next thing that we want to have, it would be zeros or ones. 103 00:08:21,440 --> 00:08:23,770 So basically, one means the person gets the job. 104 00:08:23,780 --> 00:08:26,430 Zero means the person doesn't get the job. 105 00:08:26,810 --> 00:08:28,730 So it's pretty simple to understand. 106 00:08:29,750 --> 00:08:30,100 All right. 107 00:08:31,160 --> 00:08:36,140 So right now that we have everything that works here, it's time to get to the next step, which could 108 00:08:36,140 --> 00:08:39,120 be creating our logistic regression in Python. 109 00:08:40,070 --> 00:08:44,750 So for our logistic regression, what we'll need is a pretty simple we'll need two variables that will 110 00:08:44,750 --> 00:08:45,790 be X and Y. 111 00:08:45,800 --> 00:08:48,440 So basically they will be inside of our graph. 112 00:08:49,040 --> 00:08:55,910 So for our variable X, what we will have is pretty simple, will have the elements, finance, management 113 00:08:55,910 --> 00:08:57,750 and logistic as well. 114 00:08:58,370 --> 00:09:01,870 So what we'll do right now, we'll simply make a reference to person. 115 00:09:02,450 --> 00:09:13,130 So write down a variable person and from person we want to use, in this case, finance. 116 00:09:19,810 --> 00:09:20,570 Management 117 00:09:24,490 --> 00:09:27,430 and finally, logistics. 118 00:09:32,190 --> 00:09:38,510 The second variable that will have to be the variable, why and this let's put it in small letters and 119 00:09:38,520 --> 00:09:40,590 this variable will get worse. 120 00:09:40,660 --> 00:09:42,270 Basically, once again from person. 121 00:09:44,210 --> 00:09:51,080 We want to have get rid of the person, gets work for no right. 122 00:09:51,140 --> 00:09:53,410 So right now we have our model. 123 00:09:53,840 --> 00:10:01,110 The next thing would be creating our test, using the test split function to be able to test everything. 124 00:10:01,130 --> 00:10:06,830 So basically, we are going to decide that what percentage of the database will be used for testing 125 00:10:07,280 --> 00:10:10,400 and which one will be used for training. 126 00:10:11,660 --> 00:10:12,500 So pretty simple. 127 00:10:12,510 --> 00:10:13,760 How exactly do we write this? 128 00:10:14,690 --> 00:10:16,370 Simply write down X. 129 00:10:16,880 --> 00:10:18,100 So put it right here. 130 00:10:20,170 --> 00:10:26,020 X train X this. 131 00:10:28,920 --> 00:10:34,320 Then why train and why this? 132 00:10:37,480 --> 00:10:48,730 All of this would be equal to train this split is what I'm writing right now, is what? 133 00:10:49,000 --> 00:10:56,320 Well, how much I want for my data, how much I want of my data set to be used to test and what percentage 134 00:10:56,320 --> 00:10:59,890 of my data set I want to be to be used for training purposes. 135 00:11:00,610 --> 00:11:03,490 So basically, I'll finish writing and I'll explain everything. 136 00:11:04,210 --> 00:11:08,800 I love X Y, so we'll have our test sites. 137 00:11:08,800 --> 00:11:13,260 So in our case, we want a test site of, let's say, 30 percent. 138 00:11:13,630 --> 00:11:16,420 So this means that zero the three. 139 00:11:16,840 --> 00:11:20,950 So this means that we want what we want to use. 140 00:11:20,980 --> 00:11:28,060 Thirty percent of our data set for testing purposes and the other 70 percent will be used for, well, 141 00:11:28,060 --> 00:11:28,810 training purpose. 142 00:11:30,550 --> 00:11:36,970 And the second one will be random state and this will be equal to zero. 143 00:11:39,050 --> 00:11:44,950 All right, so when it's done so right now, we with this line of code right here, we are able to say 144 00:11:45,180 --> 00:11:46,550 what will be the test split? 145 00:11:46,550 --> 00:11:52,710 So how much would be used for testing purpose and how much would be used for training purposes? 146 00:11:52,710 --> 00:11:58,070 So we have everything that we need right there, right when it's all done. 147 00:11:58,070 --> 00:12:03,310 The next thing is pretty simple is writing our logistic regression model. 148 00:12:03,320 --> 00:12:04,190 So it's pretty simple. 149 00:12:04,190 --> 00:12:05,990 We'll do it down there. 150 00:12:08,530 --> 00:12:11,780 So it's going to be logistic regression. 151 00:12:13,520 --> 00:12:20,000 So in our case, let's call it yeah, let's call it logistic Craig, which would be pretty simple and 152 00:12:20,000 --> 00:12:20,440 logistic. 153 00:12:20,440 --> 00:12:27,650 Craig would be equal to logistic regression since we are applying logistic regression to it. 154 00:12:29,390 --> 00:12:33,810 So this would be available in which we are going to store the functional logistic regression. 155 00:12:36,330 --> 00:12:37,070 All right. 156 00:12:37,220 --> 00:12:39,470 Then the next thing is pretty simple. 157 00:12:39,650 --> 00:12:41,820 We'll call it let's call it L.G., L.R.. 158 00:12:42,440 --> 00:12:45,640 It's going to be smaller and more easier to work with. 159 00:12:47,090 --> 00:12:51,800 So we'll have to r, which would be equal to logistic regression, will not have to write down each 160 00:12:51,800 --> 00:12:52,990 time logistic regression. 161 00:12:54,170 --> 00:13:00,410 So we'll have are that fit since we're fitting right now our training of X and Y. 162 00:13:03,660 --> 00:13:08,950 So X thing as well as Y train. 163 00:13:11,610 --> 00:13:14,190 The banks and capital letters. 164 00:13:16,530 --> 00:13:19,050 All right, so right now we have everything that we need. 165 00:13:23,030 --> 00:13:24,950 Real important, not making mistakes. 166 00:13:26,840 --> 00:13:33,090 Right, next thing that we need is we want to predict our well, our question right here. 167 00:13:33,620 --> 00:13:34,310 So why? 168 00:13:37,080 --> 00:13:38,940 And in this case, we'll call it prediction. 169 00:13:42,070 --> 00:13:43,600 We'll be equal to. 170 00:13:45,980 --> 00:13:49,130 In our case, logistic. 171 00:13:55,870 --> 00:14:04,850 That got to so equal to or not that and what I do want to predict the test of X, so in this case, 172 00:14:04,850 --> 00:14:09,260 predict X that test. 173 00:14:10,310 --> 00:14:15,220 So basically right now we have everything that we need to be able to run our model. 174 00:14:16,520 --> 00:14:21,710 Then the next thing that we want to do, since we want to put everything inside of a confusion matrix, 175 00:14:21,710 --> 00:14:25,280 we will create our confusion matrix right now. 176 00:14:25,290 --> 00:14:32,220 So basically our confusion matrix, what will be created with the use of once again, pendas. 177 00:14:33,320 --> 00:14:34,130 So pretty simple. 178 00:14:34,130 --> 00:14:36,310 How exactly do we create our confusion metrics? 179 00:14:36,950 --> 00:14:42,680 We are at first to create our variable, which would be called the math. 180 00:14:43,460 --> 00:14:44,100 So let's call it. 181 00:14:46,280 --> 00:14:50,510 Matt, let's use small letters as well. 182 00:14:55,800 --> 00:15:00,870 All right, so in this case, we'll have confusion, matrix and the confusion matrix would be equal 183 00:15:00,870 --> 00:15:01,950 to in this case. 184 00:15:09,900 --> 00:15:16,230 So we'll have our white test as well as our white prediction. 185 00:15:20,900 --> 00:15:22,710 Then we'll have padrone. 186 00:15:22,730 --> 00:15:28,910 So how how are things in south of our conclusion that in this part of the code we're creating our confusion 187 00:15:28,910 --> 00:15:29,450 metrics? 188 00:15:30,020 --> 00:15:31,220 And as I said. 189 00:15:33,820 --> 00:15:34,400 Here we go. 190 00:15:37,320 --> 00:15:43,400 So right here, as I said, what we'll do is we will give real names to our well, to our heroes. 191 00:15:43,730 --> 00:15:44,440 So pretty simple. 192 00:15:44,460 --> 00:15:46,440 Let's do it right here. 193 00:15:49,700 --> 00:15:52,190 So real names have real 194 00:15:54,800 --> 00:16:02,100 names, so for the first row, we will have right there, let's call it. 195 00:16:03,440 --> 00:16:05,390 I don't know how we can call it, we can call it. 196 00:16:05,390 --> 00:16:07,240 So it's right now. 197 00:16:07,790 --> 00:16:09,140 So basically true results. 198 00:16:09,650 --> 00:16:10,370 So true. 199 00:16:14,390 --> 00:16:20,620 And four columns, since it's everything that will be predicted, let's call it, I don't know. 200 00:16:26,050 --> 00:16:32,430 Let's call it provisions, since this is what will be predicted, so we'll call it a revision. 201 00:16:33,700 --> 00:16:34,090 All right. 202 00:16:34,480 --> 00:16:35,880 So we have everything that we need. 203 00:16:35,890 --> 00:16:42,880 The next thing that we need to do is we are going to use Seabourne to create our confusion metrics right 204 00:16:42,880 --> 00:16:43,070 now. 205 00:16:43,090 --> 00:16:47,430 So pretty simple, isn't that heat map? 206 00:16:47,440 --> 00:16:53,020 So basically, in this case, we're going to use a map to be able to see everything well, to be able 207 00:16:53,020 --> 00:16:56,770 to see it more clearly when our confusion metrics will be generated. 208 00:16:58,170 --> 00:17:03,660 And in this case, we are going to apply our map to our confusion magic, so you'll see it's going to 209 00:17:03,660 --> 00:17:07,680 be something that is pretty cool in this case. 210 00:17:07,680 --> 00:17:09,180 We call it math. 211 00:17:14,980 --> 00:17:19,190 All right, so we have everything that we need and annotation is going to be true. 212 00:17:21,580 --> 00:17:21,910 All right. 213 00:17:21,920 --> 00:17:23,930 So we have everything that we need. 214 00:17:24,520 --> 00:17:28,950 And finally, the last step will simply be printing everything. 215 00:17:28,960 --> 00:17:30,750 So basically, we want to print absolutely everything. 216 00:17:30,760 --> 00:17:31,270 So print. 217 00:17:35,920 --> 00:17:36,670 Actressy. 218 00:17:52,400 --> 00:17:54,890 We hear what happened are accuracy score. 219 00:18:18,110 --> 00:18:24,620 Here will have our white test, so we'll have our white test and that what we have predicted for our 220 00:18:24,980 --> 00:18:26,250 white as well. 221 00:18:28,130 --> 00:18:37,280 So here for our extra square, we'll have our white test, as well as what we have predicted to our 222 00:18:37,280 --> 00:18:44,470 White House for training and predict the battles that are right here. 223 00:18:50,860 --> 00:18:52,680 That's going to be why this. 224 00:18:58,430 --> 00:18:59,900 Also here, we'll have our. 225 00:19:02,450 --> 00:19:07,340 Why train as well as our why? 226 00:19:11,330 --> 00:19:11,930 Predicted. 227 00:19:18,060 --> 00:19:20,350 Here right now, we have everything that we need. 228 00:19:25,900 --> 00:19:32,470 So very important, the really important part of what we have done, doing all this would be correcting 229 00:19:32,530 --> 00:19:39,190 our code, because usually when we write down a huge code like this, it's really important to correct 230 00:19:39,190 --> 00:19:41,870 absolutely everything that we have just done. 231 00:19:42,640 --> 00:19:42,990 All right. 232 00:19:43,000 --> 00:19:46,300 So the last step will simply be writing down Kielty. 233 00:19:47,200 --> 00:19:55,690 That should be able to see everything that we have to do right now is we are going to run everything 234 00:19:55,690 --> 00:19:57,070 to see if it works perfectly. 235 00:19:57,070 --> 00:20:01,040 And if not, we're simply going to correct mistakes inside of our code. 236 00:20:01,060 --> 00:20:02,470 So if we run everything. 237 00:20:04,100 --> 00:20:09,980 OK, we can see that there is a mistake, so zero size error reduction operation if men, which has 238 00:20:09,980 --> 00:20:17,570 not identified so what we'll do right now, we'll simply look at our code and try to find the mistakes 239 00:20:17,570 --> 00:20:18,770 that are inside of it. 240 00:20:18,830 --> 00:20:22,220 What could be the mistakes that usually happen? 241 00:20:22,730 --> 00:20:27,210 So usually the mistakes that happen in those types of code will be basic mistakes. 242 00:20:27,230 --> 00:20:29,760 So I already see some of them. 243 00:20:29,780 --> 00:20:31,670 So basically I can see it right here. 244 00:20:31,680 --> 00:20:32,980 So we have whitelist. 245 00:20:33,380 --> 00:20:37,480 There should be well, we should have wide prediction that is right here. 246 00:20:37,490 --> 00:20:39,060 So we have this mistake right there. 247 00:20:39,590 --> 00:20:44,640 OK, so basically the mistake that we have is pretty simple. 248 00:20:44,960 --> 00:20:47,560 So we have whitest white men in here. 249 00:20:47,570 --> 00:20:50,660 We should have white prediction instead of white trim. 250 00:20:52,430 --> 00:20:54,620 So here will break down what prediction? 251 00:20:56,420 --> 00:20:57,290 And finally. 252 00:20:58,310 --> 00:21:01,790 The other place where we should have wide prediction should be here. 253 00:21:02,120 --> 00:21:03,760 So this is exactly what we will do. 254 00:21:05,880 --> 00:21:14,280 So we'll keep our white list and we are going to write down our white prediction. 255 00:21:16,220 --> 00:21:16,580 All right. 256 00:21:16,590 --> 00:21:19,540 So normally right now, we should have everything that we need. 257 00:21:20,030 --> 00:21:27,260 And if you guys if you guys you have an error inside of your code or whatever, you can simply copy 258 00:21:27,530 --> 00:21:28,970 my code right here. 259 00:21:29,000 --> 00:21:30,340 It should work properly. 260 00:21:31,580 --> 00:21:36,830 All right, so at the end, this is the result that you guys should receive, and this is a perfect 261 00:21:36,830 --> 00:21:39,360 result of usually what you guys showed up. 262 00:21:39,560 --> 00:21:41,060 So here you have your accuracy. 263 00:21:41,060 --> 00:21:44,690 So basically the accuracy of our model is 75 percent. 264 00:21:44,700 --> 00:21:51,230 So we are able to predict at 75 percent how many people will be well, how many people will get the 265 00:21:51,230 --> 00:21:54,320 job and how many people won't get the job. 266 00:21:55,910 --> 00:21:58,030 How exactly does it predict? 267 00:21:58,100 --> 00:21:58,640 Seventy five. 268 00:21:58,640 --> 00:22:00,110 So it's pretty simple. 269 00:22:00,110 --> 00:22:03,230 The calculation of this is the truth. 270 00:22:03,230 --> 00:22:10,580 So basically, what are the what, what the what is the truth of basically the truth that we can see 271 00:22:10,580 --> 00:22:13,550 it this way us and versus the provisions. 272 00:22:14,360 --> 00:22:17,810 So basically here will have our provisions for this provision of a Yes. 273 00:22:17,810 --> 00:22:18,660 Provision of a no. 274 00:22:19,010 --> 00:22:20,420 So here we'll have our true. 275 00:22:20,420 --> 00:22:20,870 Yes. 276 00:22:21,140 --> 00:22:22,700 A true right here. 277 00:22:22,940 --> 00:22:26,690 And basically how we make this calculation, it's pretty simple. 278 00:22:26,700 --> 00:22:33,440 So we are going to make an addition of what are all the provisions that we have made that happened. 279 00:22:33,440 --> 00:22:38,330 So basically, it's going to be this one right here and this one right here versus all the provisions 280 00:22:38,330 --> 00:22:40,040 that we made that basically didn't happen. 281 00:22:40,040 --> 00:22:43,880 So basically, we made mistakes right here and zero mistakes right there. 282 00:22:44,270 --> 00:22:47,630 So it's simply going to be eight plus one. 283 00:22:48,510 --> 00:22:55,400 And this divided by the number of provisions, which would give us 75 percent, which is which makes 284 00:22:55,910 --> 00:22:57,320 pretty much a lot of sense. 285 00:22:58,370 --> 00:23:05,450 So we can see this is how we are performing a a well, this type of regression. 286 00:23:06,170 --> 00:23:06,950 So you can see it's not. 287 00:23:07,200 --> 00:23:09,050 Well, yes, it could be complicated. 288 00:23:09,050 --> 00:23:14,940 But at the end of the day, your goal is really to have this to see how accurate is your model. 289 00:23:15,290 --> 00:23:20,240 So in our case, it's simply going to be nine divided by 12, since we are going to make eight plus 290 00:23:20,240 --> 00:23:23,950 one divided by the well of this. 291 00:23:23,950 --> 00:23:29,120 So basically eight plus three plus one that should give us seventy five percent and seventy five percent 292 00:23:29,120 --> 00:23:32,660 of accuracy is pretty good for this type of model. 293 00:23:33,740 --> 00:23:36,980 So as you can see, this would be the first model that we will create right now. 294 00:23:37,010 --> 00:23:38,770 So the first machine learning model. 295 00:23:38,780 --> 00:23:40,450 So this is the code around it. 296 00:23:40,460 --> 00:23:46,280 So basically I try to make it as simple as possible, but it's pretty normal that you guys have mistakes 297 00:23:46,280 --> 00:23:48,890 in a code that is big like this. 298 00:23:50,760 --> 00:23:54,020 But once again, if you guys still have mistakes, pretty simple. 299 00:23:54,020 --> 00:24:00,570 Just screenshot my code and you can simply retype it and you should have everything that you need. 300 00:24:00,950 --> 00:24:04,400 So that's a first class guys insu out in our next class.