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

[MRG] MAINT sync/add support sample_weight with liblinear #15038

Merged

Conversation

@glemaitre
Copy link
Contributor

glemaitre commented Sep 20, 2019

Add support for sample_weight for the loss/penalty in liblinear.

Hopefully it will close:
closes #10873
closes #15018

glemaitre added 6 commits Sep 20, 2019
@glemaitre glemaitre changed the title [WIP] MAINT sync/add support sample_weight with liblinear [MRG] MAINT sync/add support sample_weight with liblinear Sep 20, 2019
glemaitre added 2 commits Sep 20, 2019
@glemaitre glemaitre added this to WAITING FOR REVIEW in Guillaume's pet Sep 20, 2019
@glemaitre

This comment has been minimized.

Copy link
Contributor Author

glemaitre commented Sep 20, 2019

@amueller you might want to have a look at that

Copy link
Member

adrinjalali left a comment

Not a complete review, but looks pretty good.

sklearn/svm/src/liblinear/linear.cpp Outdated Show resolved Hide resolved
sklearn/svm/src/liblinear/linear.cpp Show resolved Hide resolved
sklearn/svm/src/liblinear/linear.cpp Show resolved Hide resolved
sklearn/svm/src/liblinear/linear.cpp Show resolved Hide resolved
glemaitre added 2 commits Oct 2, 2019
@adrinjalali adrinjalali self-assigned this Oct 4, 2019
@glemaitre

This comment has been minimized.

Copy link
Contributor Author

glemaitre commented Oct 22, 2019

@adrinjalali any other comments?

Copy link
Member

jnothman left a comment

I can confirm the tests fail in master...

Copy link
Member

adrinjalali left a comment

nits, otherwise, as far as I can tell, this looks good.

sklearn/svm/tests/test_svm.py Show resolved Hide resolved
Copy link
Member

jnothman left a comment

I've checked the C code looks reasonably safe.... and that the tests are valid... I'd do better to compare to upstream, but I'm okay to see this merged.

@adrinjalali

This comment has been minimized.

Copy link
Member

adrinjalali commented Oct 24, 2019

Just realized this kinda needs a whats_new entry.

doc/whats_new/v0.22.rst Outdated Show resolved Hide resolved
glemaitre and others added 3 commits Oct 25, 2019
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>
@NicolasHug NicolasHug merged commit 2b60d32 into scikit-learn:master Oct 25, 2019
19 checks passed
19 checks passed
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: C/C++ 1 new alert
Details
LGTM analysis: Python No new or fixed alerts
Details
ci/circleci: deploy Your tests passed on CircleCI!
Details
ci/circleci: doc Your tests passed on CircleCI!
Details
ci/circleci: doc artifact Link to 0/doc/_changed.html
Details
ci/circleci: doc-min-dependencies Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 96.33%)
Details
codecov/project 97.2% (+0.87%) compared to 846e6a3
Details
scikit-learn.scikit-learn Build #20191025.4 succeeded
Details
scikit-learn.scikit-learn (Linux py35_conda_openblas) Linux py35_conda_openblas succeeded
Details
scikit-learn.scikit-learn (Linux py35_ubuntu_atlas) Linux py35_ubuntu_atlas succeeded
Details
scikit-learn.scikit-learn (Linux pylatest_conda_mkl) Linux pylatest_conda_mkl succeeded
Details
scikit-learn.scikit-learn (Linux pylatest_pip_openblas_pandas) Linux pylatest_pip_openblas_pandas succeeded
Details
scikit-learn.scikit-learn (Linux32 py35_ubuntu_atlas_32bit) Linux32 py35_ubuntu_atlas_32bit succeeded
Details
scikit-learn.scikit-learn (Windows py35_pip_openblas_32bit) Windows py35_pip_openblas_32bit succeeded
Details
scikit-learn.scikit-learn (Windows py37_conda_mkl) Windows py37_conda_mkl succeeded
Details
scikit-learn.scikit-learn (macOS pylatest_conda_mkl) macOS pylatest_conda_mkl succeeded
Details
@NicolasHug

This comment has been minimized.

Copy link
Contributor

NicolasHug commented Oct 25, 2019

Thanks @glemaitre !

@glemaitre glemaitre moved this from WAITING FOR REVIEW to WAITING FOR CONSENSUS in Guillaume's pet Oct 25, 2019
@glemaitre glemaitre moved this from WAITING FOR CONSENSUS to MERGED in Guillaume's pet Oct 25, 2019
@amueller

This comment has been minimized.

Copy link
Member

amueller commented Oct 28, 2019

Sweet!

@csbrown

This comment has been minimized.

Copy link

csbrown commented Dec 2, 2019

Is this functionality in any of the stable sklearn releases? What should I upgrade to?

@NicolasHug

This comment has been minimized.

Copy link
Contributor

NicolasHug commented Dec 2, 2019

Not yet. The new release should be out this week

@csbrown

This comment has been minimized.

Copy link

csbrown commented Dec 2, 2019

Also, would anyone be keen on updating the old docs to mention the fact that sample_weight does nothing at all?

@glemaitre

This comment has been minimized.

Copy link
Contributor Author

glemaitre commented Dec 2, 2019

Also, would anyone be keen on updating the old docs to mention the fact that sample_weight does nothing at all?

Since this is a bug, it would be better to backport the fix. But we will probably release tomorrow, not sure that it would be worth.

samj1912 added a commit to samj1912/scikit-learn that referenced this pull request Dec 12, 2019
With the latest release of sklearn, we have merged scikit-learn#15038
which officially adds support for sample weights to these models. Let's update the docs to reflect this.
samj1912 added a commit to samj1912/scikit-learn that referenced this pull request Dec 12, 2019
With the latest release of sklearn, we have merged scikit-learn#15038
which officially adds support for sample weights to these models. Let's update the docs to reflect this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
6 participants
You can’t perform that action at this time.