我试图预测悉尼的房价,在我处理数据之后,我发现价格不能用对数来正常化。但我仍然在构建推进模型。问题是: 如何调整日志后的残差?这意味着我认为日志会使残差/错误变大。 谢谢
# normal distribution of train response value
log=np.log(training_data["price"])
skew = stats.skew(log)
print(skew)
k2, p = stats.normaltest(log)
alpha = 1e-3
print("p = {:g}".format(p))
if p < alpha: # null hypothesis: x comes from a normal distribution
print("The null hypothesis can be rejected")
else:
print("The null hypothesis cannot be rejected")
结果为p=4.07145e-07 无效假设可以被拒绝
目前没有回答
相关问题 更多 >
编程相关推荐