Skip to content

Problem with Boston Housing Data #163

@sdempwolf

Description

@sdempwolf

hello,
On Sep 28 2022 I was working with the Boston Housing data and the exercises in module 02 supervised-learning. We received a message that there was an ethical problem with the Boston Housing data and that scikit-learn was recommending a switch to the California Housing data, for which they provided links.
I ended up modifying the mglearn/datasets.py file, adding the import line and a function load_extended_california(). This allows the rest of the code in the notebook to function as written with the California housing data.

from sklearn.datasets import fetch_california_housing

def load_extended_california():
housing = fetch_california_housing()
X = housing.data

X = MinMaxScaler().fit_transform(housing.data)
X = PolynomialFeatures(degree=2, include_bias=False).fit_transform(X)
return X, housing.target

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions