Python Scikit-learn: Create a pairplot of the iris data set and check which flower species seems to be the most separable
Python Machine learning Iris Visualization: Exercise-13 with Solution
Write a Python program to create a pairplot of the iris data set and check which flower species seems to be the most separable.
Sample Solution:
Python Code:
# Import necessary modules
import pandas as pd
import seaborn as sns
iris = pd.read_csv("iris.csv")
#Drop id column
iris = iris.drop('Id',axis=1)
sns.pairplot(iris,hue='Species')
Sample Output:
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Next: Write a Python program to find the correlation between variables of iris data. Also create a hitmap using Seaborn to present their relations.What is the difficulty level of this exercise?
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics