简体   繁体   English

在海底散点图中显示相关值

[英]displaying correlation values in seaborn scatter plots

I'm using seaborn's lmplot/regplot to visualize scatter plots. 我正在使用seaborn的lmplot / regplot可视化散点图。 I want to be able to look at the scatter plots and visually see if there is a "significant" relationship between x and y. 我希望能够查看散点图,并直观地查看x和y之间是否存在“重要”关系。 Labeling the regression line with its correlation value (ie, pearson's r), and/or its slope and significance, would be perfect. 用相关值(例如,皮尔逊的r)和/或其斜率和重要性标记回归线将是完美的。 I don't think this can be eye-balled from the the confidence intervals automatically displayed around the regression lines. 我不认为从回归线周围自动显示的置信区间可以看出这一点。

If you really want this the jointplot function will add correlation information , but it's not in lmplot for two reasons. 如果您确实希望这样做,则jointplot函数将添加相关性信息 ,但是出于两个原因,它不在lmplot中。 First, I think it's distracting and one should focus on understanding the relationship visually rather than relying on the crutch of ap value. 首先,我认为这很分散注意力,应该着重于从视觉上理解这种关系,而不是依赖于ap价值的拐杖。 Second, lmplot is meant to be (or is often) used with multiple variables where the fit statistic is undefined in the sense that you might want to know how well the full model fits the data or how well the model fits when conditioned on various other variables. 其次, lmplot旨在(或经常)与多个变量一起使用,在这些变量中,拟合统计量是未定义的,从某种意义上来说,您可能想知道完整模型对数据的拟合程度或在以其他条件为条件的情况下模型的拟合程度变量。 Moreover, an R^2 for a "full" model fit wouldn't actually correspond to what you see in the plot, where relationships are conditioned on different levels of the variables but do not show partial regressions with the other levels. 此外,“完全”模型拟合的R ^ 2实际上不会与您在图中看到的相对应,该图中关系以变量的不同级别为条件,但不显示与其他级别的部分回归。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM