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

[ENH] Polynomial Regression: Allow fixing the intercept to 0 #95

Merged
merged 8 commits into from
Jul 20, 2021

Conversation

janezd
Copy link
Collaborator

@janezd janezd commented Aug 27, 2020

Issue

Resolves #93 and shows some great love for this venerable old widget.

Requires biolab/orange3#4958, commit biolab/orange3@cb5a551.

Description of changes

See commit messages.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd changed the title [ENH] Polynomial Regression: Allow fixing the intercept to 0 [NOMERGE] [ENH] Polynomial Regression: Allow fixing the intercept to 0 Aug 27, 2020
@@ -324,13 +373,6 @@ def apply(self):
self.Outputs.model.send(predictor)

# Send model coefficents
model = None
if predictor is not None:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This code is moved to an earlier place and the check is changed to if hasattr(predictor, "model"), which covers both None and RegressTo0 (which is new in this code). A bit later, the code expects that predictor is not None. I have not changed this, so if it was broken before, it still is (though we used this widget a lot and no student ever complained).

@PrimozGodec PrimozGodec force-pushed the polyreg-fit-intercept branch from 5016213 to 417533a Compare August 28, 2020 07:52
@janezd janezd force-pushed the polyreg-fit-intercept branch from 417533a to 567bbff Compare November 20, 2020 16:47
@janezd janezd changed the title [NOMERGE] [ENH] Polynomial Regression: Allow fixing the intercept to 0 [ENH] Polynomial Regression: Allow fixing the intercept to 0 Nov 20, 2020
@janezd janezd self-assigned this Feb 26, 2021
@janezd janezd force-pushed the polyreg-fit-intercept branch from 567bbff to 412dbf0 Compare February 26, 2021 08:37
@janezd janezd force-pushed the polyreg-fit-intercept branch from 412dbf0 to 8ba0dc2 Compare July 11, 2021 15:02
@janezd janezd removed their assignment Jul 11, 2021
@janezd janezd force-pushed the polyreg-fit-intercept branch from 8ba0dc2 to 0b0814a Compare July 11, 2021 15:30
@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2021

Codecov Report

Merging #95 (46caeb5) into master (6d4f6fc) will decrease coverage by 0.72%.
The diff coverage is 74.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
- Coverage   87.65%   86.93%   -0.73%     
==========================================
  Files          20       20              
  Lines        2893     2932      +39     
  Branches      351      363      +12     
==========================================
+ Hits         2536     2549      +13     
- Misses        325      342      +17     
- Partials       32       41       +9     
Impacted Files Coverage Δ
...trib/educational/widgets/owpolynomialregression.py 87.68% <74.62%> (-8.95%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d4f6fc...46caeb5. Read the comment docs.

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.

Polynomial regression: Add option to set intercept to 0
3 participants