In this lecture, we will learn how Ukraine SVM classification model fit polynomial cardinal.
So the steps are the same as linear as we are modern.
Here just and of cardinal equate Selenia.
We have to use Cardinal Lakeway to polynomial.
And since we are using polynomial cardinals, we need to grow a degree of the polynomial.
So we have another parameter, which is degree.
And again, we also have C as a cost parameter.
So in the first step, we will create the object.
Then we will fit our extreme and wide green door down to this object.
Then we will use this strange object to predict our white train and white.
Well, you.
And then at last, we will call the debt crisis score using the word predicted and actual you lose on
our test data.
This is similar to your linear kernel model, if you want to know more detail.
You can always look at a scale on official documentation.
This will give you all the information of parameters and attributes that are supported in this function.
For polynomial functions, we also have two more parameters, that is Grama and CEDO, that is,
we've done our coefficient, which we are not discussing right now.
Let's go back and run this.
So we have created this object and we have fitted our extreme and why trender time to this object?
Now we can use this object to protect our values.
We are creating wide best pride and fire train pride.
Now, next step is to get the accuracy scores for our model.
You can just start accuracy score than actually tell your fire.
And then the predicted values of fire.
So the accuracy is scored here in this case is zero point five five.
You know how to optimize values of all this parameters.
To do that, you can use crude search to provide multiple values of degree and multiple values of C.
I recommend you to try different degrees, take three or four degrees, such as two, three, four,
five, six, and take the values of seed that we have discussed in the previous case and try to find
the best estimate out of this, given modern parameters.
Now, again, if you remember, we discuss and underscore support, underscore attitude.
It will give us the number of support vectors.
We just want to know the number of support vectors so we can just execute this again for zero class.
We have 185 support vectors and for last one, we have 94 support predictors.
Just this small exercise, you know, that changing sea.
Will increase or decrease your margin, and that will impact your number of support factors as well.
So try out different values of see.
Try to increase sea from zero point zero one 200 and try to gauge the impact on the number of support
vectors, you will see that the number of support vectors will start decreasing if you increase the
value of sea.
So just try out this exercise.
In the next lecture, we will discuss the real cardinal.