Explore Library
Code QuizIntermediate

Creating Polynomial Features

Spot why the polynomial feature transformation raises an error before any learning happens.

Codepython
from sklearn.preprocessing import PolynomialFeatures

poly = PolynomialFeatures(degree=2, include_bias=False)
X_poly = poly.transform(X_train)

What is the bug in this code?