Class or type variables as features in polynomial regression algrorithm

86 Views Asked by At

I am new in machine learning area, and trying to use polynomial regression for my problem. I have data - advertisements of the cars from kolesa.kz website. Data contains mark, model, mileage, engine volume and other features like type of carcass (few types), is car custom cleared (yes/no), position of steering wheel (left/right) and state (normal/broken).

The question is can I use these 'type' variables in my polynomial regression algorithm? Or I need use another algorithm?

Thanks for any advance!

1

There are 1 best solutions below

1
On BEST ANSWER

For example, Take the car custom cleaned variable. Let's suppose it's represented by a dummy variable $C$ where $C=1$ implies the car is custom cleaned and $C=0$ means that it is not. Since C only takes on the values of 0 and 1, then $C^n=C$ for all natural numbers n. Thus, including both $C$ and $C^n$ in the regression leads to multicollinearity.

However, depending on the software you use, some programs will automatically drop all variables which cause a multicollinearity problem.