目录
当前位置: 首页 > 文档资料 > Edward 中文文档 >

observations.boston_housing

优质
小牛编辑
129浏览
2023-12-01
boston_housing(path)

Load the Boston Housing data set (Harrison & Rubinfeld, 1978). It contains 506 examples of housing values in suburbs of Boston, each with 13 continuous attributes and 1 binary attribute.

The data contains the following columns:

FeatureDescription
CRIMper capita crime rate by town
ZNproportion of residential land zoned for lots over 25,000 sq.ft.
INDUSproportion of non-retail business acres per town.
CHASCharles River dummy variable (1 if tract bounds river; 0 otherwise)
NOXnitric oxides concentration (parts per 10 million)
RMaverage number of rooms per dwelling
AGEproportion of owner-occupied units built prior to 1940
DISweighted distances to five Boston employment centres
RADindex of accessibility to radial highways
TAXfull-value property-tax rate per $10,000
PTRATIOpupil-teacher ratio by town
B1000(Bk
LSTAT% lower status of the population
MEDVMedian value of owner-occupied homes in $1000’s

Args:

  • path: str. Path to directory which either stores file or otherwise file will be downloaded and extracted there. Filename is housing.data.

Returns:

Tuple of np.darray x_train and dictionary metadata of column headers (feature names).

Harrison, D., & Rubinfeld, D. L. (1978). Hedonic housing prices and the demand for clean air. Journal of Environmental Economics and Management, 5(1), 81–102.