Pull requests

#17 Open
Repository
has207
Branch
default
Repository
biolab
Branch
default

Add check for std == 0 before dividing.

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update default
hg pull -r default https://bitbucket.org/has207/orange
hg merge 4fba9e301a91
hg commit -m 'Merged in has207/orange (pull request #17)'
Author
  1. has207
Reviewers
Description

Fixes bug reported in http://orange.biolab.si/trac/ticket/1356 where certain datasets end up with a 0 std causing breakage further down the processing pipeline after a NaN is introduced here.

  • Learn about pull requests

Comments (1)

  1. astaric

    Standard deviation is zero when you have constant features in your dataset. You can always turn off the normalization manually.

    To avoid creating NaN-s if you do not however, I would suggest adding something like:

    std[std == 0] = 1.
    

    after line 193, where std is computed. This will avoid divisions by zero, all "normal" features will be normalized and all "constant" features will not be scaled.