Skip to content

Update isolated_labels.py - #368

Merged
danielStrobl merged 5 commits into
mainfrom
danielStrobl-iso-label-fix
Jan 27, 2023
Merged

danielStrobl merged 5 commits into
mainfrom
danielStrobl-iso-label-fix

Conversation

@danielStrobl

Copy link
Copy Markdown
Member

As mentioned in #367, the isolated label metrics do not compute what they should.
By calculating the individual silhouette scores and then taking the mean over only the cells of the cluster, this should be fixed.

@LuckyMD

LuckyMD commented Jan 27, 2023

Copy link
Copy Markdown
Collaborator

I guess you'll need to adapt the tests as well for this.

@LuckyMD LuckyMD left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually this looks correct, if silhouette_samples gives you the silhouette score per cell. See comment above about adding tests.

@codecov

codecov Bot commented Jan 27, 2023

Copy link
Copy Markdown

Codecov Report

Merging #368 (3aa8303) into main (1be0daa) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #368   +/-   ##
=======================================
  Coverage   53.13%   53.13%           
=======================================
  Files          22       22           
  Lines        1848     1848           
=======================================
  Hits          982      982           
  Misses        866      866           
Flag Coverage Δ
unittests 53.13% <100.00%> (ø)

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

Impacted Files Coverage Δ
scib/metrics/isolated_labels.py 94.33% <100.00%> (ø)

@LuckyMD

LuckyMD commented Jan 27, 2023

Copy link
Copy Markdown
Collaborator

Please also adapt the perfect score test

@danielStrobl
danielStrobl merged commit e96da39 into main Jan 27, 2023
@danielStrobl

Copy link
Copy Markdown
Member Author

ah bit too fast

@LuckyMD

LuckyMD commented Jan 27, 2023

Copy link
Copy Markdown
Collaborator

@mumichae could you still review this please?

barlowa124 pushed a commit to barlowa124/scib that referenced this pull request Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants