Question 7
The following code attempts to implement polynomial regression (degree 4) on the California housing dataset. Please select the appropriate option to complete the missing part correctly
import numpy as npimport pandas as pdfrom sklearn.datasets import fetch_california_housingfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import PolynomialFeaturesfrom sklearn.linear_model import LinearRegressionfrom sklearn.pipeline import Pipeline
# Load datasethousing = fetch_california_housing()X, y = housing.data, housing.target
# Split into training and test setsX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Define the polynomial regression modelmodel = Pipeline([ ('poly', PolynomialFeatures(degree=4)), ('linear', LinearRegression())])
# Missing part
# Make predictionsy_pred = model.predict(X_test)Which of the following correctly fills the missing part blank while ensuring correct preprocessing and avoiding common pitfalls?