python遇到的问题2

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/owenfy/article/details/83414643

1、调整阈值

prediction = model.predict(X_test)
prediction[prediction>=0.5] = 1
prediction[prediction<0.5] = 0

2、正太拟合函数

(mu, sigma) = norm.fit(train['SalePrice'])
print( '\n mu = {:.2f} and sigma = {:.2f}\n'.format(mu, sigma))

猜你喜欢

转载自blog.csdn.net/owenfy/article/details/83414643