Handling missing data is a big topic of its own. So, let's start seeing this in action. We will use the iris dataset, which we worked with in Chapter 1, Classical Statistical Analysis. The iris dataset has labels corresponding to the species of flowers. Sepal length, sepal width, petal length, and petal width are features, while the species is the target. We will work on the dataset by taking the following steps:
- Let's load in this dataset, which is available with scikit-learn. You've already seen how to load in iris; here is a quick way to get a description of what's in the dataset:
- Now, let's ...