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] OWContinuize: Fix treatment of continuous features. #4806

Merged
merged 1 commit into from
May 22, 2020

Conversation

thocevar
Copy link
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

@@ -242,7 +242,7 @@ def needs_dist(var, mtreat, ctreat):
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
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
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

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