【发布时间】:2021-02-25 12:27:42
【问题描述】:
对于线性回归,我们可以对一个变量进行 log 转换并将 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
【问题讨论】:
标签: python scikit-learn data-science linear-regression data-analysis