Skip to content
Snippets Groups Projects
Commit 8aba24f9 authored by Le, Mia's avatar Le, Mia
Browse files

added ks test

parent 5da128cc
No related branches found
No related tags found
No related merge requests found
from scipy.stats import kstest
def calculate_ks_p_value(data1, data2):
"""Calculate the Kolmogorov-Smirnoff p-value for two data sets.
Parameters
----------
data1 : array-like
The first data set.
data2 : array-like
The second data set.
Returns
-------
p_value : float
The p-value for the Kolmogorov-Smirnoff test.
"""
return kstest(data1, data2)[1]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment