meyer-lab / tHMM

A general Python framework for using hidden Markov models on binary trees or cell lineage trees.
https://asmlab.org
MIT License
10 stars 1 forks source link

cross validation additions #940

Closed Farnazmdi closed 2 years ago

Farnazmdi commented 2 years ago

This branch is purely edits related to cross validation.

codecov[bot] commented 2 years ago

Codecov Report

Merging #940 (1775de6) into master (67901c7) will increase coverage by 1.78%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #940      +/-   ##
==========================================
+ Coverage   80.92%   82.71%   +1.78%     
==========================================
  Files          28       28              
  Lines        2202     2239      +37     
==========================================
+ Hits         1782     1852      +70     
+ Misses        420      387      -33     
Flag Coverage Δ
unittests 82.71% <100.00%> (+1.78%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lineage/Viterbi.py 100.00% <ø> (ø)
lineage/Analyze.py 87.91% <100.00%> (+1.24%) :arrow_up:
lineage/UpwardRecursion.py 100.00% <100.00%> (ø)
lineage/crossval.py 100.00% <100.00%> (ø)
lineage/states/StateDistributionGaPhs.py 96.33% <100.00%> (ø)
lineage/states/StateDistributionGamma.py 95.10% <100.00%> (+6.99%) :arrow_up:
lineage/tests/test_CrossVal.py 100.00% <100.00%> (ø)
lineage/tHMM.py 97.00% <0.00%> (+1.00%) :arrow_up:
lineage/states/stateCommon.py 71.42% <0.00%> (+1.29%) :arrow_up:
... and 2 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Farnazmdi commented 2 years ago

@aarmey For the unit tests, I only used synthetic data and figure 19 now is a kind of benchmarking for the cross validation with synthetic data: image I committed it because it takes more than 30 minutes to build. Something is fundamentally different between synthetic and experimental data and causes the Emission likelihood to be all zeros for some lineages and I will try to figure out what it is in another branch. Also, I think I know how to implement your suggestion about using probabilities of cells belonging to each state for cross validation, I will do that in another branch, too. If you agree with these changes, it should be ready to merge.

aarmey commented 2 years ago

@Farnazmdi let me know how this works with the experimental data.