1 00:00:00,810 --> 00:00:08,080 In this video, we will see how to create decision tree that we have trained on our data. 2 00:00:09,090 --> 00:00:13,760 Now, plotting a busy uncreate is not an easy task in Python. 3 00:00:14,280 --> 00:00:15,990 It requires a lot of effort. 4 00:00:17,250 --> 00:00:20,730 We are not going into detail on how to grow it. 5 00:00:20,910 --> 00:00:27,450 We are just providing you code and we are just providing you the instructions on how to run it. 6 00:00:28,500 --> 00:00:32,040 So the first step is to create a dot file. 7 00:00:33,390 --> 00:00:37,680 Then we need to convert this dot file into an image. 8 00:00:38,250 --> 00:00:40,080 Then we will use this inmate. 9 00:00:41,170 --> 00:00:42,220 To create a graph. 10 00:00:43,630 --> 00:00:45,130 Now, this is the code. 11 00:00:46,510 --> 00:00:47,530 Remember this code? 12 00:00:47,920 --> 00:00:49,060 This is our variable. 13 00:00:50,730 --> 00:00:54,380 We need to use export, underscore Graff method. 14 00:00:54,930 --> 00:01:00,470 And here we have to provide over that aggressor KRI onto aggressor object. 15 00:01:01,380 --> 00:01:05,700 Since our object is rectory, we provided this as an argument. 16 00:01:07,840 --> 00:01:13,590 Now, in the next step, we have to import inmates from eye by standard display. 17 00:01:15,500 --> 00:01:21,590 We will use this image to display graph in our Biton notebook. 18 00:01:23,120 --> 00:01:33,350 The next step is to import by door, plus normally by default, this library is not installed in your 19 00:01:33,410 --> 00:01:34,450 anakonda packet. 20 00:01:34,880 --> 00:01:39,320 So first you have to install it to install this. 21 00:01:39,650 --> 00:01:43,100 You need to go to your and command prompt. 22 00:01:43,430 --> 00:01:49,540 And there you need to write KONDA Space install is space Bidart. 23 00:01:49,700 --> 00:02:00,260 Plus, if you are not using Anakonda, you have to go to your common ground and write up the space, 24 00:02:00,770 --> 00:02:02,770 install space by door. 25 00:02:02,970 --> 00:02:12,050 Plus, we have provided instructions on how to install Biodome plus in the description of this video. 26 00:02:12,530 --> 00:02:17,720 So check out if you want to plot your regression tree into Biton. 27 00:02:18,780 --> 00:02:29,850 Next, if you have in sorry pilot plus you can import Bidart plus and then use this Dort data that we 28 00:02:29,850 --> 00:02:33,330 have created earlier to create the regression tree. 29 00:02:35,100 --> 00:02:37,400 So we will run all this for commands. 30 00:02:43,920 --> 00:02:44,700 You can see. 31 00:02:45,710 --> 00:02:49,790 This is a word, this young tree here on the top. 32 00:02:50,630 --> 00:02:52,280 You can get the variable name. 33 00:02:53,860 --> 00:02:56,090 Year X squared, record. 34 00:02:56,130 --> 00:02:56,550 Three. 35 00:02:56,580 --> 00:02:58,260 This is our fourth variable. 36 00:02:58,350 --> 00:03:02,520 All four X data frame, which is budget. 37 00:03:03,920 --> 00:03:05,480 And here we have the condition. 38 00:03:06,080 --> 00:03:12,590 If the budget is less than thirty seven thousand, then it will follow this branch. 39 00:03:13,750 --> 00:03:20,230 And if the budget is greater than thirty seven thousand nine hundred eighty two, it will follow this 40 00:03:20,230 --> 00:03:20,670 branch. 41 00:03:22,400 --> 00:03:25,590 You can also see the average value of this symbol. 42 00:03:26,420 --> 00:03:31,680 So this is over Naude, the total number of observations is 404. 43 00:03:32,630 --> 00:03:39,710 And the average value of collection here is forty five thousand after the first split. 44 00:03:40,340 --> 00:03:47,690 So if your budget is more than this value, the average value for this symbol is seventy one thousand. 45 00:03:48,260 --> 00:03:52,430 So the average really of collection for this bucket is seventy one thousand. 46 00:03:52,760 --> 00:03:55,820 And the total number of samples in this book is 75. 47 00:03:56,630 --> 00:04:03,230 Whereas if you're budget value is less than thirty seven thousand nine hundred eighty two, the average 48 00:04:03,230 --> 00:04:05,760 value of your collection is thirty nine thousand. 49 00:04:06,020 --> 00:04:09,730 And the number of observations in this bucket is 392. 50 00:04:10,670 --> 00:04:15,730 And on the bottom, you can see we have eight leaf notes. 51 00:04:17,180 --> 00:04:20,660 And these are the average value of each leaf node. 52 00:04:21,080 --> 00:04:25,540 You can also get to the number of observation following and two, these leave notes. 53 00:04:27,130 --> 00:04:33,580 So for this leaf, our extra variable is less than thirty seven thousand nine hundred eighty two. 54 00:04:34,450 --> 00:04:37,990 Our X10 variable is less than 40000. 55 00:04:38,440 --> 00:04:44,410 Our first variable, that is Exito very well, is less than 135 and so on. 56 00:04:45,490 --> 00:04:48,770 So you can assign conditions to all this bucket. 57 00:04:49,270 --> 00:04:54,430 And these are the average values of collection in this bucket. 58 00:04:55,060 --> 00:04:58,660 And that is how you visualize CCRI and Biton.