Python for Machine Learning | Visualize Iris Data with Seaborn and Matplotlib | Visualisation – P51




[ad_1]

Python for Machine Learning | Visualize Iris Data with Seaborn and Matplotlib | Visualisation – P51

Visualize Iris Dataset with Seaborn and Matplotlib

Link for Github Repository – https://github.com/technologycult/PythonForMachineLearning/tree/master/Part51

Topics to be Covered –
1. Seaborn lmplot for plotting linear regression.
2. Generate a residual plot.
3. Generate a Scatter plot.
4. Plot a linear regression between the variables of iris dataset by specifing the hue.
5. Plot a linear regression between the variables of iris dataset grouped by row-wise.
6. Make a striplot of SL, SW and PL, PW grouped by Species.
7. Generate a swarmplot.
8. Generate a Violin plot
9. Generate a joint plot
10. Pairwise joint Distribution
11. Pairwise joint Distribution grouped by Species
12. Heatmap
13. Boxplot
14. kdeplot
15. Andrews Curve
16. Radviz.

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

iris = pd.read_csv(‘iris.csv’)

1. Seaborn lmplot for plotting linear regression.

sns.lmplot(x=’SepalLength’,y=’SepalWidth’,data=iris)
sns.lmplot(x=’PetalLength’,y=’PetalWidth’,data=iris)

2. Generate a residual plot.

3. Generate a Scatter plot.

plt.scatter(iris[‘SepalLength’], iris[‘SepalWidth’], label=’iris’, color=’red’,marker = ‘o’)

sns.regplot(x = iris[‘SepalLength’], y =iris[‘SepalWidth’], data = ‘iris’, color=’red’, label = ‘Order 1’, order=1)
sns.regplot(x = iris[‘SepalLength’], y =iris[‘SepalWidth’], data = ‘iris’, color=’blue’, label = ‘Order 2’, order=2)
sns.regplot(x = iris[‘SepalLength’], y =iris[‘SepalWidth’], data = ‘iris’, color=’yellow’, label = ‘Order 3′, order=3)

4. Plot a linear regression between the variables of iris dataset by specifing the hue.
sns.lmplot(x=’SepalLength’,y=’SepalWidth’,data=iris,hue=’Species’, palette=’Set1′)

5. Plot a linear regression between the variables of iris dataset grouped by row-wise.
sns.lmplot(x=’SepalLength’,y=’SepalWidth’,data=iris,row=’Species’)

6. Make a striplot of SL, SW and PL, PW grouped by Species.
plt.subplot(2,2,1)
sns.stripplot(x=’Species’,y=’SepalLength’,data=iris)

plt.subplot(2,2,2)
sns.stripplot(x=’Species’,y=’SepalWidth’,data=iris, jitter = True, size=4)

7. Generate a swarmplot.
sns.swarmplot(x=’Species’, y = ‘SepalWidth’, data=iris)
sns.swarmplot(x=’Species’, y = ‘SepalLength’, data=iris)

8. Generate a Violin plot
sns.violinplot(x=’Species’, y = ‘SepalWidth’, data=iris)

9. Generate a joint plot
sns.jointplot(x=’SepalLength’, y = ‘SepalWidth’, data=iris)

10. Pairwise joint Distribution
sns.jointplot(x=’SepalLength’, y = ‘SepalWidth’, data=iris, kind=’resid’)

11. Pairwise joint Distribution grouped by Species

sns.pairplot(iris)

sns.residplot(x = iris[‘SepalLength’], y =iris[‘SepalWidth’], color=’red’)
sns.residplot(x = iris[‘PetalLength’], y =iris[‘PetalWidth’], color=’red’)

All Playlist of this youtube channel
====================================

1. Data Preprocessing in Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPuOjFcbnXLFvSQaHFK3ymUW

2. Confusion Matrix in Machine Learning, ML, AI
https://www.youtube.com/playlist?list=PLE-8p-CwnFPvXzvsEcgb0IZtNsw_0vUzr

3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
https://www.youtube.com/playlist?list=PLE-8p-CwnFPsBCsWwz_BvbZZHIVQ6wSZK

4. Cross Validation, Sampling, train test split in Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPsHtol5WXHhq_B3kQPggHH2

5. Drop and Delete Operations in Python Pandas
https://www.youtube.com/playlist?list=PLE-8p-CwnFPtvqVVK7QVFsMvDvp2YgCnR

6. Matrices and Vectors with python
https://www.youtube.com/playlist?list=PLE-8p-CwnFPsndwnZnL7nXW5mIrdRmgdg

7. Detect Outliers in Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPvyCX35yES5D9W7vThiUzwk

8. TimeSeries preprocessing in Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPv10bru3719xzDNIgbO6hXA

9. Handling Missing Values in Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPvOec0LZ40Bt8OQcbLFa236

10. Dummy Encoding Encoding in Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPvu7YriqMZsL9UDbqUUk90x

11. Data Visualisation with Python, Seaborn, Matplotlib
https://www.youtube.com/playlist?list=PLE-8p-CwnFPuYBYsmbfMjROOCzKjCwyMH

12. Feature Scaling in Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPtwpVV3FwzwYZYR5hT3i52G

13. Python 3 basics for Beginner
https://www.youtube.com/playlist?list=PLE-8p-CwnFPu-jseUMtc4i47jQZN4PNbf

14. Statistics with Python
https://www.youtube.com/playlist?list=PLE-8p-CwnFPta0COlxS6E5u14m5ouzbRU

15. Sklearn Scikit Learn Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPtAGb29r8F7up9ilZUXt3l1

16. Python Pandas Dataframe Operations
https://www.youtube.com/playlist?list=PLE-8p-CwnFPv_63lkT_Tztiwknv_zGTNy

17. Linear Regression, Supervised Machine Learning
https://www.youtube.com/playlist?list=PLE-8p-CwnFPslDi6sfFbFK4KXcVlLwaOM

Source


[ad_2]

Comment List

  • MachineLearning with Python
    December 1, 2020

    in any of your video, no use is mentioned

  • MachineLearning with Python
    December 1, 2020

    Sir in Jupyter iam getting Module Error like " no module for pandas.tools" so andrews curve as well as radviz curve didnt executed

  • MachineLearning with Python
    December 1, 2020

    Please put the source code for all lessons in guthub. This will help the learners

Write a comment