mkt¶
In [ ]:
mkt(vdf,
column: str,
ts: str,
alpha: float = 0.05)
Mann-Kendall test (time series trend).
⚠ Warning: This test is computationally expensive because it uses a CROSS JOIN, the complexity of which is O(n * k), where n is the total count of the vDataFrame and k the number of rows with which to perform the test.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
vdf | vDataFrame | ❌ | Input vDataFrame. |
column | str | ❌ | Input vcolumn to test. |
ts | str | ❌ | vcolumn used as timeline. It will be to use to order the data. It can be a numerical or type date like (date, datetime, timestamp...) vcolumn. |
alpha | float | ✓ | Significance Level. Probability to accept H0. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [107]:
from verticapy import *
texas = vDataFrame("Texas")
texas["cases"].plot(ts = "date")
In [108]:
from verticapy.stats import mkt
mkt(texas,
column = "cases",
ts = "date")
Out[108]:
