-
- Downloads
[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.
Showing
- doc/modules/label_propagation.rst 2 additions, 2 deletionsdoc/modules/label_propagation.rst
- doc/whats_new.rst 10 additions, 1 deletiondoc/whats_new.rst
- examples/semi_supervised/plot_label_propagation_structure.py 1 addition, 1 deletionexamples/semi_supervised/plot_label_propagation_structure.py
- sklearn/semi_supervised/label_propagation.py 61 additions, 15 deletionssklearn/semi_supervised/label_propagation.py
- sklearn/semi_supervised/tests/test_label_propagation.py 86 additions, 0 deletionssklearn/semi_supervised/tests/test_label_propagation.py
Loading
Please register or sign in to comment