输入包含NAN,INFINITY或一个太大的值(float64')linearregress:但是没有空值

发布于 2025-02-05 17:54:08 字数 100 浏览 1 评论 0原文

最初,我的输入数据集有空格。但是我已经清理了它,并检查了: df.isnull()。sum() 而且一切都是0。 现在,将我的数据集拟合到线性重试模型并要进行预测之后,它带来了上述错误。

Originally, my input dataset had blank spaces. But I have cleaned it, and checked with:
df.isnull().sum()
And everthing is 0.
Now, after fitting my dataset into the LinearRegression model and about to make predictions, it's bringing the above error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

守护在此方 2025-02-12 17:54:08

由于您确实提到了在预测时间内发生的错误,因此我建议您使测试数据通过与培训数据相同的管道。

例如:

原始培训输入 - >预处理 - >训练输入

是必要的,测试数据也经过相同的预处理。

Since you did mention that the error is happening during the prediction time, I would suggest that you make the testing data go through the same pipeline as the training data.

For example:

raw training input -> preprocessing -> training input

It is necessary the test data also goes through the same preprocessing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文