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

[FIX] score.FCBF: don't segfault on continuous variables w/ <0 values #2355

Merged
merged 1 commit into from
Jun 9, 2017

Conversation

kernc
Copy link
Contributor

@kernc kernc commented May 30, 2017

Issue

Fixes #1916

Description of changes

Previously, FCBF always computed contingency as if the variable were discrete. Now uses Orange's Discrete contingency, which discretizes as necessary.
This should, hopefully, also fix segfault on OSX when all values are missing.

Includes
  • Code changes
  • Tests
  • Documentation

Previously, FCBF always computed contingency as if the variable
was discrete. Now uses Orange's Discrete contingency, which discretizes
as necessary.
This should, hopefully, also fix segfault on OSX when all values are
missing.
@@ -129,5 +129,13 @@ def test_fcbf(self):
scorer = FCBF()
weights = scorer(self.zoo, None)
found = [self.zoo.domain[attr].name for attr in reversed(weights.argsort()[-5:])]
reference = ['legs', 'backbone', 'toothed', 'hair', 'aquatic']
reference = ['legs', 'milk', 'toothed', 'feathers', 'backbone']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This better now. 😉 👍

@codecov-io
Copy link

Codecov Report

Merging #2355 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2355      +/-   ##
==========================================
- Coverage   73.29%   73.28%   -0.01%     
==========================================
  Files         317      317              
  Lines       55474    55473       -1     
==========================================
- Hits        40658    40655       -3     
- Misses      14816    14818       +2

@nikicc nikicc added this to the 3.4.3 milestone Jun 2, 2017
@kernc kernc assigned janezd and astaric and unassigned ales-erjavec Jun 2, 2017
@nikicc nikicc removed this from the 3.4.3 milestone Jun 3, 2017
@janezd janezd merged commit 1dfb316 into biolab:master Jun 9, 2017
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.

FCBC Score segfaults
6 participants