Skip to content

Feature Statistics: Fix sorting#5331

Merged
ajdapretnar merged 1 commit intobiolab:masterfrom
janezd:featurestatistics-order
Mar 15, 2021
Merged

Feature Statistics: Fix sorting#5331
ajdapretnar merged 1 commit intobiolab:masterfrom
janezd:featurestatistics-order

Conversation

@janezd
Copy link
Contributor

@janezd janezd commented Mar 11, 2021

Issue

Fixes #5329. At least I think so. After tinkering with a number of glitches, I'm no longer sure what fixed it.

Description of changes
  1. Put categorical variables at the bottom, because they are less interesting for this widget. But in particular, put them at the bottom when sorting by min and max, because these values don't apply to them.
  2. Sorting by variable names didn't work because the result of argsort can be used for indexing, not sorting. However, calling argsort twice computes the inverse permutation.
  3. Ensure stable order also when sorting by single number in descending order. The code used to invert the stable order. :)
  4. Use ascending, not descending order by default.

These changes, at least the last one, breaks the tests. I'm gonna fix them when we confirm the changes.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd force-pushed the featurestatistics-order branch from 86cee19 to 251acaf Compare March 12, 2021 09:30
@codecov
Copy link

codecov bot commented Mar 12, 2021

Codecov Report

Merging #5331 (251acaf) into master (69e580d) will decrease coverage by 0.01%.
The diff coverage is 63.63%.

@@            Coverage Diff             @@
##           master    #5331      +/-   ##
==========================================
- Coverage   85.35%   85.34%   -0.02%     
==========================================
  Files         301      301              
  Lines       62035    62039       +4     
==========================================
- Hits        52950    52946       -4     
- Misses       9085     9093       +8     

@ajdapretnar ajdapretnar merged commit 4f4fac8 into biolab:master Mar 15, 2021
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.

Feature Statistics: order of variables

2 participants