gpt4 book ai didi

scikit-learn - sklearn.datasets.load_boston 发生了什么?

转载 作者:行者123 更新时间:2023-12-05 03:20:12 30 4
gpt4 key购买 nike

当我使用 sklearn.datasets.load_boston 编写波士顿住房模型时,它给了我一个错误,指出该数据库因“道德”问题而被弃用。这些问题是什么?我在网上查了一下,找不到任何东西。

这是完整的错误:

DEPRECATED: load_boston is deprecated in 1.0 and will be removed in 1.2.

The Boston housing prices dataset has an ethical problem. You can refer to the documentation of this function for further details.

The scikit-learn maintainers therefore strongly discourage the use of this dataset unless the purpose of the code is to study and educate about ethical issues in data science and machine learning.

In this special case, you can fetch the dataset from the original source:

最佳答案

其实和报错中的一模一样。你可以查看https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_boston.html了解更多详情。

据我了解,数据中存在两个问题:

  1. 种族主义:有一篇很棒的文章,M. Carlisle 在 Scikit-Learn 文档中也引用了这篇文章。它侧重于波士顿住房数据集的主要问题,他发现房价受邻里种族影响。
  2. 没有合适的目标:“创建此数据集的研究目标是研究空气质量的影响,但并未充分证明该假设的有效性。”

但是,您可以从源中获取数据: http://lib.stat.cmu.edu/datasets/boston

希望这些对您有所帮助。

关于scikit-learn - sklearn.datasets.load_boston 发生了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73252971/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com