Age | Commit message (Collapse) | Author |
|
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.
|
|
* gn3/computations/correlations2.py: Remove import of reduce from functools.
(__items_with_values): Reimplement using list comprehension.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Fix a myriad of issues caught by pylint to ensure the code passes all tests.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* Implement the correlation computation function, such that it passes the
tests created previously.
|
|
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi
* .gitignore: ignore emacs temporary files
* gn3/computations/correlations2.py: add a dummy function
* tests/unit/computations/test_correlation.py: add unit tests for the function
As part of the move of the clustering and heatmap code over from GN1 to GN3,
this commit begins by providing some unit tests for the correlation function
used to ensure that the implementation that is built up here corresponds,
and produces the same results as the original.
This tests and the function might change in the new system, but for now, we
try and maintain bug-to-bug compatibility.
|