Question 19
Consider the following code snippet:
from sklearn.datasets import load_irisfrom sklearn.decomposition import PCAfrom sklearn.preprocessing import PolynomialFeaturesfrom sklearn.pipeline import FeatureUnionX = load_iris().data # X.shape = (150,4)
poly_feature = PolynomialFeatures(degree=2, include_bias=True)union = FeatureUnion([('poly', poly_feature), ('pca', PCA(n_components=2))])
X_transformed = union.fit_transform(X)print(X_transformed.shape)If the shape of X is . How many total columns are there in the X_transformed ?