Exploring our dataset
In this section, you will explore and perform quality checks on the dataset. You will check what your data shape is, as well as its data types, any missing/NaN values, how many feature columns you have, and what each column represents. Let's start by loading the data and exploring it:
In [30]: from sklearn.datasets import load_boston dataset = load_boston() samples,label, feature_names = dataset.data , dataset.target , dataset.feature_names In [31]: samples.shape Out[31]: (506, 13) In [32]: label.shape Out[32]: (506,) In [33]: feature_names Out[33]: array(['CRIM', 'ZN', 'INDUS', 'CHAS', 'NOX', 'RM', 'AGE', 'DIS', 'RAD', 'TAX', 'PTRATIO', 'B', 'LSTAT'], dtype='<U7')
In the preceding code, you load the dataset and parse the attributes of your dataset. This shows us that we have 506
samples with 13
features and that we have 506
labels (regression targets). If you want to read the dataset's description, you can use print...