Skip to content

[FIX] Stop advertising support for weights in LogisticRegression.#1448

Merged
lanzagar merged 2 commits into
biolab:masterfrom
sstanovnik:fix-logreg-weights
Jul 13, 2016
Merged

[FIX] Stop advertising support for weights in LogisticRegression.#1448
lanzagar merged 2 commits into
biolab:masterfrom
sstanovnik:fix-logreg-weights

Conversation

@sstanovnik
Copy link
Copy Markdown
Contributor

The liblinear solver does not support weights in SKL, even though the parameter is there. Override the property to prevent errors.

The liblinear solver does not support weights in SKL, even though the
parameter is there.
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 12, 2016

Current coverage is 87.91%

Merging #1448 into master will decrease coverage by <.01%

@@             master      #1448   diff @@
==========================================
  Files            77         77          
  Lines          7584       7582     -2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           6668       6666     -2   
  Misses          916        916          
  Partials          0          0          

Sunburst

Powered by Codecov. Last updated by 28b7e58...c5d211b

@lanzagar
Copy link
Copy Markdown
Contributor

Since codecov is also complaining, you might want to leave a test for logreg (and the new one with linreg replacing the previous one).

assertFalse(LogisticRegressionLearner().supports_weights, ...)
and maybe also assert that learning with weights would raise the exception (so that the override is justified).

@astaric
Copy link
Copy Markdown
Member

astaric commented Jul 12, 2016

+1 for second assert, this way we will get a failing test if (when) liblinear starts accepting weights.

@lanzagar lanzagar merged commit 7a6c034 into biolab:master Jul 13, 2016
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.

4 participants