text_plain_output_1.png image_output_1.png
from sklearn.linear_model import LinearRegression

from sklearn.model_selection import cross_val_score

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

dataf = pd.read_csv('../input/bike_share.csv')

dataf.describe().T

dataf.duplicated().sum()

dataf.shape

dataf.drop_duplicates(inplace=True)

dataf.duplicated().sum()

dataf.isna().sum()

dataf.corr()

train_X = dataf.drop(columns=['temp', 'casual', 'registered'])

model = LinearRegression()

a = cross_val_score(model, train_X, train_Y, cv=5, scoring='neg_mean_squared_error')