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+1] Fix semi_supervised #9239

Merged
merged 34 commits into from Jul 3, 2017

Conversation

Projects
None yet
5 participants
@musically-ut
Contributor

musically-ut commented Jun 28, 2017

Closes #3550, #5774, #3758, #6727 and deprecates #9192.

Pinging @jnothman, @boechat107, @MechCoder. Am I forgetting someone?

@jnothman

This comment has been minimized.

Show comment
Hide comment
@jnothman

jnothman Jun 29, 2017

Member
Member

jnothman commented Jun 29, 2017

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jun 29, 2017

Contributor

Just making Travis happy, I think.

Overall, this is a piecemeal effort to fix semi_supervised module as some other issues will remain.
Nevertheless, I believe it is best to fix these first and then take care of the rest in smaller, more contained, PRs:

  • Updating the tutorial for semi_supervised learning.
  • Fixing implementation of kNN kernel #8008.
  • Adding a few more warnings, re: convergence (e.g. if max_iter is reached) and numerical stability (e.g. if an under/overflow occurs during computations).

I'm fixing the flake8 failures as we speak.

Contributor

musically-ut commented Jun 29, 2017

Just making Travis happy, I think.

Overall, this is a piecemeal effort to fix semi_supervised module as some other issues will remain.
Nevertheless, I believe it is best to fix these first and then take care of the rest in smaller, more contained, PRs:

  • Updating the tutorial for semi_supervised learning.
  • Fixing implementation of kNN kernel #8008.
  • Adding a few more warnings, re: convergence (e.g. if max_iter is reached) and numerical stability (e.g. if an under/overflow occurs during computations).

I'm fixing the flake8 failures as we speak.

@musically-ut musically-ut changed the title from [WIP] Fix semi supervised to Fix semi supervised Jun 29, 2017

@ogrisel ogrisel added this to the 0.20 milestone Jun 29, 2017

@ogrisel ogrisel modified the milestones: 0.19, 0.20 Jun 29, 2017

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jun 29, 2017

Contributor

The failure on appveyor was unrelated to the current changes.

Contributor

musically-ut commented Jun 29, 2017

The failure on appveyor was unrelated to the current changes.

@musically-ut musically-ut changed the title from Fix semi supervised to [MRG] Fix semi_supervised Jun 29, 2017

@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Jun 29, 2017

Member

can you please merge master? that should get rid of the appveyor error.

Member

amueller commented Jun 29, 2017

can you please merge master? that should get rid of the appveyor error.

boechat107 and others added some commits Apr 20, 2016

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jun 29, 2017

Contributor

Sigh. I rebased on top of master and had to fix a couple of merge conflicts and it seems that the I was made the 'Committed-by' author for all the commits rather than only the commits which I had fixed. I hope that is not a problem?

Otherwise, I can try to do a fresh merge --with-ff.

However, at this point, I don't really trust my git-fu enough to be able to squash these commits in a coherent way. <_<

Contributor

musically-ut commented Jun 29, 2017

Sigh. I rebased on top of master and had to fix a couple of merge conflicts and it seems that the I was made the 'Committed-by' author for all the commits rather than only the commits which I had fixed. I hope that is not a problem?

Otherwise, I can try to do a fresh merge --with-ff.

However, at this point, I don't really trust my git-fu enough to be able to squash these commits in a coherent way. <_<

@ogrisel

This comment has been minimized.

Show comment
Hide comment
@ogrisel

ogrisel Jun 29, 2017

Member

It's fine, we are going to squash before merging anyway :) Just make sure that the what's new entry reflect the work by all the people who contributed to this fix.

Member

ogrisel commented Jun 29, 2017

It's fine, we are going to squash before merging anyway :) Just make sure that the what's new entry reflect the work by all the people who contributed to this fix.

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jun 29, 2017

Contributor

Ah, right. The scope of this PR and the contributor list has changed slightly; I'll update the What's New.

Contributor

musically-ut commented Jun 29, 2017

Ah, right. The scope of this PR and the contributor list has changed slightly; I'll update the What's New.

@ogrisel

Please add the references mentioned at the end of #6727 to the documentation (both the docstring of the classes and the narrative doc if they are missing).

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
@@ -449,6 +490,9 @@ class LabelSpreading(BaseLabelPropagation):
def __init__(self, kernel='rbf', gamma=20, n_neighbors=7, alpha=0.2,
max_iter=30, tol=1e-3, n_jobs=1):
if alpha <= 0.0 or alpha >= 1.0:
raise ValueError('alpha must be inside the open interval (0, 1)')

This comment has been minimized.

@ogrisel

ogrisel Jun 29, 2017

Member

Please put the effective value of alpha in the error message:

raise ValueError('alpha=%s is invalid: it must be inside the '
                 'open interval (0, 1)' % alpha)
@ogrisel

ogrisel Jun 29, 2017

Member

Please put the effective value of alpha in the error message:

raise ValueError('alpha=%s is invalid: it must be inside the '
                 'open interval (0, 1)' % alpha)

This comment has been minimized.

@musically-ut

musically-ut Jun 29, 2017

Contributor

👍

@musically-ut

musically-ut Jun 29, 2017

Contributor

👍

# adopting notation from Zhou et al (2004):
S = clf._build_graph()
Y = np.zeros((len(y), n_classes + 1))
Y[np.arange(len(y)), y] = 1

This comment has been minimized.

@ogrisel

ogrisel Jun 29, 2017

Member

Y[:, y] = 1 should work, no?

@ogrisel

ogrisel Jun 29, 2017

Member

Y[:, y] = 1 should work, no?

This comment has been minimized.

@musically-ut

musically-ut Jun 29, 2017

Contributor

Surprisingly, no:

In [18]: Y[:, y] = 1

In [19]: Y
Out[19]:
array([[ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.]])

In [20]: Y = np.zeros((len(y), 3))

In [21]: Y[np.arange(len(y)), y] = 1

In [22]: Y
Out[22]:
array([[ 0.,  0.,  1.],
       [ 1.,  0.,  0.],
       [ 0.,  1.,  0.],
       [ 0.,  0.,  1.],
       [ 1.,  0.,  0.],
       [ 0.,  1.,  0.],
       [ 0.,  0.,  1.],
       [ 1.,  0.,  0.],
       [ 1.,  0.,  0.],
       [ 0.,  0.,  1.]])
@musically-ut

musically-ut Jun 29, 2017

Contributor

Surprisingly, no:

In [18]: Y[:, y] = 1

In [19]: Y
Out[19]:
array([[ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.],
       [ 1.,  1.,  1.]])

In [20]: Y = np.zeros((len(y), 3))

In [21]: Y[np.arange(len(y)), y] = 1

In [22]: Y
Out[22]:
array([[ 0.,  0.,  1.],
       [ 1.,  0.,  0.],
       [ 0.,  1.,  0.],
       [ 0.,  0.,  1.],
       [ 1.,  0.,  0.],
       [ 0.,  1.,  0.],
       [ 0.,  0.,  1.],
       [ 1.,  0.,  0.],
       [ 1.,  0.,  0.],
       [ 0.,  0.,  1.]])

This comment has been minimized.

@ogrisel

ogrisel Jun 29, 2017

Member

Indeed. I learn every day.

@ogrisel

ogrisel Jun 29, 2017

Member

Indeed. I learn every day.

expected[unlabelled_idx, :] = Y_u
expected /= expected.sum(axis=1)[:, np.newaxis]
assert_array_almost_equal(expected, clf.label_distributions_, 4)

This comment has been minimized.

@ogrisel

ogrisel Jun 29, 2017

Member

If this test take from "Zhou et al (2004)" as well? If so please add a comment.

@ogrisel

ogrisel Jun 29, 2017

Member

If this test take from "Zhou et al (2004)" as well? If so please add a comment.

This comment has been minimized.

@musically-ut

musically-ut Jun 29, 2017

Contributor

Not really. Joel came up with this "sanity check" by calculating the same value in an iterative way (which is supposed to be numerically stable and should work for large datasets) and the closed form way (which involves inversion of a matrix). The test just compares the two set of values calculated.

Nevertheless, the closed form formula is indeed from Zhou et al (2004) and it may help any future maintainer. I'll add it.

@musically-ut

musically-ut Jun 29, 2017

Contributor

Not really. Joel came up with this "sanity check" by calculating the same value in an iterative way (which is supposed to be numerically stable and should work for large datasets) and the closed form way (which involves inversion of a matrix). The test just compares the two set of values calculated.

Nevertheless, the closed form formula is indeed from Zhou et al (2004) and it may help any future maintainer. I'll add it.

This comment has been minimized.

@ogrisel

ogrisel Jun 29, 2017

Member

Thanks.

@ogrisel

ogrisel Jun 29, 2017

Member

Thanks.

@ogrisel

This comment has been minimized.

Show comment
Hide comment
@ogrisel

ogrisel Jun 29, 2017

Member

Please also create an issue to track the directed graph issue if not it has not been created already.

Member

ogrisel commented Jun 29, 2017

Please also create an issue to track the directed graph issue if not it has not been created already.

@jnothman

I've not looked through this super-thoroughly, but with these changes it should LGTM.

I'm still wondering if we should offer hard clamping for the label spreading graph, and soft clamping for label propagation, i.e. don't deprecate alpha. But now that they are distinguished by more than just alpha it might be hard to define correct behaviour. Better to start with something that works!

Y = np.zeros((len(y), n_classes + 1))
Y[np.arange(len(y)), y] = 1
Y = Y[:, :-1]
for alpha in [0.1, 0.3, 0.5, 0.7, 0.9]:

This comment has been minimized.

@jnothman

jnothman Jul 1, 2017

Member

I assume this is fast enough, but we could probably remove some alphas if we wish.

@jnothman

jnothman Jul 1, 2017

Member

I assume this is fast enough, but we could probably remove some alphas if we wish.

This comment has been minimized.

@musically-ut

musically-ut Jul 1, 2017

Contributor

I'd rather leave them there; these were giving me some hints as to how to test the numerical stability of the inversion operation in the closed form.

@musically-ut

musically-ut Jul 1, 2017

Contributor

I'd rather leave them there; these were giving me some hints as to how to test the numerical stability of the inversion operation in the closed form.

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
@@ -449,6 +490,10 @@ class LabelSpreading(BaseLabelPropagation):
def __init__(self, kernel='rbf', gamma=20, n_neighbors=7, alpha=0.2,
max_iter=30, tol=1e-3, n_jobs=1):
if alpha <= 0.0 or alpha >= 1.0:

This comment has been minimized.

@jnothman

jnothman Jul 1, 2017

Member

This should happen in fit, not __init__

@jnothman

jnothman Jul 1, 2017

Member

This should happen in fit, not __init__

This comment has been minimized.

@jnothman

jnothman Jul 1, 2017

Member

And I think we need to explicitly forbid alpha=None.

@jnothman

jnothman Jul 1, 2017

Member

And I think we need to explicitly forbid alpha=None.

This comment has been minimized.

@musically-ut

musically-ut Jul 1, 2017

Contributor

In fit because of convention?

Otherwise, I would argue that failing as early as possible (i.e. in __init__) would be better.

@musically-ut

musically-ut Jul 1, 2017

Contributor

In fit because of convention?

Otherwise, I would argue that failing as early as possible (i.e. in __init__) would be better.

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
@@ -17,8 +17,8 @@
The algorithm tries to learn distributions of labels over the dataset. In the
"Hard Clamp" mode, the true ground labels are never allowed to change. They

This comment has been minimized.

@jnothman

jnothman Jul 1, 2017

Member

This comment is no longer really relevant. LabelPropagation requires hard clamping; LabelSpreading requires soft clamping.

@jnothman

jnothman Jul 1, 2017

Member

This comment is no longer really relevant. LabelPropagation requires hard clamping; LabelSpreading requires soft clamping.

This comment has been minimized.

@musically-ut

musically-ut Jul 1, 2017

Contributor

I've made the description a bit more generic and about variants. LabelPropagation and LabelSpreading are examples from these different variants.

@musically-ut

musically-ut Jul 1, 2017

Contributor

I've made the description a bit more generic and about variants. LabelPropagation and LabelSpreading are examples from these different variants.

@jnothman

This comment has been minimized.

Show comment
Hide comment
@jnothman

jnothman Jul 1, 2017

Member
Member

jnothman commented Jul 1, 2017

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jul 1, 2017

Contributor

@jnothman I've incorporated the suggestions. Awaiting review.


Update: If we move checks on alpha to fit, then we cannot distinguish alpha=None in LabelSpreading (where it is an error) from LabelPropagation (where the value is the only allowed value).

Contributor

musically-ut commented Jul 1, 2017

@jnothman I've incorporated the suggestions. Awaiting review.


Update: If we move checks on alpha to fit, then we cannot distinguish alpha=None in LabelSpreading (where it is an error) from LabelPropagation (where the value is the only allowed value).

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jul 1, 2017

Contributor

I don't like the odd failure case when alpha = None is actually allowed for LabelSpreading. I propose adding another parameter to the __init__ of the BaseLabelPropagation class called variant, which will either hold the string "LabelSpreading" or "LabelPropagation" depending on which sub-class creates it. Then the behavior of clamping will depend on the variant variable being equal to one of the strings instead of on whether alpha is None or not.

Then we will be able to eliminate the corner case of using LabelSpreading and setting alpha = None.

Thoughts?

Any opinions on using strings LabelSpreading/LabelPropagation or some other way of identifying the variants?

Contributor

musically-ut commented Jul 1, 2017

I don't like the odd failure case when alpha = None is actually allowed for LabelSpreading. I propose adding another parameter to the __init__ of the BaseLabelPropagation class called variant, which will either hold the string "LabelSpreading" or "LabelPropagation" depending on which sub-class creates it. Then the behavior of clamping will depend on the variant variable being equal to one of the strings instead of on whether alpha is None or not.

Then we will be able to eliminate the corner case of using LabelSpreading and setting alpha = None.

Thoughts?

Any opinions on using strings LabelSpreading/LabelPropagation or some other way of identifying the variants?

@jnothman

This comment has been minimized.

Show comment
Hide comment
@jnothman

jnothman Jul 2, 2017

Member
Member

jnothman commented Jul 2, 2017

@jnothman

This comment has been minimized.

Show comment
Hide comment
@jnothman

jnothman Jul 2, 2017

Member
Member

jnothman commented Jul 2, 2017

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jul 2, 2017

Contributor

Updated; awaiting review.

Contributor

musically-ut commented Jul 2, 2017

Updated; awaiting review.

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
@@ -264,13 +280,21 @@ def fit(self, X, y):
l_previous = self.label_distributions_
self.label_distributions_ = safe_sparse_dot(
graph_matrix, self.label_distributions_)
if alpha == 'propagation':

This comment has been minimized.

@jnothman

jnothman Jul 2, 2017

Member

I think this should be self.variant

@jnothman

jnothman Jul 2, 2017

Member

I think this should be self.variant

This comment has been minimized.

@musically-ut

musically-ut Jul 2, 2017

Contributor

Gah!

I wish we had a test to see if normalization was working. :(

@musically-ut

musically-ut Jul 2, 2017

Contributor

Gah!

I wish we had a test to see if normalization was working. :(

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
@@ -264,13 +280,21 @@ def fit(self, X, y):
l_previous = self.label_distributions_
self.label_distributions_ = safe_sparse_dot(
graph_matrix, self.label_distributions_)
if alpha == 'propagation':
# LabelPropagation

This comment has been minimized.

@jnothman

jnothman Jul 2, 2017

Member

and i think this comment is then redundant

@jnothman

jnothman Jul 2, 2017

Member

and i think this comment is then redundant

@jnothman

So is there some way to invent a graph where you get very different normalisation factors for different rows, so that that substantially affects the propagation?

Show outdated Hide outdated doc/whats_new.rst
- Fix :class:`semi_supervised.BaseLabelPropagation` to correctly implement
``LabelPropagation`` and ``LabelSpreading`` as done in the referenced
papers. :class:`semi_supervised.LabelPropagation` now always does hard
clamping. Its ``alpha`` parameter now defaults to ``None`` and is

This comment has been minimized.

@jnothman

jnothman Jul 2, 2017

Member

I think you should say that "alpha has no effect and is deprecated to be ...".

@jnothman

jnothman Jul 2, 2017

Member

I think you should say that "alpha has no effect and is deprecated to be ...".

This comment has been minimized.

@musically-ut

musically-ut Jul 2, 2017

Contributor

👍

@musically-ut

musically-ut Jul 2, 2017

Contributor

👍

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
if self.variant == 'propagation':
# LabelPropagation
clamp_weights = np.ones((n_samples, 1))
clamp_weights[~unlabeled, 0] = 0.0

This comment has been minimized.

@jnothman

jnothman Jul 2, 2017

Member

This should be the same as clamp_weights = unlabelled.reshape(-1, 1)

@jnothman

jnothman Jul 2, 2017

Member

This should be the same as clamp_weights = unlabelled.reshape(-1, 1)

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
clamp_weights[~unlabeled, 0] = 0.0
else:
# LabelSpreading
clamp_weights = alpha * np.ones((n_samples, 1))

This comment has been minimized.

@jnothman

jnothman Jul 2, 2017

Member

just use clamp_weights = alpha

@jnothman

jnothman Jul 2, 2017

Member

just use clamp_weights = alpha

This comment has been minimized.

@musically-ut

musically-ut Jul 2, 2017

Contributor

Have removed clamp_weights completely in favor of keeping only alpha.

@musically-ut

musically-ut Jul 2, 2017

Contributor

Have removed clamp_weights completely in favor of keeping only alpha.

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
normalizer = np.sum(
self.label_distributions_, axis=1)[:, np.newaxis]
self.label_distributions_ /= normalizer
# clamp
self.label_distributions_ = np.multiply(
clamp_weights, self.label_distributions_) + y_static

This comment has been minimized.

@jnothman

jnothman Jul 2, 2017

Member

Hmm. In the label prop case, we could just be using np.where(unlabelled, self.label_distributions, y_static) unless I'm mistaken

@jnothman

jnothman Jul 2, 2017

Member

Hmm. In the label prop case, we could just be using np.where(unlabelled, self.label_distributions, y_static) unless I'm mistaken

This comment has been minimized.

@musically-ut

musically-ut Jul 2, 2017

Contributor

Yes, np.where(unlabeled[:, np.newaxis], self.label_distributions_, y_static) to be more precise. Have factored out unlabeled[:, np.newaxis] in the actual implementation.

@musically-ut

musically-ut Jul 2, 2017

Contributor

Yes, np.where(unlabeled[:, np.newaxis], self.label_distributions_, y_static) to be more precise. Have factored out unlabeled[:, np.newaxis] in the actual implementation.

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jul 2, 2017

Contributor

Err ... the Travis failures, this time, seem to be unrelated to this PR.

Contributor

musically-ut commented Jul 2, 2017

Err ... the Travis failures, this time, seem to be unrelated to this PR.

Show outdated Hide outdated sklearn/semi_supervised/label_propagation.py
@@ -350,6 +373,14 @@ class LabelPropagation(BaseLabelPropagation):
LabelSpreading : Alternate label propagation strategy more robust to noise
"""
variant = 'propagation'

This comment has been minimized.

@ogrisel

ogrisel Jul 3, 2017

Member

Please make this a private attribute _variant. Otherwise it could be consider public API.

@jnothman I think we can merge once this is made private. Ok on your side?

@ogrisel

ogrisel Jul 3, 2017

Member

Please make this a private attribute _variant. Otherwise it could be consider public API.

@jnothman I think we can merge once this is made private. Ok on your side?

@ogrisel

This comment has been minimized.

Show comment
Hide comment
@ogrisel

ogrisel Jul 3, 2017

Member

You can ignore tests failing with "HTTP Error 500" on mldata.org.

Member

ogrisel commented Jul 3, 2017

You can ignore tests failing with "HTTP Error 500" on mldata.org.

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jul 3, 2017

Contributor

Updated.

PS: I don't remember whether merely pushing commits sends out an notification e-mail to subscribers by default or not on GitHub (I vaguely recall turning off those notifications for myself somewhere). In case it does, please tell me and I'm sorry about the noise coming from these "Updated" comments.

Contributor

musically-ut commented Jul 3, 2017

Updated.

PS: I don't remember whether merely pushing commits sends out an notification e-mail to subscribers by default or not on GitHub (I vaguely recall turning off those notifications for myself somewhere). In case it does, please tell me and I'm sorry about the noise coming from these "Updated" comments.

@ogrisel

This comment has been minimized.

Show comment
Hide comment
@ogrisel

ogrisel Jul 3, 2017

Member

It's fine, let's wait for @jnothman's feedback and CI results.

Member

ogrisel commented Jul 3, 2017

It's fine, let's wait for @jnothman's feedback and CI results.

@jnothman

This comment has been minimized.

Show comment
Hide comment
@jnothman

jnothman Jul 3, 2017

Member

Yes, I'm +1 for merge, because it would be good to finally have this fixed in the release. But it would be nice if we had a non-regression test for that normalisation issue. Want to think about it in the background and try propose something, @musically-ut?

Member

jnothman commented Jul 3, 2017

Yes, I'm +1 for merge, because it would be good to finally have this fixed in the release. But it would be nice if we had a non-regression test for that normalisation issue. Want to think about it in the background and try propose something, @musically-ut?

@ogrisel

This comment has been minimized.

Show comment
Hide comment
@ogrisel

ogrisel Jul 3, 2017

Member

I will be offline soon. @jnothman I let you handle the end and merging of this PR with @musically-ut :)

Member

ogrisel commented Jul 3, 2017

I will be offline soon. @jnothman I let you handle the end and merging of this PR with @musically-ut :)

@musically-ut

This comment has been minimized.

Show comment
Hide comment
@musically-ut

musically-ut Jul 3, 2017

Contributor

👍

I am going to continue proposing some changes after the underlying algorithm is fixed (e.g. #8008), and will keep trying to come up with better tests in the background.

@ogrisel Thanks for the review!

Contributor

musically-ut commented Jul 3, 2017

👍

I am going to continue proposing some changes after the underlying algorithm is fixed (e.g. #8008), and will keep trying to come up with better tests in the background.

@ogrisel Thanks for the review!

@jnothman

This comment has been minimized.

Show comment
Hide comment
@jnothman

jnothman Jul 3, 2017

Member

Thanks and well done, @musically-ut, @boechat107, @MechCoder and all.

Member

jnothman commented Jul 3, 2017

Thanks and well done, @musically-ut, @boechat107, @MechCoder and all.

@jnothman jnothman merged commit 0dc2279 into scikit-learn:master Jul 3, 2017

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Jul 5, 2017

Member

AWESOME! thank you so much to everybody working on this!

Member

amueller commented Jul 5, 2017

AWESOME! thank you so much to everybody working on this!

massich added a commit to massich/scikit-learn that referenced this pull request Jul 13, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.

dmohns added a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.

dmohns added a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.

NelleV added a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.

paulha added a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.

AishwaryaRK added a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.

maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.

jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017

[MRG+1] Fix semi_supervised (#9239)
* Files for my dev environment with Docker

* Fixing label clamping (alpha=0 for hard clamping)

* Deprecating alpha, fixing its value to zero

* Correct way to deprecate alpha for LabelPropagation

The previous way was breaking the test
sklearn.tests.test_common.test_all_estimators

* Detailed info for LabelSpreading's alpha parameter

Based on the original paper.

* Minor changes in the deprecation message

* Improving "deprecated" doc string and raising DeprecationWarning

* Using a local "alpha" in "fit" to deprecate LabelPropagation's alpha

This solution isn't great, but it sets the correct value for alpha
without violating the restrictions imposed by the tests.

* Removal of my development files

* Using sphinx's "deprecated" tag (jnothman's suggestion)

* Deprecation warning: stating that the alpha's value will be ignored

* Use __init__ with alpha=None

* Update what's new

* Try fix RuntimeWarning in test_alpha_deprecation

* DOC Indent deprecation details

* DOC wording

* Update docs

* Change to the one true implementation.

* Add sanity-checked impl. of Label{Propagation,Spreading}

* Raise ValueError if alpha is invalid in LabelSpreading.

* Add a normalizing step before clamping to LabelPropagation.

* Fix flake8 errors.

* Remove duplicate imports.

* DOC Update What's New.

* Specify alpha's value in the error.

* Tidy up tests.

Add a test and add references, where needed.

* Add comment to non-regression test.

* Fix documentation.

* Move check for alpha into fit from __init__.

* Fix corner case of LabelSpreading with alpha=None.

* alpha -> self.variant

* Make Whats_new more explicit.

* Simplify impl. of Label{Propagation,Spreading}.

* variant -> _variant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment