Machine Learning, Artificial Intelligence, Python, Statistics, Mathematics.
pred_test=reg.predict(P_test) error_test=0 for i in range(len(pred_test)): error_test=error_test+(pred_test[i]-T_test[i])**2 MSE_test.append(error_test/len(pred_test)) PRED_TEST.append(pred_test) As we can see, the MSE is extremely high at a certain point in the test set, even if it keep decreasing