7
$\begingroup$

Seaborn library in python suggests to use either lmplot or regplot to visualise a regression between two variables. What is the difference between the two plots ? The result I was able to get are slightly different but I have no idea why !

$\endgroup$
6
$\begingroup$

regplot() performs a simple linear regression model fit and plot. lmplot() combines regplot() and FacetGrid.

The FacetGrid class helps in visualizing the distribution of one variable as well as the relationship between multiple variables separately within subsets of your dataset using multiple panels.

lmplot() is more computationally intensive and is intended as a convenient interface to fit regression models across conditional subsets of a dataset.

You can research this comparison for yourself in the seaborn docs for regplot(), lmplot(), and FacetGrid to see which function will meet your needs.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.