1 00:00:00,150 --> 00:00:06,460 Helen, before going deep down to the session, let's have a walk through on all the previous sessions 2 00:00:06,490 --> 00:00:09,030 what we have done in this project till now. 3 00:00:09,390 --> 00:00:17,730 So from data in body to data analysis, by forming lots of data processing will also gain some meaningful 4 00:00:17,730 --> 00:00:18,850 insights from data. 5 00:00:18,870 --> 00:00:22,720 Let's say price was a source, price was the destination. 6 00:00:22,740 --> 00:00:30,210 How exactly prices for during what is the distribution of each and every metropolitan cities in terms 7 00:00:30,210 --> 00:00:30,730 of price? 8 00:00:31,050 --> 00:00:38,670 We are also faced these type of meaningful insights from data and we can simply represent to my stakeholders 9 00:00:38,710 --> 00:00:43,470 here, these are these these insights that I have extracted from data. 10 00:00:43,830 --> 00:00:50,910 And now after we have performed lots of techniques of encoding and all these different different estopinal 11 00:00:50,910 --> 00:00:54,540 also perform feature selection, outliers detection as well. 12 00:00:54,840 --> 00:01:01,110 So in this session, what we have to do, we have to apply a machine learning algorithm on our data 13 00:01:01,110 --> 00:01:04,470 as well as we have to automate on our prediction. 14 00:01:04,770 --> 00:01:07,920 What exactly is the meaning of this automation? 15 00:01:08,130 --> 00:01:13,680 So let's say I'm just going to define a function and one hour I will pass a machine learning algorithm 16 00:01:13,680 --> 00:01:14,570 to that function. 17 00:01:14,880 --> 00:01:21,510 All the stuff will be happen automatically by this function like, say, learning relationships from 18 00:01:21,510 --> 00:01:23,410 data check accuracy. 19 00:01:23,860 --> 00:01:24,930 What are the predictions? 20 00:01:25,110 --> 00:01:30,550 Checking the accuracy of model, dumping that model and all the different different like that things. 21 00:01:30,840 --> 00:01:36,900 So what I'm going to do very first, I just need some training data and some testing data so that I 22 00:01:36,900 --> 00:01:40,380 can create my model so that I can do some kind of prediction. 23 00:01:40,600 --> 00:01:46,890 So far, this what I'm going to do, I'm just going to say from this Ascalon library, I'm going to 24 00:01:46,890 --> 00:01:52,380 import already some module, which is exactly my train test is split. 25 00:01:52,590 --> 00:01:56,580 That will definitely helpful for you whenever you have to. 26 00:01:57,170 --> 00:02:02,400 You read any form of training and as what I have to do, I have to just execute it. 27 00:02:02,610 --> 00:02:05,190 And after it, we have to initialize this class. 28 00:02:05,400 --> 00:02:10,410 And if you will shift plus there you will get what exactly the documentation of function. 29 00:02:10,410 --> 00:02:14,020 You will see Taci train side and all the different different things. 30 00:02:14,340 --> 00:02:20,400 So very first here, you have to parse what is your independent data, what is a dependent data as well 31 00:02:20,400 --> 00:02:21,790 as what is your test side. 32 00:02:21,810 --> 00:02:30,190 So let's say I'm going to mention my test side or let's say I just need 20 percent of data as my testing. 33 00:02:30,420 --> 00:02:35,280 So here I'm going to say this and this side is equal to nothing but zero point two. 34 00:02:35,280 --> 00:02:38,100 It means my training suggests 80 percent. 35 00:02:38,110 --> 00:02:43,180 It means 80 percent of entire data will be considered for training purposes. 36 00:02:43,440 --> 00:02:50,940 So what it really does, it really don't meet acts on the train after it will be done on the score test. 37 00:02:51,150 --> 00:02:57,270 After that, it will hit a new Y in the score train as well as it will also return me. 38 00:02:58,140 --> 00:03:00,180 Why underscore test? 39 00:03:00,450 --> 00:03:05,300 So I'm just going to assign this and just execute all these stuff. 40 00:03:05,500 --> 00:03:07,460 Now what do we have to do? 41 00:03:07,590 --> 00:03:11,600 We have to basically apply machine learning algorithm on our data. 42 00:03:11,820 --> 00:03:14,040 So let's say I will define a function. 43 00:03:14,040 --> 00:03:16,680 Let's say its name is whatever you want. 44 00:03:16,920 --> 00:03:19,740 So Lexcen will define a function with name as pathetic. 45 00:03:19,920 --> 00:03:26,490 And here, whatever machine learning model I'm going to pass, it will give prediction with respect 46 00:03:26,490 --> 00:03:27,710 to that machine learning model. 47 00:03:27,930 --> 00:03:32,970 So very first, what we have to do, we have to learn some relations for our data supporters. 48 00:03:32,970 --> 00:03:37,440 I'm going to say what our machine learning model I'm going to pass on this. 49 00:03:37,440 --> 00:03:39,440 Using that, I have to call my friend. 50 00:03:39,720 --> 00:03:41,700 And here very first, I have to pass. 51 00:03:41,700 --> 00:03:44,690 My accent is called train and why in the school. 52 00:03:45,030 --> 00:03:46,830 So here I'm going to pass all this stuff. 53 00:03:47,070 --> 00:03:51,420 Let's say after learning, I'm going to store all the relationships in model. 54 00:03:51,630 --> 00:03:54,150 And here, that's a very first. 55 00:03:54,150 --> 00:03:56,370 I have to print something that's out of print. 56 00:03:56,610 --> 00:03:58,920 What exactly the training course for this? 57 00:03:58,920 --> 00:04:03,420 I'm going to say using this model, I have to call my something, which is score. 58 00:04:03,600 --> 00:04:07,380 And here I had to mention my accent is called train. 59 00:04:07,680 --> 00:04:14,220 And after that we have to mention a word is called let's say I have to print it in some user-friendliness 60 00:04:14,220 --> 00:04:14,460 here. 61 00:04:14,460 --> 00:04:17,850 I'm going to say I have to print it, let's say so here. 62 00:04:17,850 --> 00:04:20,760 I'm going to say nothing but my something. 63 00:04:20,760 --> 00:04:22,650 Let's say training school. 64 00:04:22,650 --> 00:04:29,580 So here I'm going to say it is my training is called and after let's say my training is called is something 65 00:04:29,730 --> 00:04:32,280 which is exactly placeholder over here. 66 00:04:32,490 --> 00:04:38,850 So whatever placeholder I have to find out what they're doing exactly the see values from my formal 67 00:04:38,850 --> 00:04:39,360 function. 68 00:04:39,600 --> 00:04:43,160 So it will receive values from this format function. 69 00:04:43,410 --> 00:04:48,720 So after what we have to do, let's say after it, we have to do prediction. 70 00:04:48,730 --> 00:04:53,070 So I'm going to say using my model, I have to use a private function. 71 00:04:53,310 --> 00:04:56,950 So basically we have to predict on our X test data. 72 00:04:57,360 --> 00:04:59,580 So after it, what we have to do, let's say I'm. 73 00:04:59,660 --> 00:05:07,260 Undistorted somewhere as time we to store it in, let's say, predictions in, which is exactly my error 74 00:05:07,660 --> 00:05:09,520 after what we have to do next. 75 00:05:09,550 --> 00:05:11,920 We have to protect our prediction. 76 00:05:12,190 --> 00:05:19,540 So for this, what we guys can do, you guys can say, let's say predictions are nothing, but predictions 77 00:05:19,540 --> 00:05:23,170 are going on and you can place a placeholder over here. 78 00:05:23,410 --> 00:05:28,940 And this placeholder will see values from your predictions. 79 00:05:29,800 --> 00:05:36,790 And after what we have to do, let's say I'm going to bring some Espace over there so that it will look 80 00:05:36,790 --> 00:05:37,990 something attractive. 81 00:05:37,990 --> 00:05:44,690 So I'm going to say just bring this place, let's say, offering all the stuff I have to check here. 82 00:05:44,920 --> 00:05:48,040 What exactly is my R-squared matrix? 83 00:05:48,280 --> 00:05:50,350 So that first, what do we have to do? 84 00:05:50,710 --> 00:05:51,410 Very flor's. 85 00:05:51,440 --> 00:05:58,810 I'm going to say from this Escalon, from this ascalon, I have to import something else, which is 86 00:05:58,810 --> 00:05:59,980 exactly matrix. 87 00:06:00,250 --> 00:06:10,180 And using this matrix, whatever I have imported Avel, I'm going to say this matrix dot r2 is just 88 00:06:10,190 --> 00:06:10,520 best. 89 00:06:11,020 --> 00:06:12,180 This is exactly right. 90 00:06:12,790 --> 00:06:19,470 And here you have to mention what is your actual data which is in lightest and what are your predictions, 91 00:06:19,480 --> 00:06:25,240 which is exactly in your predictions, which is what did and after let's say I have to store it somewhere 92 00:06:25,240 --> 00:06:29,110 else, let's say I'm going to say this is my let's say or two score. 93 00:06:29,140 --> 00:06:34,370 And after it, what we have to do, let's say I have to print this out as well. 94 00:06:34,390 --> 00:06:43,120 So here I'm going to say my R-squared value is nothing, but it is just this placeholder and my placeholder 95 00:06:43,360 --> 00:06:50,680 will receive values is exactly from this variable that I have defined or what, dear. 96 00:06:51,010 --> 00:06:55,540 So here I'm going to just mention this are two is Kaveri. 97 00:06:55,540 --> 00:06:57,240 What did after it? 98 00:06:57,250 --> 00:06:58,030 What we have to do? 99 00:06:58,030 --> 00:07:01,930 Let's say we have to print some more metrics for my regression. 100 00:07:02,440 --> 00:07:10,370 So what are those which are exactly my Amit mean absolute error and mzee meniscal at it and animacy, 101 00:07:10,390 --> 00:07:16,870 which is exactly what rwd me is that these are exactly three metrics in case of your regression use 102 00:07:16,870 --> 00:07:17,100 case. 103 00:07:17,350 --> 00:07:26,740 So for this I'm going to say my MFC, my and as he looks very first, I have to print my M80, so I'm 104 00:07:26,740 --> 00:07:31,870 going to say my M80 is nothing but it is nothing. 105 00:07:31,870 --> 00:07:42,910 But it is just my mat, Craig's dot and you have to access your mi underscore absolute underscore atter. 106 00:07:43,120 --> 00:07:49,300 And here you have to mention what is your actual data which is in this contest and what are your prediction 107 00:07:49,300 --> 00:07:51,290 which is exactly in your predictions. 108 00:07:51,610 --> 00:07:55,330 So after doing all this stuff, I'm just going to copy from here. 109 00:07:55,330 --> 00:07:57,190 Just paste, just paste. 110 00:07:57,400 --> 00:08:00,010 And this time I have to print for Matthei. 111 00:08:00,340 --> 00:08:04,780 This time I have to print exactly for Oremus. 112 00:08:04,870 --> 00:08:06,790 So I'm going to say this is Oremus. 113 00:08:07,240 --> 00:08:16,150 So this time I have to use another function, which is exactly I mean is quite error, which is exactly 114 00:08:16,510 --> 00:08:16,950 this one. 115 00:08:17,110 --> 00:08:17,490 Yeah. 116 00:08:17,770 --> 00:08:24,610 And this time I have to use a function which is nothing but which is just a root of which is just a 117 00:08:24,610 --> 00:08:25,730 root of this one. 118 00:08:25,990 --> 00:08:33,850 So for this what you guys can do, you guys can just call this number Bidart security function so that 119 00:08:33,850 --> 00:08:36,820 you will compute whatever message will return. 120 00:08:36,820 --> 00:08:39,550 It will just compute its current of this one. 121 00:08:39,610 --> 00:08:41,590 Let's say I have to visualize it. 122 00:08:41,590 --> 00:08:45,800 The are what is the difference between my predictions and my actual data. 123 00:08:46,000 --> 00:08:50,200 So for this, what I'm going to do, I'm going to say Ascendis dot this plot. 124 00:08:50,470 --> 00:08:56,050 And here very first to have to mention what is your actual data, which is not in my wildest and what 125 00:08:56,050 --> 00:08:59,980 is exactly your predictions, which is exactly in your predictions. 126 00:08:59,980 --> 00:09:06,520 Just like you let's say I have to apply random forest algorithm on data. 127 00:09:06,790 --> 00:09:14,020 It means you have to just pass this random forest class over there and it will do predictions. 128 00:09:14,020 --> 00:09:15,520 It will give you a training, a score. 129 00:09:15,520 --> 00:09:21,320 It will cover all the square metrics and all these different different types of metrics as well as this 130 00:09:21,390 --> 00:09:22,450 with as well. 131 00:09:23,020 --> 00:09:29,100 So what I'm going to do, I'm going to say from my Escalon module, I'm going to use that force. 132 00:09:29,110 --> 00:09:31,630 I have to import my sample. 133 00:09:31,630 --> 00:09:39,190 And in this example, I have my random forest agressor to just executed and now I have to just call 134 00:09:39,190 --> 00:09:40,450 my function. 135 00:09:40,630 --> 00:09:45,090 And here I have to just initialize this random forest degreaser. 136 00:09:45,130 --> 00:09:46,750 So just execute it. 137 00:09:46,750 --> 00:09:51,370 Now, you will see where all of this does gets executed with respect to training. 138 00:09:51,550 --> 00:09:57,730 You have ninety five percent of school and these are all your prediction with respect to different different 139 00:09:57,730 --> 00:09:58,400 indexes. 140 00:09:58,540 --> 00:09:59,470 This is our. 141 00:09:59,610 --> 00:10:04,380 Kolu, which say is, yeah, the model has 80 percent accuracy. 142 00:10:04,530 --> 00:10:08,430 After that, you will hear all the different different metrics as well. 143 00:10:08,460 --> 00:10:10,920 And this is exactly your distribution plan. 144 00:10:10,920 --> 00:10:18,570 You will see over here at the zero point, you have a B, it means more than more than almost 70 percent 145 00:10:18,570 --> 00:10:23,060 of data points are almost predicted in a right way. 146 00:10:23,250 --> 00:10:24,690 So they're in France. 147 00:10:24,840 --> 00:10:28,450 You can just watch from this distribution network. 148 00:10:28,560 --> 00:10:30,480 So that's all about the session. 149 00:10:30,840 --> 00:10:33,840 So the session will be very handy and very useful for you. 150 00:10:34,350 --> 00:10:35,610 That's all about guys. 151 00:10:35,940 --> 00:10:36,640 Thank you. 152 00:10:36,690 --> 00:10:37,590 Have a nice day. 153 00:10:37,650 --> 00:10:38,420 Keep learning. 154 00:10:38,430 --> 00:10:39,300 Keep growing. 155 00:10:39,540 --> 00:10:40,470 Keep practicing.