Discover more from Daily Dose of Data Science
Polynomial Linear Regression Plot Made Easy With Seaborn
While creating scatter plots, one is often interested in displaying a linear regression (simple or polynomial) fit on the data points.
Here, training a model and manually embedding it in the plot can be a tedious job to do.
Instead, with Seaborn's 𝗹𝗺𝗽𝗹𝗼𝘁(), you can add a regression fit to a plot, without explicitly training a model.
Specify the degree of the polynomial as the "𝗼𝗿𝗱𝗲𝗿" parameter. Seaborn will add the corresponding regression fit on the scatter plot.
Read more here: Seaborn Docs.
Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (250+ pages) with 200+ tips.
I like to explore, experiment and write about data science concepts and tools. You could connect with me on LinkedIn.