The iris data set, mentioned in Section1.1, contains various features, including 'Petal.Length' and 'Sepal.Length', of three species

Question:

The iris data set, mentioned in Section1.1, contains various features, including 'Petal.Length' and 'Sepal.Length', of three species of iris:

setosa, versicolor, and virginica.

(a) Load the data set into a pandas DataFrame object.

(b) Using matplotlib.pyplot, produce boxplots of 'Petal.Length' for each the three species, in one figure.

(c) Make a histogram with 20 bins for 'Petal.Length'.

(d) Produce a similar scatterplot for 'Sepal.Length' against

'Petal.Length' to that of the left plot in Figure 1. 9. Note that the points should be colored according to the 'pecies' feature as per the legend in the right plot of the figure.

(e) Using the kdeplot method of the seaborn package, reproduce the right plot of Figure1. 9, where kernel density plots for 'Petal. Length' are given.

image text in transcribed

Figure 1.9: Left: scatterplot of 'Sepal.Length' against 'Petal.Length'.

Right: kernel density estimates of 'Petal.Length' for the three species of iris.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Data Science And Machine Learning Mathematical And Statistical Methods

ISBN: 9781118710852

1st Edition

Authors: Dirk P. Kroese, Thomas Taimre, Radislav Vaisman, Zdravko Botev

Question Posted: