Skip to content

[FIX] OWContinuize: Fix treatment of continuous features.#4806

Merged
janezd merged 1 commit intobiolab:masterfrom
thocevar:continuize
May 22, 2020
Merged

[FIX] OWContinuize: Fix treatment of continuous features.#4806
janezd merged 1 commit intobiolab:masterfrom
thocevar:continuize

Conversation

@thocevar
Copy link
Copy Markdown
Contributor

@thocevar thocevar commented May 22, 2020

Issue

Fixes #4801. Probably caused by #4466.

Description of changes

Continuous treatments were identified in two ways, by enums Continuize and a newly introduced Normalize. However, Continuize.Leave does not match with Normalize.Leave, which was the source of problems.

All continuous treatments are now defined by OWContinuize.Normalize.

Includes
  • Code changes
  • Tests
  • Documentation

for var, needs_dist in zip(domain.attributes, attr_needs_dist)]
newclass = [continuize_var(var,
next(dist_iter) if needs_dist else None,
class_treatment, Continuize.Remove)
Copy link
Copy Markdown
Contributor Author

@thocevar thocevar May 22, 2020

Choose a reason for hiding this comment

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

I can't find a reason for this Continuize.Remove.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It doesn't hurt to give the value explicitly, either...

@codecov
Copy link
Copy Markdown

codecov bot commented May 22, 2020

Codecov Report

Merging #4806 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4806      +/-   ##
==========================================
- Coverage   83.99%   83.98%   -0.02%     
==========================================
  Files         281      276       -5     
  Lines       56877    56070     -807     
==========================================
- Hits        47775    47088     -687     
+ Misses       9102     8982     -120     

@janezd janezd merged commit a0381fb into biolab:master May 22, 2020
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.

Continuize ValueError: Need a distribution or data.

2 participants