fetch_california_housing#
- skrub.datasets.fetch_california_housing(data_home=None)[source]#
Fetches the california housing dataset (regression), available at 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.
- Parameters:
- data_home: str or path, default=None
The directory where to download and unzip the files.
- Returns:
- bunchsklearn.utils.Bunch
A dictionary-like object with the following keys:
california_housing: pd.DataFrame, the dataframe. Shape: (20640, 9)X: pd.DataFrame, features, i.e. the dataframe without the target labels. Shape: (20640, 8)y: pd.DataFrame, target labels. Shape: (20640, 1)metadata: a dictionary containing the name, description, source and target