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

Bag of Words: add option to show bow features #499

Merged
merged 2 commits into from
Feb 17, 2020

Conversation

ajdapretnar
Copy link
Collaborator

Issue

Fixes #498.

Description of changes

Add a checkbox to set 'hidden' attribute of attributes to True. Added to the base widget, so now both Bag of Words and SimHash use this option.

Includes
  • Code changes
  • Tests
  • Documentation

@nikicc
Copy link
Contributor

nikicc commented Feb 14, 2020

Codecov Report

Merging #499 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage   63.00%   63.02%   +0.02%     
==========================================
  Files          59       59              
  Lines        6265     6293      +28     
  Branches      823      828       +5     
==========================================
+ Hits         3947     3966      +19     
- Misses       2180     2188       +8     
- Partials      138      139       +1     

@codecov-io
Copy link

Codecov Report

Merging #499 into master will increase coverage by 0.02%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage      63%   63.02%   +0.02%     
==========================================
  Files          59       59              
  Lines        6265     6293      +28     
  Branches      823      828       +5     
==========================================
+ Hits         3947     3966      +19     
- Misses       2180     2188       +8     
- Partials      138      139       +1

@nikicc
Copy link
Contributor

nikicc commented Feb 14, 2020

Codecov Report

Merging #499 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage   63.00%   63.02%   +0.02%     
==========================================
  Files          59       59              
  Lines        6265     6293      +28     
  Branches      823      828       +5     
==========================================
+ Hits         3947     3966      +19     
- Misses       2180     2188       +8     
- Partials      138      139       +1     

@codecov-io
Copy link

codecov-io commented Feb 17, 2020

Codecov Report

Merging #499 into master will increase coverage by 0.67%.
The diff coverage is 88%.

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage      63%   63.67%   +0.67%     
==========================================
  Files          59       59              
  Lines        6265     6296      +31     
  Branches      823      827       +4     
==========================================
+ Hits         3947     4009      +62     
+ Misses       2180     2152      -28     
+ Partials      138      135       -3

@ajdapretnar
Copy link
Collaborator Author

ajdapretnar commented Feb 17, 2020

I fixed the changing input.
But...
How did this test pass in the first place:

def test_hide_attributes(self):
        self.send_signal("Corpus", self.corpus)
        new_corpus = self.get_output("Corpus")
        self.assertTrue(all(f.attributes['hidden'] for f in
                            new_corpus.domain.attributes))
        self.widget.controls.hidden_cb.setChecked(False)
        self.assertFalse(all(f.attributes['hidden'] for f in
                            new_corpus.domain.attributes))

Comment on lines 22 to 23
self.assertFalse(all(f.attributes['hidden'] for f in
self.get_output("Corpus").domain.attributes))
Copy link
Collaborator

Choose a reason for hiding this comment

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

any would fit better here -- in this case, it does not make difference but is more correct - just in case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@nikicc
Copy link
Contributor

nikicc commented Feb 17, 2020

Codecov Report

Merging #499 into master will increase coverage by 0.67%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage   63.00%   63.67%   +0.67%     
==========================================
  Files          59       59              
  Lines        6265     6296      +31     
  Branches      823      827       +4     
==========================================
+ Hits         3947     4009      +62     
+ Misses       2180     2152      -28     
+ Partials      138      135       -3     

@PrimozGodec
Copy link
Collaborator

That is good now. Thanks. :)

@PrimozGodec PrimozGodec merged commit 9180817 into biolab:master Feb 17, 2020
@ajdapretnar ajdapretnar deleted the unhide-bow-attr branch January 21, 2021 12:55
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.

Bag of Words: add option to disable hiding attributes
4 participants