Middle
Why won't a linear model without feature transformation solve the problem of separating points inside and outside a circle?
sobes.tech AI
Answer from AI
A linear model constructs a separating hyperplane that divides the feature space into two parts using a linear equation. In the task of separating points inside and outside a circle, the boundary of separation is a circle, which is a nonlinear curve. A linear model without feature transformation cannot approximate such a nonlinear boundary because it is limited to straight lines (hyperplanes).
To solve this problem, additional features need to be introduced, such as squares of coordinates (x², y²), which will allow the linear model to operate in a new feature space where the boundary will be linear. This is called feature transformation or using polynomial features.
Example of transformation:
# Original features
X = [[x, y] for x, y in points]
# Add squares of coordinates
X_transformed = [[x, y, x**2 + y**2] for x, y in points]
# Now the linear model can separate points based on the condition x² + y² < r²