是否有意义?如果是那么如何在 MSE 中处理?

Does it make sense? If yes then how to handle in MSE?

对于 LinearRegression,我们可以对一个变量进行对数变换,对另一个变量进行 sqrt 变换吗?如果是,那么在 MSE 期间做什么?我应该对 y_test 和预测进行 exp 还是平方?

boston['medv_log'] = np.log(boston.medv)
boston['lstat_sqrt'] = np.sqrt(boston.lstat)
x = boston.lstat_sqrt
y = boston.medv_log

如果您在训练和测试集中转换变量,则无需关心评估指标。如果您转换目标变量(例如使用 log 函数),则需要转换您的预测(使用 exp 函数)以获得真实值。