-
Notifications
You must be signed in to change notification settings - Fork 89
Update components to accept Woodwork inputs #1423
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
Merged
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
7b47df0
init
angela97lin 168236a
fix catboost
angela97lin 1b3f7ed
fix tests
angela97lin 5a40a90
some minor cleanup
angela97lin cf912bb
fix np.array instead of np.ndarray
angela97lin b18cfad
update docstr
angela97lin 43b8edd
fix test
angela97lin e2d3643
release notes
angela97lin 0b40ffc
Merge branch 'main' into 1288_ww_components
angela97lin 0d79f32
clean up unnecessary code
angela97lin c3627c8
Merge branch '1288_ww_components' of github.com:alteryx/evalml into 1…
angela97lin 90f7f8c
remove unnecessary lines
angela97lin 3a1c1af
remove dup line
angela97lin a485675
Merge branch 'main' into 1288_ww_components
angela97lin 2295f78
linting
angela97lin dfd526d
comment out code from pipelines now handled in components
angela97lin 0079558
messy testing
angela97lin e866adb
update transformers with wrapper
angela97lin 20a6e3d
fix datetime featurizer
angela97lin b132b23
more datetime fixing
angela97lin bbe91fc
update numpy test
angela97lin 2f6dcd6
update to new ww api
angela97lin 5286d3c
fix simple imputer and drop null cols
angela97lin 9f8e54a
fix imputer tests
angela97lin 1b690c5
fix lsa and pca
angela97lin a4309fe
fix ohe categories
angela97lin d53be54
fix random state bug
angela97lin 0f54db2
remove copy
angela97lin 737333a
linting
angela97lin 4c07dc9
oddest expression to pass linter
angela97lin 0f27458
merging'
angela97lin bf2dfde
remove merge conflicts
angela97lin 2351dfe
fix y
angela97lin d2a75e5
add back y
angela97lin f112626
fix regression
angela97lin 3a4804d
test
angela97lin 5909ab5
another test
angela97lin b398a8c
Merge branch 'main' into 1288_ww_components
angela97lin 48bc148
minor cleanup
angela97lin ac5c307
fix tests
angela97lin fe295e6
more cleanup
angela97lin 1ba7511
clean up vars in imputer
angela97lin 96edc55
fix ohe
angela97lin 6b90ae3
remove unnecessary line
angela97lin 211b47f
remove unnecessary
angela97lin 2e90f02
add test
angela97lin 1e4280e
linting
angela97lin 9b118db
Merge branch 'main' into 1288_ww_components
angela97lin 9d13a53
fix some comments
angela97lin 50cad83
cleaning up some more comments
angela97lin 4ad4ee1
add tests
angela97lin 7d21081
Merge branch 'main' into 1288_ww_components
angela97lin 9d20614
fix regression pipeline
angela97lin 7d30748
Merge branch '1288_ww_components' of github.com:alteryx/evalml into 1…
angela97lin 2aca6dc
fix tests
angela97lin 2f79324
add test for gen utils
angela97lin 18245eb
fix indices
angela97lin c00809f
fix index for arrays
angela97lin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ def fit(self, X, y): | |
""" | ||
X = _convert_to_woodwork_structure(X) | ||
y = _convert_to_woodwork_structure(y) | ||
X = _convert_woodwork_types_wrapper(X.to_dataframe()) | ||
y = _convert_woodwork_types_wrapper(y.to_series()) | ||
self._encoder.fit(y) | ||
y = self._encode_targets(y) | ||
Comment on lines
44
to
46
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. Because we encode the targets, keeping the conversion code for |
||
|
@@ -92,8 +91,6 @@ def predict(self, X, objective=None): | |
Returns: | ||
pd.Series : Estimated labels | ||
""" | ||
X = _convert_to_woodwork_structure(X) | ||
X = _convert_woodwork_types_wrapper(X.to_dataframe()) | ||
predictions = self._predict(X, objective) | ||
return pd.Series(self._decode_targets(predictions)) | ||
|
||
|
@@ -106,8 +103,6 @@ def predict_proba(self, X): | |
Returns: | ||
pd.DataFrame: Probability estimates | ||
""" | ||
X = _convert_to_woodwork_structure(X) | ||
X = _convert_woodwork_types_wrapper(X.to_dataframe()) | ||
X = self.compute_estimator_features(X, y=None) | ||
proba = self.estimator.predict_proba(X) | ||
proba.columns = self._encoder.classes_ | ||
|
@@ -124,11 +119,8 @@ def score(self, X, y, objectives): | |
Returns: | ||
dict: Ordered dictionary of objective scores | ||
""" | ||
X = _convert_to_woodwork_structure(X) | ||
y = _convert_to_woodwork_structure(y) | ||
X = _convert_woodwork_types_wrapper(X.to_dataframe()) | ||
y = _convert_woodwork_types_wrapper(y.to_series()) | ||
|
||
objectives = [get_objective(o, return_instance=True) for o in objectives] | ||
y = self._encode_targets(y) | ||
y_predicted, y_predicted_proba = self._compute_predictions(X, objectives) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.