I got confused when I used 10 degrees and got 11 outputs. I checked the https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.PolynomialFeatures.html and there seems to be (1) column added to PolynomialFeatures.
For instance, in the example that is provided on that page:
import numpy as np
from sklearn.preprocessing import PolynomialFeatures
X = np.arange(6).reshape(3, 2)
X
array([[0, 1],
[2, 3],
[4, 5]])
poly = PolynomialFeatures(2)
poly.fit_transform(X)
Returns
array([[ 1., 0., 1., 0., 0., 1.],
[ 1., 2., 3., 4., 6., 9.],
[ 1., 4., 5., 16., 20., 25.]])
What is the purpose of "1." elements at the beginning of each list?