aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/test_data/metadata.json
diff options
context:
space:
mode:
authorArun Isaac2021-11-11 16:10:35 +0530
committerBonfaceKilz2021-11-11 20:49:30 +0300
commitec1d2180d99e0cde1dc181ee9ed79e86cf1a5675 (patch)
tree61162273cc9b0b75577573b8b2082a1660cb39c1 /tests/unit/test_data/metadata.json
parent4e790f08000825931cb5edec1738d2b7d073f73e (diff)
downloadgenenetwork3-ec1d2180d99e0cde1dc181ee9ed79e86cf1a5675.tar.gz
Reimplement correlations2.compute_correlation using pearsonr.
correlations2.compute_correlation computes the Pearson correlation coefficient. Outsource this computation to scipy.stats.pearsonr. When the inputs are constant, the Pearson correlation coefficient does not exist and is represented by NaN. Update the tests to reflect this. * gn3/computations/correlations2.py: Remove import of sqrt from math. (compute_correlation): Reimplement using scipy.stats.pearsonr. * tests/unit/computations/test_correlation.py: Import math. (TestCorrelation.test_compute_correlation): When inputs are constant, set expected correlation coefficient to NaN.
Diffstat (limited to 'tests/unit/test_data/metadata.json')
0 files changed, 0 insertions, 0 deletions