如何从Seaborn lmplot()中提取线性模型参数?



是否有一种方法可以提取seaborn.lmplot()适合给定数据集的回归线参数?我已经查阅了文档,但在这方面没有发现任何可以帮助我的东西。

为了说明,我指的不是lmplot()的功能参数,而是y = mx + bm
b

seaborn使用scipy stats linregression,因此您可以直接从那里获得它。

from scipy import stats
slope, intercept, r_value, p_value, std_err = stats.linregress(df.x,df.y)

最新更新