text_html_output_1.png
from sklearn.metrics import mean_squared_error

import numpy as np # linear algebra

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

train_set = pd.read_csv('/kaggle/input/preprocessed-sales-data/train_set.csv')
validation_set = pd.read_csv('/kaggle/input/preprocessed-sales-data/validation_set.csv')
test_set = pd.read_csv('/kaggle/input/competitive-data-science-predict-future-sales/test.csv')

train_set.head().T

x_train = train_set.drop(['item_cnt_month', 'date_block_num'], axis=1)
y_train = train_set['item_cnt_month'].astype(int)
x_val = validation_set.drop(['item_cnt_month', 'date_block_num'], axis=1)
y_val = validation_set['item_cnt_month'].astype(int)

print('Train rmse:', np.sqrt(mean_squared_error(y_train, M1_train)))
print('Validation rmse:', np.sqrt(mean_squared_error(y_val, M1_val)))