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

rand score instead of accuracy #861

Closed Farnazmdi closed 3 years ago

Farnazmdi commented 3 years ago

balanced_accuracy_score is now replaced with rand_score. The function permute_states() does the state switching and is called inside the Results(). I included some of JC's edits from the other PR into this to avoid conflicts as we were working on the same files. I have not written a test function yet, but I am sure that the functions are working fine. I created some of the figures myself and saw the performance. I wanted to ask JC to recreate all of the figures after we merge this. Please let me know if it is alright to do that or you want figures recreated in this PR.

Thank you.

codecov[bot] commented 3 years ago

Codecov Report

Merging #861 (822f953) into master (fc5491e) will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #861      +/-   ##
==========================================
+ Coverage   74.09%   74.14%   +0.04%     
==========================================
  Files          24       24              
  Lines        1915     1907       -8     
==========================================
- Hits         1419     1414       -5     
+ Misses        496      493       -3     
Flag Coverage Δ
unittests 74.14% <100.00%> (+0.04%) :arrow_up:

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

Impacted Files Coverage Δ
lineage/tHMM.py 98.03% <ø> (ø)
lineage/Analyze.py 86.04% <100.00%> (+0.94%) :arrow_up:
lineage/tests/test_Viterbi.py 100.00% <100.00%> (ø)
lineage/tests/test_tHMM.py 100.00% <100.00%> (ø)
lineage/states/stateCommon.py 93.93% <0.00%> (+1.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fc5491e...822f953. Read the comment docs.

Farnazmdi commented 3 years ago

Oh.. you are right.. I was going to ask JC to rebuild the figures, but I can just remove them and they will be built!! Thanks, will do right away.

Farnazmdi commented 3 years ago

I also updated the figures.

aarmey commented 3 years ago

Remind me, what is the benefit of committing all the svg files?

Farnazmdi commented 3 years ago

Remind me, what is the benefit of committing all the svg files?

Just that the manuscript is updated. I can download them separately and put them in a file for resubmission.

Farnazmdi commented 3 years ago

@aarmey do you mind taking a look at this error in the tests? I thought it would create the cache folder each time.. image

aarmey commented 3 years ago

Don't know why it's failing. I just removed the mypy check for now.

Farnazmdi commented 3 years ago

Some changes.

In Fig. S1, why are k, theta, and p in a different font from the rest of the text? Also, it seems strange to have "Random Index Accuracy" as the title when it is the y-axis. The title can be "State Assignment Accuracy" and the y-axis "Random Index Accuracy".

They are addressed now. For the fonts, I made Arial the default font, so I guess it should be fixed. Thank you.

aarmey commented 3 years ago

Merging!