What a compliment -- thank you! Glad to hear you enjoyed my series. Seaborn definitely has a lot to offer, and the great thing is that you can use most matplotlib commands to customize seaborn plots, too!
Sensational, congratulations for the video, it was sensational...! A question please! I wanted to use this library to capture statistics from a Wi-Fi card of a Raspberry version 4, model B, and generate graphics, simulating the "In-band Network Telemetry" protocol, is it possible? Thanks.
Hi kimberly, great video! Amazing! Would you like to get the slope and linear coefficients from the kind='reg' option in sns.pairplot? Congratulations on the excellent content.
You can pass a list of column names that you WOULD like to plot to the vars keyword. Or if you just want to exclude one column, you could do something like sns.pairplot(df.drop(columns='col_name')) where df is the name of your dataframe variable and 'col_name' is your column's name as a string.
Hi - I usually start by looking at the seaborn documentation for the specific plot I want to make. For example, here is the documentation for the pairplot: seaborn.pydata.org/generated/seaborn.pairplot.html I also like to look through the full seaborn API reference to learn what different functions are available: seaborn.pydata.org/api.html Finally, whenever something isn't fully clear from the documentation, I read the source code. The entire seaborn library is available on GitHub here with most of the code in the "seaborn" folder: github.com/mwaskom/seaborn
Oh sure! Within the pairplot function you can access the plot_kws and then the line_kws if you just want to update the line color. For example, "sns.pairplot(tips, kind='reg', plot_kws={'line_kws': {'color':'black'}})"
Hi Kimberly: Thanks for such clear explanation. I want to know if we can change the size of axis title and axis value. My Data set has seven parameters so each plot become very small and corresponding axis title and axis value also become very small
Hi there - sure, there are a couple of different things you can try here. First, you could increase the height of your figure if you have a lot of plots; for example, sns.pairplot(df, height=3). The default height is 2.5, so anything larger than that would increase the plot area... but it won't change the font sizes of the titles or axes. To do that, you could add sns.set(font_scale=2) above your figure. That will double the size of all fonts since the default font_scale is 1. This would actually change the rcParams in the backend so all figures you create after this will also have larger fonts.
Hi there -- that's a Jupyter Widget from the ipywidgets library (ipywidgets.readthedocs.io/en/stable/). I have been considering making a video about them, so hopefully that will be coming up eventually. But for now, you can find the code I used to make that specific widget under the "Styling" header on my GitHub page: github.com/kimfetti/Videos/blob/master/Seaborn/12_pairplot.ipynb
Could you please, pleeease explain why in the first hisotgram while calling sns.pairplot(tips) my graph looks totally different? Like, in your version the highest bar reaches over 50, mine is under 20 T_T I've been thinking about this all day long
Hi there - I suspect this is a versioning difference. I just tested out sns.pairplot(tips) with Seaborn version 0.13.1, and the highest bar I got was about 20 for the total_bill figure as well. The difference is probably just how Seaborn (or numpy) does it's default binning for the histograms. If you do something like this: sns.pairplot(tips, diag_kws={'bins': 10}); , you'll see higher bars, too, though not quite as high as mine since the bin locations seem to have shifted a bit as well. TL;DR: you're doing it right; Seaborn just changed!!
@@KimberlyFessel thanks😭 i noticed the y axis aligns with other graphs in the row but not the histogram and read somewhere on stack overflow it had to do with diag-sharey property or sth. I tried to fix that but failed to🥲
Hi Kimberley, thank you for your great videos. Learnt a lot. May I know if there is a way to remove outlier points which affect the regression line in pairplots or pair grids? Thanks in advance!
Yes! You can do this by updating the arguments to plot a "robust regression" for the off-diagonal regplots. Robust regression down-weights the outliers when fitting the regression line. Something like this: sns.pairplot(df, kind='reg', plot_kws={'robust': True, 'n_boot': 100}); I have also decreased the number of bootstraps here because robust regression is significantly more computationally expensive. You can alternatively add 'ci':None if you don't need confidence intervals for the regression lines.
Hi Kimberly. Thank you for this video! Can you show some code for how to load my own data for this kind of plot, from a *.txt or *.csv file, from my computer? The data set is a table of data 26 columns by 49 points with column headers. Thanks.
Glad to hear you figured it out! In case others are also curious, I would likely load the data using pandas. If pandas has been imported using "import pandas as pd", you can load in a csv using df = pd.read_csv(filename) where filename is either a file on your computer in the same directory as your code or is a path to the file. Then df will be a pandas dataframe that you can plot with seaborn. One note of caution: if you have 26 numeric columns, you will likely not want to display all of the data on a pairplot because the individual subplots will be very small. You can pass a list to the pairplot's vars argument to select only certain columns to be plotted. 👍
@@KimberlyFessel , yes it's a bit out of control! LOL. But, being able to see them all is, for me, an important aspect of data mining when you are looking for hidden relationships. Would using the slider widget help in this case, or would it not really help because you are limited by the width of the display area in Jupyter Notebook? Is there away to directly send the plot to a larger frame document, like a PDF?
Thank you for making these videos! They are helping me a lot. Maybe you should try SEO Optimization to rank your videos on top of the youtube recommendations
Hi - this video interprets what each component of the pairplot means and where the data come from. Where you interested in the interpretation we can draw from the pairplot about the underlying dataset? I have been considering making a few videos like that as well!
You’re the best instructor not just for seaborn but for any python library.
thank you so much for this video, i just appreciate good quality content nowadays, you can't find many of them, thank you
So glad you enjoyed it! 😁
Great video! Thank you. I appreciate how clear and concise you content is.
Excellent -- glad you are enjoying my content!
Im starting in the data interpretation world and this video helps me a lot, thank you
just binge watched your hole series. I'm learning matplotlib, but now it looks like that seaborn has a lot to offer. Thanks for this great series :)
What a compliment -- thank you! Glad to hear you enjoyed my series. Seaborn definitely has a lot to offer, and the great thing is that you can use most matplotlib commands to customize seaborn plots, too!
Thank you very much for your detailed videos, looking forward to seeing more videos.
So glad you are enjoying them -- And definitely more to come!
Please make a video for data analysis of the pairplot.
I am so glad I found you. I think I will use you a lot. I am new to data analytics
Effective, efficient, helpful and creative! Thanks for your tutorials!
So glad you like them -- cheers!
This content is amazing! I learn both useful python code AND great visualizations. 👍😄
Way of teaching is very nice😍
thanks @Kimberly for this nice explanation.
Most welcome! Happy to hear you enjoyed my explanation 😄
How to interpret hist plot in the example shown
What exactly it is representing
Sensational, congratulations for the video, it was sensational...! A question please! I wanted to use this library to capture statistics from a Wi-Fi card of a Raspberry version 4, model B, and generate graphics, simulating the "In-band Network Telemetry" protocol, is it possible? Thanks.
I really appreciate the way you are explaining..keep doing it
Super -- will do!
Bring more videos ! Machine learning plz... This content is awesome
Thanks so much for the support! 😄
I learn a lot. Thanks Kimberly...!!!!
I didn't understand the graphs along the diagonal and what they represent.
Hi kimberly, great video! Amazing! Would you like to get the slope and linear coefficients from the kind='reg' option in sns.pairplot? Congratulations on the excellent content.
Really well made video!! Thank You ma'am
what should be put to exclude a column from the dataframe in the pairplot graph? thanks
You can pass a list of column names that you WOULD like to plot to the vars keyword. Or if you just want to exclude one column, you could do something like sns.pairplot(df.drop(columns='col_name')) where df is the name of your dataframe variable and 'col_name' is your column's name as a string.
hey there, how can i learn about inbuilt keyword arguments and functions. where can i check it?
Hi - I usually start by looking at the seaborn documentation for the specific plot I want to make. For example, here is the documentation for the pairplot: seaborn.pydata.org/generated/seaborn.pairplot.html I also like to look through the full seaborn API reference to learn what different functions are available: seaborn.pydata.org/api.html Finally, whenever something isn't fully clear from the documentation, I read the source code. The entire seaborn library is available on GitHub here with most of the code in the "seaborn" folder: github.com/mwaskom/seaborn
Thank you ! Helped me a lot, you are awesome !
So glad to hear this video helped you! You are too kind 😄
with each video I watch. I am falling in love with you❤❤❤❤
Glad to hear you are enjoying the videos - cheers!
Thank you for video!
Hi! Thank you for video! Could you please tell me how to change the color of line in 'reg' kind?
Oh sure! Within the pairplot function you can access the plot_kws and then the line_kws if you just want to update the line color. For example, "sns.pairplot(tips, kind='reg', plot_kws={'line_kws': {'color':'black'}})"
Hi Kimberly: Thanks for such clear explanation. I want to know if we can change the size of axis title and axis value. My Data set has seven parameters so each plot become very small and corresponding axis title and axis value also become very small
Hi there - sure, there are a couple of different things you can try here. First, you could increase the height of your figure if you have a lot of plots; for example, sns.pairplot(df, height=3). The default height is 2.5, so anything larger than that would increase the plot area... but it won't change the font sizes of the titles or axes. To do that, you could add sns.set(font_scale=2) above your figure. That will double the size of all fonts since the default font_scale is 1. This would actually change the rcParams in the backend so all figures you create after this will also have larger fonts.
Hey nice video, how to get that interactive button to increase / decrease teh height
Hi there -- that's a Jupyter Widget from the ipywidgets library (ipywidgets.readthedocs.io/en/stable/). I have been considering making a video about them, so hopefully that will be coming up eventually. But for now, you can find the code I used to make that specific widget under the "Styling" header on my GitHub page: github.com/kimfetti/Videos/blob/master/Seaborn/12_pairplot.ipynb
Could you please, pleeease explain why in the first hisotgram while calling sns.pairplot(tips) my graph looks totally different? Like, in your version the highest bar reaches over 50, mine is under 20 T_T I've been thinking about this all day long
Hi there - I suspect this is a versioning difference. I just tested out sns.pairplot(tips) with Seaborn version 0.13.1, and the highest bar I got was about 20 for the total_bill figure as well. The difference is probably just how Seaborn (or numpy) does it's default binning for the histograms. If you do something like this: sns.pairplot(tips, diag_kws={'bins': 10}); , you'll see higher bars, too, though not quite as high as mine since the bin locations seem to have shifted a bit as well. TL;DR: you're doing it right; Seaborn just changed!!
@@KimberlyFessel thanks😭 i noticed the y axis aligns with other graphs in the row but not the histogram and read somewhere on stack overflow it had to do with diag-sharey property or sth. I tried to fix that but failed to🥲
Hi Kimberley, thank you for your great videos. Learnt a lot. May I know if there is a way to remove outlier points which affect the regression line in pairplots or pair grids? Thanks in advance!
Yes! You can do this by updating the arguments to plot a "robust regression" for the off-diagonal regplots. Robust regression down-weights the outliers when fitting the regression line. Something like this:
sns.pairplot(df, kind='reg', plot_kws={'robust': True, 'n_boot': 100});
I have also decreased the number of bootstraps here because robust regression is significantly more computationally expensive. You can alternatively add 'ci':None if you don't need confidence intervals for the regression lines.
Hi Kimberly. Thank you for this video! Can you show some code for how to load my own data for this kind of plot, from a *.txt or *.csv file, from my computer? The data set is a table of data 26 columns by 49 points with column headers. Thanks.
Figured it out, never mind!
Glad to hear you figured it out! In case others are also curious, I would likely load the data using pandas. If pandas has been imported using "import pandas as pd", you can load in a csv using df = pd.read_csv(filename) where filename is either a file on your computer in the same directory as your code or is a path to the file. Then df will be a pandas dataframe that you can plot with seaborn.
One note of caution: if you have 26 numeric columns, you will likely not want to display all of the data on a pairplot because the individual subplots will be very small. You can pass a list to the pairplot's vars argument to select only certain columns to be plotted. 👍
@@KimberlyFessel , yes it's a bit out of control! LOL.
But, being able to see them all is, for me, an important aspect of data mining when you are looking for hidden relationships. Would using the slider widget help in this case, or would it not really help because you are limited by the width of the display area in Jupyter Notebook? Is there away to directly send the plot to a larger frame document, like a PDF?
Thank you for making these videos! They are helping me a lot. Maybe you should try SEO Optimization to rank your videos on top of the youtube recommendations
So glad these videos have been helpful! And yes, I am definitely working on the SEO -- hopefully will start ranking higher soon. 😄
great work , Thanks a million
Thanks and you are most welcome!
Nicely Explained! Thanks..
Most welcome!
hi, Kim. great video. By the way you look alike Kim Wexler from Better call Saul.
Thanks alot Kimberly
You're very welcome! 👍
Great Content..!!!!
Thanks very much - glad you enjoyed it!
wow, that is the real thing
you helped me
So great to hear that!
Is it possible to hire you to tutor me?
I'm flattered! But I am currently working as a full-time instructor at Metis data science bootcamp. Not taking on private tutoring at this time.
where is interpretation?
Hi - this video interprets what each component of the pairplot means and where the data come from. Where you interested in the interpretation we can draw from the pairplot about the underlying dataset? I have been considering making a few videos like that as well!
@@KimberlyFessel yeah, that's what I want how to interpret the results from the plot.
Looking forward for the video
Thank you.