Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Label subset #3506

Merged
merged 2 commits into from
Jan 4, 2019
Merged

[ENH] Label subset #3506

merged 2 commits into from
Jan 4, 2019

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Dec 27, 2018

Issue

Fixes #3376: subsets are similar to selections, so it would make sense to label the subset data instances, too.

Based on #3500 for faster CI testing, but otherwise unrelated. If reviews are positive, I'll rebase to master so it can be merged.

Description of changes

To keep the GUI simple, this PR does not introduce another checkbox, but just adds subset instances to those that are labelled. Checkbox is renamed from Label only selected points to Label only selection and subset.

out

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd changed the title Label subset [RFC] [ENH] Label subset Dec 27, 2018
@codecov
Copy link

codecov bot commented Dec 27, 2018

Codecov Report

Merging #3506 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3506      +/-   ##
==========================================
+ Coverage   83.51%   83.54%   +0.02%     
==========================================
  Files         367      367              
  Lines       65599    65717     +118     
==========================================
+ Hits        54787    54902     +115     
- Misses      10812    10815       +3

@markotoplak markotoplak changed the title [RFC] [ENH] Label subset [ENH] Label subset Jan 4, 2019
np.logical_and(x >= x0, x <= x1),
np.logical_and(y >= y0, y <= y1))
if self.label_only_selected:
sub_mask = self._filter_visible(self.master.get_subset_mask())
Copy link
Member

Choose a reason for hiding this comment

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

Aaaa, having masks that can be None make the code so ugly... But I did not find a better solution.

Perhaps in the future we could have some helper functions for logical_* where arguments could be None? Or just have masks that are never None?

@markotoplak markotoplak merged commit 25f224f into biolab:master Jan 4, 2019
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