From 9f52d42b9f89cf3b878e5ea67290ab3514503819 Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Wed, 5 Feb 2014 11:31:50 -0600 Subject: On branch master --- wqflask/maintenance/dataset/calculate.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 wqflask/maintenance/dataset/calculate.py diff --git a/wqflask/maintenance/dataset/calculate.py b/wqflask/maintenance/dataset/calculate.py new file mode 100644 index 00000000..6aada827 --- /dev/null +++ b/wqflask/maintenance/dataset/calculate.py @@ -0,0 +1,7 @@ +import scipy.stats + +def correlation(a1, a2): + re = [] + re.append(scipy.stats.pearsonr(a1, a2)) + re.append(scipy.stats.spearmanr(a1, a2)) + return re -- cgit v1.2.3