- Python Data Science Tutorial
- Python Data Science - Home
- Python Data Science - Getting Started
- Python Data Science - Environment Setup
- Python Data Science - Pandas
- Python Data Science - Numpy
- Python Data Science - SciPy
- Python Data Science - Matplotlib
- Python Data Processing
- Python Data Operations
- Python Data cleansing
- Python Processing CSV Data
- Python Processing JSON Data
- Python Processing XLS Data
- Python Relational databases
- Python NoSQL Databases
- Python Date and Time
- Python Data Wrangling
- Python Data Aggregation
- Python Reading HTML Pages
- Python Processing Unstructured Data
- Python word tokenization
- Python Stemming and Lemmatization
- Python Data Visualization
- Python Chart Properties
- Python Chart Styling
- Python Box Plots
- Python Heat Maps
- Python Scatter Plots
- Python Bubble Charts
- Python 3D Charts
- Python Time Series
- Python Geographical Data
- Python Graph Data
Python - Correlation
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 correlation 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 correlation 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 −
Advertisements