vDataFrame.corr_pvalue¶
In [ ]:
vDataFrame.corr_pvalue(column1: str,
column2: str,
method: str = "pearson")
Computes the Correlation Coefficient of the two input vcolumns and its pvalue.
Parameters¶
Name | Type | Optional | Description |
---|---|---|---|
column1 | str | ❌ | Input vcolumn. |
column2 | str | ❌ | Input vcolumn. |
method | str | ✓ | Method to use to compute the correlation.
|
In [9]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic)
In [10]:
# Pearson
titanic.corr_pvalue("age", "fare", "pearson")
Out[10]:
In [11]:
# Spearman
titanic.corr_pvalue("age", "fare", "spearman")
Out[11]:
In [12]:
# Kendall: Tau-A
titanic.corr_pvalue("age", "fare", "kendallA")
Out[12]:
In [13]:
# Kendall: Tau-B
titanic.corr_pvalue("age", "fare", "kendallB")
Out[13]:
In [14]:
# Kendall: Tau-C
titanic.corr_pvalue("age", "fare", "kendallC")
Out[14]:
In [15]:
# Biserial Point
titanic.corr_pvalue("survived", "fare", "biserial")
Out[15]:
In [17]:
# Cramer's V
titanic.corr_pvalue("survived", "pclass", "cramer")
Out[17]:
See Also¶
vDataFrame.corr | Computes the Correlation Matrix of the vDataFrame. |