September 2019
Intermediate to advanced
420 pages
10h 29m
English
We can again thank scikit-learn for easy access to the dataset. We first import all of the necessary modules, as we did earlier:
In [14]: from sklearn import datasets... from sklearn import metrics
Then loading the dataset is a one-liner:
In [15]: boston = datasets.load_boston()
The structure of the boston object is identical to the iris object, as discussed in the preceding command. We can get more information about the dataset in 'DESCR' and find all data in 'data', all feature names in 'feature_names', the physical location of the Boston CSV dataset in 'filename', and all target values in 'target':
In [16]: dir(boston)Out[16]: ['DESCR', 'data', 'feature_names', 'filename', 'target']
The dataset contains a total of ...
Read now
Unlock full access