acore.enrichment_analysis.statistical_tests.kolmogorov_smirnov module#
- run_kolmogorov_smirnov(dist1: list[float], dist2: list[float], alternative: str = 'two-sided') tuple[float, float][source]#
Compute the Kolmogorov-Smirnov statistic on 2 samples. See scipy.stats.ks_2samp
- Parameters:
dist1 (list) – sequence of 1-D ndarray (first distribution to compare) drawn from a continuous distribution
dist2 (list) – sequence of 1-D ndarray (second distribution to compare) drawn from a continuous distribution
alternative (str) – defines the alternative hypothesis (default is ‘two-sided’): * ‘two-sided’ * ‘less’ * ‘greater’
- Returns:
statistic float and KS statistic pvalue float Two-tailed p-value.
Example:
result = run_kolmogorov_smirnov(dist1, dist2, alternative='two-sided')