fetch_california_housing#
- skrub.datasets.fetch_california_housing(data_home=None)[source]#
Fetches the california housing dataset (regression), available at https://github.com/skrub-data/skrub-data-files
- Description of the dataset:
This dataset was obtained from the StatLib repository: https://www.dcc.fc.up.pt/~ltorgo/Regression/cal_housing.html
The target variable is the median house value for California districts, expressed in hundreds of thousands of dollars ($100,000).
This dataset was derived from the 1990 U.S. census, using one row per census block group. A block group is the smallest geographical unit for which the U.S. Census Bureau publishes sample data (a block group typically has a population of 600 to 3,000 people).
A household is a group of people residing within a home. Since the average number of rooms and bedrooms in this dataset are provided per household, these columns may take surprisingly large values for block groups with few households and many empty houses, such as vacation resorts.
It can be downloaded/loaded using the sklearn.datasets.fetch_california_housing function. Size on disk: 1.80MB.
- Parameters:
- data_home
stror path-like, default=None The directory where to download and unzip the files.
- data_home
- Returns:
- bunch
Bunch A dictionary-like object with the following keys:
- california_housingDataFrame of shape (20640, 9)
A dataframe with the California housing data.
- XDataFrame of shape (20640, 8)
Features, i.e. the dataframe without the target labels.
- yDataFrame of shape (20640, 1)
Target labels.
- metadatadict
A dictionary containing the name, description, source and target.
- pathstr
The path to the california housing CSV file.
- bunch