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
Fix bug with encode_features and features that create multiple columns #622
Conversation
Codecov Report
@@ Coverage Diff @@
## master #622 +/- ##
==========================================
+ Coverage 97.43% 97.43% +<.01%
==========================================
Files 118 118
Lines 9534 9535 +1
==========================================
+ Hits 9289 9290 +1
Misses 245 245
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@@ -74,7 +74,7 @@ def encode_features(feature_matrix, features, top_n=10, include_unknown=True, | |||
assert fname in X.columns, ( | |||
"Feature %s not found in feature matrix" % (fname) | |||
) | |||
feature_names.append(fname) | |||
feature_names.append(fname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alteryx#622) * fix indent * tests for duplicate columns * update changelog * Update changelog.rst
Pull Request Description
Fixes issue #621
Features create multiple columns in the feature matrix aren't handled by
encode_features
. This PR fixes a bug that would cause some columns of a feature with multiple outputs to be added to the column list twice, resulting in duplicate columns in the resulting matrix.After creating the pull request: in order to pass the changelog_updated check you will need to update the "Future Release" section of
docs/source/changelog.rst
to include this pull request.