Seaborn: regplot: support confidence intervals with lowess model

Created on 11 May 2015  路  5Comments  路  Source: mwaskom/seaborn

Current regplot behavior when lowess=True is to ignore the confidence interval (ci) and bootstrap (n_boot) keyword arguments (example below):

sns.regplot('obs', 'mod', data=data, lowess=True, ci=95, n_boot=1000)

Any thoughts on making it possible to bootstrap the lowess model?

question wishlist

Most helpful comment

Hello:
First of all I would like to congratulate the authors on a wonderful library.
May I ask, what your plans regarding this question is?
I am using the most uptodate seaborn version through conda.
Thanks again for a beautiful tool,
Markus

All 5 comments

Hello:
First of all I would like to congratulate the authors on a wonderful library.
May I ask, what your plans regarding this question is?
I am using the most uptodate seaborn version through conda.
Thanks again for a beautiful tool,
Markus

Is there interest in adding the confidence intervals to the lowess fits? I find them informative when looking at data. In the past, I have used the skmisc.loess library to achieve this, but it would be nice to incorporate it into seaborn. After digging around in the issues, it seems like this hasn't been incorporated because of slow performance in boot strapping in statsmodels.

Bootstrapping the loess fits was not performant enough in the testing that was done when this came up previously.

I would strongly prefer not to add another dependency, so the best path forward would be to incorporate the confidence interval code from that library into statsmodels.

Another possibility would be to add smooth regression using statsmodels GAMs rather than loess.

That makes sense to me. I will look into those options and can open this up again if I find any useful.

See also some related comments here: https://github.com/mwaskom/seaborn/issues/2351

Any path forward on lowess/smoothfit improvements will likely take the form of a new dedicated function that makes it easier to parameterize and use a different default approach to error bars ... too much packed into regplot at the moment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amelio-vazquez-reina picture amelio-vazquez-reina  路  3Comments

alexpetralia picture alexpetralia  路  3Comments

btyukodi picture btyukodi  路  3Comments

stonebig picture stonebig  路  4Comments

amelio-vazquez-reina picture amelio-vazquez-reina  路  4Comments