Import As Import As From Import: "Mean Squared Errors: "
Import As Import As From Import: "Mean Squared Errors: "
housing = datasets.fetch_california_housing()
housing
In [11]: X = housing.data
X.shape
y = housing.target
X.shape, y.shape
scaler = StandardScaler()
X = scaler.fit_transform(X)
X
print(len(X_train))
print(len(X_test))
15480
5160
#np.ones((shape))
intercept = np.ones((X_train.shape[0], 1))
#np.ones((shape))
intercept = np.ones((X_test.shape[0], 1))
In [17]: X_train
#if I want to compare yhat and y, I need to make sure they are the same shape
assert y_test.shape == yhat.shape