-
Notifications
You must be signed in to change notification settings - Fork 87
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
Upgrade Woodwork to 0.6.0 #2690
Changes from all commits
03e129d
0dac5a0
cdcea2c
8ef3541
ab4d80e
d2d045e
7f1f92a
eba1d4b
9359556
22c79c1
7db5787
df4edc7
f3d4279
240655d
708ea7b
63eb23a
86ca452
7871c74
c336f9d
1fd6231
b086a16
370f337
64868af
6b33064
d56a5ca
77374a9
644fa65
a3c5766
b9cdc83
9294376
eb0cca3
829c169
3fb872e
d423bf3
8130180
3b68cab
9128d9c
6fcf205
caefd12
a562c67
482a0d6
e0ddd56
3a353ea
209a020
61c91ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,20 +72,13 @@ def transform(self, X, y=None): | |
|
||
es = self._make_entity_set(X_ww) | ||
features = ft.calculate_feature_matrix(features=self._features, entityset=es) | ||
|
||
features.set_index(X_ww.index, inplace=True) | ||
|
||
X_ww = X_ww.ww.drop(self._columns) | ||
features.ww.init(logical_types={col_: "categorical" for col_ in features}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So you're taking all features generated from DFS and Calculate Feature Matrix, and making them categorical? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes but currently this only applies for URL and Email features. It was the old behavior but now the problem is that ww 0.6.1 infers features created by ft as Unknown. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, after discussion with @dsherry and @freddyaboulton this is what we decided on to address the test issues for this transformer |
||
for col in features: | ||
X_ww.ww[col] = features[col] | ||
|
||
all_created_columns = self._get_feature_provenance().values() | ||
to_categorical = { | ||
col: "Categorical" | ||
for feature_list in all_created_columns | ||
for col in feature_list | ||
} | ||
X_ww.ww.set_types(to_categorical) | ||
return X_ww | ||
|
||
@staticmethod | ||
|
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.
Is the schema being invalidated by setting the col? Should we file a WW issue for this?
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.
Modifying the dataframe outside of Woodwork, as is being done with
X_permuted.iloc[:, col_idx] = col
, always carries the risk of invalidating the schema.That said, I don't think it is currently possible to do this type of assignment through WW currently with this:
I'm not sure how easy it would be to implement, but we could look into it if needed.
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.
By the way, based on my limited testing, as long as the new values don't change the column
dtype
, the schema should not be invalidated by this type of assignment outside of WW.