Correlation refers to some statistical relationships involving dependence between two data sets. Simple examples of dependent phenomena include the correlation between the physical appearance of parents and their offspring, and the correlations between the price for a product and its supplied quantity.
We take example of the iris data set available in seaborn python library. In it we try to establish the correlation between the length and the width of the sepals and petals of three species of iris flower. Based on the correlations found, a strong model could be created which easily distinguishes one species from another.
import matplotlib.pyplot as plt import seaborn as sns df = sns.load_dataset('iris') #without regression sns.pairplot(df, kind="scatter") plt.show()
Its output is as follows −
Next Topic:-Click Here
Pingback: Python - P-Value - Adglob Infosystem Pvt Ltd