如何在python中找到密度图之间的区域?

我正在阅读有关基于特征密度曲线的特征选择的博客。该博客使用R语言,对此我并不熟悉。

Blog: https://myabakhova.blogspot.com/2016/02/computing-ratio-of-areas.html

该博客说,如果两个特征的密度曲线显着不同(请看下面的等式,即> 0.75),那么我们可以丢弃其中一个特征。

现在,我很熟悉如何绘制密度曲线,但是不确定如何获得相交区域。非常感谢发现交叉口区域的任何帮助。

这是我的尝试:

import numpy as np
import pandas as pd
import seaborn as sns
import scipy

df = sns.load_dataset('iris')
df.head()

sns.distplot(df['sepal_length'],norm_hist=True)
sns.distplot(df['petal_length'],norm_hist=True)

Now, I don't know how to find area under two separate curves and intersection area.

怎么找 -每条曲线下的面积? -重叠部分的面积?

我的输出

enter image description here

供参考,博客密度曲线如下所示

enter image description here