MSE
MSE = np.sum((y_preditc-y_test)**2)/len(y_test)
RMSE
RMSE = MSE ** 0.5
MAE
MAE = np.sum(np.absolute(y_preditc-y_test))/len(y_test)
R2
SS_res = np.sum((y - y_pred) ** 2)
SS_tot = np.sum((y - np.mean(y)) ** 2)
R2 = 1 - SS_res / SS_tot
MSE = np.sum((y_preditc-y_test)**2)/len(y_test)
RMSE = MSE ** 0.5
MAE = np.sum(np.absolute(y_preditc-y_test))/len(y_test)
SS_res = np.sum((y - y_pred) ** 2)
SS_tot = np.sum((y - np.mean(y)) ** 2)
R2 = 1 - SS_res / SS_tot