Repository navigation
Add label encoder component to EvalML - #2853
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2853 +/- ##
=======================================
+ Coverage 99.8% 99.8% +0.1%
=======================================
Files 303 305 +2
Lines 28226 28353 +127
=======================================
+ Hits 28145 28272 +127
Misses 81 81
Continue to review full report at Codecov.
|
freddyaboulton
left a comment
There was a problem hiding this comment.
Looks good to me @angela97lin !
| y_ww = infer_feature_types(y) | ||
| y_t = self._component_obj.transform(y_ww) | ||
| y_t = pd.Series(y_t, index=y_ww.index) | ||
| return X, ww.init_series(y_t) |
There was a problem hiding this comment.
Makes sense to use init_series. This transformation would almost always change the schema.
| y_t = pd.Series(y_t, index=y_ww.index) | ||
| return X, ww.init_series(y_t) | ||
|
|
||
| def fit_transform(self, X, y): |
There was a problem hiding this comment.
Is there a reason we don't just use the parent Transformer's implementation for this?
There was a problem hiding this comment.
I think nope, except we want a different docstring 😅 (which was incorrect, updating!)
Closes #2852