text_plain_output_1.png
from sklearn.linear_model import LinearRegression

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

names = ['CRIM', 'ZN', 'INDUS', 'CHAS', 'NOX', 'RM', 'AGE', 'DIS', 'RAD', 'TAX', 'PTRATIO', 'B', 'LSTAT', 'MEDV']
data_df = pd.read_csv('/kaggle/input/boston-house-prices/housing.csv', header=None, delim_whitespace=True, names=names)

from sklearn.linear_model import LinearRegression
lr_all = LinearRegression()
lr_all.fit(X_train, y_train)
y_pred1 = lr_all.predict(X_test)

lr_all.intercept_

lr_all_coeffcients = pd.DataFrame([X_train.columns, lr_all.coef_]).T
lr_all_coeffcients = lr_all_coeffcients.rename(columns={0: 'Attribute', 1: 'Coefficients'})
lr_all_coeffcients