don't change self.n_values in OneHotEncoder.fit#12286
don't change self.n_values in OneHotEncoder.fit#12286qinhanmin2014 merged 2 commits intoscikit-learn:masterfrom
Conversation
|
I was looking in the history of commits of #10523, and at a certain point I had it as In any case, looking at the code and diff of |
|
Line 320? But I just set them to be the same thing? |
|
@jorisvandenbossche any chance you had time to look into this? |
|
@amueller sorry for the slow reply. I didn't really look much further in detail into it, but I also can't directly think of a problem / reason why I didn't do this. So go ahead. |
sklearn/preprocessing/_encoders.py
Outdated
|
|
||
| def _handle_deprecations(self, X): | ||
|
|
||
| self._n_values = self.n_values |
There was a problem hiding this comment.
I would put this under the line below, as this is also an internal version of a keyword to handle the deprecation
move private variable below comment
|
thanks, done! |
jnothman
left a comment
There was a problem hiding this comment.
Looks fine. Add a small what's new to 0.20.1?
It's not that much of a user-facing change, so personally not sure it is worth cluttering the what's new with it. |
|
Okay.
|
…ybutton * upstream/master: FIX remove FutureWarning in _object_dtype_isnan and add test (scikit-learn#12567) DOC Add 's' to "correspond" in docs for Hamming Loss. (scikit-learn#12565) EXA Fix comment in plot-iris-logistic example (scikit-learn#12564) FIX stop words validation in text vectorizers with custom preprocessors / tokenizers (scikit-learn#12393) DOC Add skorch to related projects (scikit-learn#12561) MNT Don't change self.n_values in OneHotEncoder.fit (scikit-learn#12286) MNT Remove unused assert_true imports (scikit-learn#12560) TST autoreplace assert_true(...==...) with plain assert (scikit-learn#12547) DOC: add a testimonial from JP Morgan (scikit-learn#12555)
…ikit-learn into add_codeblock_copybutton * 'add_codeblock_copybutton' of https://github.com/thoo/scikit-learn: Move an extension under sphinx_copybutton/ Move css/js file under sphinxext/ Fix max_depth overshoot in BFS expansion of trees (scikit-learn#12344) TST don't test utils.fixes docstrings (scikit-learn#12576) DOC Fix typo (scikit-learn#12563) FIX Workaround limitation of cloudpickle under PyPy (scikit-learn#12566) MNT bare asserts (scikit-learn#12571) FIX incorrect error when OneHotEncoder.transform called prior to fit (scikit-learn#12443) Retrigger travis:max time limit error DOC: Clarify `cv` parameter description in `GridSearchCV` (scikit-learn#12495) FIX remove FutureWarning in _object_dtype_isnan and add test (scikit-learn#12567) DOC Add 's' to "correspond" in docs for Hamming Loss. (scikit-learn#12565) EXA Fix comment in plot-iris-logistic example (scikit-learn#12564) FIX stop words validation in text vectorizers with custom preprocessors / tokenizers (scikit-learn#12393) DOC Add skorch to related projects (scikit-learn#12561) MNT Don't change self.n_values in OneHotEncoder.fit (scikit-learn#12286) MNT Remove unused assert_true imports (scikit-learn#12560) TST autoreplace assert_true(...==...) with plain assert (scikit-learn#12547) DOC: add a testimonial from JP Morgan (scikit-learn#12555)
…earn#12286)" This reverts commit 8374a94.
…earn#12286)" This reverts commit 8374a94.
via #8022.
ping @jorisvandenbossche
Not sure if it's possible to trigger a bug with this but it's definitely not allowed