Last active
July 4, 2020 12:57
-
-
Save Knk00/934a404be23939b03201e5c4fee07200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.stats import kruskal | |
def seasonality_test(series): | |
seasoanl = False | |
idx = np.arange(len(series.index)) % 12 | |
H_statistic, p_value = kruskal(series, idx) | |
if p_value <= 0.05: | |
seasonal = True | |
return seasonal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment