text_plain_output_1.png
from sklearn.linear_model import LinearRegression

from sklearn.linear_model import LinearRegression

from sklearn.linear_model import LogisticRegression

import numpy as np

import pandas as pd

wdf = pd.read_csv('/kaggle/input/historical-weather-data-for-indian-cities/jaipur.csv', parse_dates=['date_time'], index_col='date_time')

train_X.shape

train_y.shape

model = LinearRegression()
model.fit(train_X, train_y)

prediction = model.predict(test_X)

mae = np.mean(np.absolute(prediction - test_y))
variance_score = model.score(test_X, test_y)
prediction = np.round(prediction, 2)
results = pd.DataFrame({'Actual': test_y, 'Prediction': prediction, 'Difference': test_y - prediction})

model = LogisticRegression()
model.fit(train_X, train_y)

prediction = model.predict(test_X)

results = pd.DataFrame({'Actual': test_y, 'Prediction': prediction, 'Difference': test_y - prediction})
print(results)