FAQ: Support Vector Machines - Polynomial Kernel

This community-built FAQ covers the “Polynomial Kernel” exercise from the lesson “Support Vector Machines”.

Paths and Courses
This exercise can be found in the following Codecademy content:

FAQs on the exercise Polynomial Kernel

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

What if the training data is of more than two dimensions (say three). Does Polynomial Kernel simply adds another dimension and will transform training data into a four dimensional data in our case?

2 Likes

By the quadratic polynomial kernel, three dimensional data seems to be transformed to six dimensional data as follows:

(x, y, z) -> (sqrt(2) * x * y, sqrt(2) * x * z, sqrt(2) * y * z, x ** 2, y ** 2, z ** 2) 

here sqrt(2) is the square root of 2.

The exercise states, and I quote: “We could visualize what this plane would look like in two dimensions to get the following decision boundary”.

Anybody have any idea how to effect this in code?