![python关联](https://i-blog.csdnimg.cn/blog_migrate/214c0e97b0d82d541e6f4beff4a7fc52.png)
python关联
Python-关联 (Python - Correlation)
Correlation refers to some statistical relationships involving dependence between two data sets. Simple examples of dependent phenomena include the correlation between the physical appearance of parents and their offspring, and the correlation between the price for a product and its supplied quantity.
相关性是指涉及两个数据集之间的相关性的一些统计关系。 相关现象的简单例子包括父母及其后代的外表之间的相关性,以及产品价格与其提供的数量之间的相关性。
We take example of the iris data set available in seaborn python library. In it we try to establish the correlation between the length and the width of the sepals and petals of three species of iris flower. Based on the correlation found, a strong model could be created which easily distinguishes one species from another.
我们以seaborn python库中可用的虹膜数据集为例。 我们尝试建立三种鸢尾花的萼片和花瓣的长度和宽度之间的相关性。 根据发现的相关性,可以创建一个易于将一个物种与另一个物种区分开的强大模型。
import matplotlib.pyplot as plt
import seaborn as sns
df = sns.load_dataset('iris')
#without regression
sns.pairplot(df, kind="scatter")
plt.show()
Its output is as follows −
其输出如下-
![corelation.png](https://i-blog.csdnimg.cn/blog_migrate/7f88e9b57cf1f9c13b7e94bbc07a8936.png)
翻译自: https://www.tutorialspoint.com/python_data_science/python_correlation.htm
python关联