1 00:00:00,580 --> 00:00:08,180 In this lecture, we will learn how Ukraine SVM classification model fit polynomial cardinal. 2 00:00:09,640 --> 00:00:13,210 So the steps are the same as linear as we are modern. 3 00:00:14,350 --> 00:00:17,600 Here just and of cardinal equate Selenia. 4 00:00:17,740 --> 00:00:20,050 We have to use Cardinal Lakeway to polynomial. 5 00:00:20,830 --> 00:00:25,800 And since we are using polynomial cardinals, we need to grow a degree of the polynomial. 6 00:00:26,170 --> 00:00:28,840 So we have another parameter, which is degree. 7 00:00:29,680 --> 00:00:33,790 And again, we also have C as a cost parameter. 8 00:00:37,050 --> 00:00:39,600 So in the first step, we will create the object. 9 00:00:39,990 --> 00:00:44,310 Then we will fit our extreme and wide green door down to this object. 10 00:00:45,330 --> 00:00:49,830 Then we will use this strange object to predict our white train and white. 11 00:00:49,990 --> 00:00:50,480 Well, you. 12 00:00:52,340 --> 00:00:58,660 And then at last, we will call the debt crisis score using the word predicted and actual you lose on 13 00:00:58,660 --> 00:00:59,510 our test data. 14 00:01:02,410 --> 00:01:08,860 This is similar to your linear kernel model, if you want to know more detail. 15 00:01:09,130 --> 00:01:14,410 You can always look at a scale on official documentation. 16 00:01:14,440 --> 00:01:22,210 This will give you all the information of parameters and attributes that are supported in this function. 17 00:01:26,390 --> 00:01:33,530 For polynomial functions, we also have two more parameters, that is Grama and CEDO, that is, 18 00:01:34,220 --> 00:01:37,500 we've done our coefficient, which we are not discussing right now. 19 00:01:43,560 --> 00:01:45,870 Let's go back and run this. 20 00:01:49,700 --> 00:01:57,170 So we have created this object and we have fitted our extreme and why trender time to this object? 21 00:01:57,260 --> 00:02:00,260 Now we can use this object to protect our values. 22 00:02:01,130 --> 00:02:05,410 We are creating wide best pride and fire train pride. 23 00:02:07,130 --> 00:02:10,700 Now, next step is to get the accuracy scores for our model. 24 00:02:11,770 --> 00:02:15,210 You can just start accuracy score than actually tell your fire. 25 00:02:15,440 --> 00:02:17,410 And then the predicted values of fire. 26 00:02:19,260 --> 00:02:23,450 So the accuracy is scored here in this case is zero point five five. 27 00:02:24,320 --> 00:02:28,310 You know how to optimize values of all this parameters. 28 00:02:29,060 --> 00:02:36,110 To do that, you can use crude search to provide multiple values of degree and multiple values of C. 29 00:02:38,370 --> 00:02:45,270 I recommend you to try different degrees, take three or four degrees, such as two, three, four, 30 00:02:45,270 --> 00:02:53,520 five, six, and take the values of seed that we have discussed in the previous case and try to find 31 00:02:53,520 --> 00:02:57,840 the best estimate out of this, given modern parameters. 32 00:02:59,730 --> 00:03:05,700 Now, again, if you remember, we discuss and underscore support, underscore attitude. 33 00:03:05,820 --> 00:03:08,280 It will give us the number of support vectors. 34 00:03:09,890 --> 00:03:18,140 We just want to know the number of support vectors so we can just execute this again for zero class. 35 00:03:18,470 --> 00:03:24,860 We have 185 support vectors and for last one, we have 94 support predictors. 36 00:03:26,690 --> 00:03:30,950 Just this small exercise, you know, that changing sea. 37 00:03:31,930 --> 00:03:39,010 Will increase or decrease your margin, and that will impact your number of support factors as well. 38 00:03:39,760 --> 00:03:41,920 So try out different values of see. 39 00:03:43,250 --> 00:03:51,260 Try to increase sea from zero point zero one 200 and try to gauge the impact on the number of support 40 00:03:51,260 --> 00:03:59,120 vectors, you will see that the number of support vectors will start decreasing if you increase the 41 00:03:59,120 --> 00:03:59,900 value of sea. 42 00:04:00,470 --> 00:04:02,780 So just try out this exercise. 43 00:04:03,990 --> 00:04:07,100 In the next lecture, we will discuss the real cardinal.