text_plain_output_1.png
from sklearn.linear_model import LassoCV, RidgeCV, LinearRegression

from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

import seaborn as sns

df = pd.read_csv('/kaggle/input/boston-housing-dataset/HousingData.csv')

df.isnull().sum()

df.isnull().sum()

def model(model, x_train, y_train, x_test, y_test):
    mod = model
    mod_fit = mod.fit(x_train, y_train)
    y_pred = mod_fit.predict(x_test)
    df_model = pd.DataFrame({'Test': y_test, 'Predict': y_pred})

model(LinearRegression(), X_train, y_train, X_test, y_test)