Because my model had a negative prediction, I used the same log method for it, but a problem occurred to me when I do this method, it is true that r2 also reaches 99, but the results of cross validation do not match with the results of the model, now when I do not get log r2 drops to 82, but the results of cross validation are consistent with the results of the model. Do you know a way that I can reach r2 99 and the results of cross validation are consistent with the results of the model?
Asked
Active
Viewed 16 times
'model = LinearRegression() y_train_log=np.log(y_train) y_test_log=np.log(y_test) y_val_log=np.log(y_val) model.fit(X_train,y_train_log) test_pred = np.exp(model.predict(X_test)) train_pred =np.exp(model.predict(X_train)) val_pred=np.exp(model.predict(X_val))' – Erfan Mollai Mar 27 '24 at 23:18