Skip to content

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

Merged
janezd merged 1 commit intobiolab:masterfrom
kernc:fcbf-dist
Jun 9, 2017
Merged

[FIX] score.FCBF: don't segfault on continuous variables w/ <0 values#2355
janezd merged 1 commit intobiolab:masterfrom
kernc:fcbf-dist

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.
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