image_output_1.png
from sklearn.linear_model import LinearRegression

from sklearn.metrics import mean_absolute_error

from sklearn.preprocessing import StandardScaler

from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)

model = LinearRegression()
model.fit(X_train, y_train)
predictions = model.predict(X_test)
print('mean_absolute_error : ', mean_absolute_error(y_test, predictions))