-
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
Update split_data with new default for timeseries #3650
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b205986
Update split_data with new default
eccabay 96b9d2e
Update release notes
eccabay 364535c
Merge branch 'main' into 4658_ts-holdout
eccabay 46b232e
Test updates from PR comments
eccabay 3549890
Merge branch 'main' into 4658_ts-holdout
eccabay ff9f83d
Merge branch 'main' into 4658_ts-holdout
chukarsten 0364a0f
Merge branch 'main' into 4658_ts-holdout
chukarsten 874f81a
Added the ability of the conftest fixture to generate numpy.
chukarsten 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 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 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 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 |
---|---|---|
|
@@ -96,17 +96,42 @@ def _get_test_data_from_configuration( | |
problem_type, | ||
column_names=None, | ||
nullable_target=False, | ||
scale=2, | ||
): | ||
X_all = pd.DataFrame( | ||
{ | ||
"all_null": [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan] | ||
* 2, | ||
"int_null": [0, 1, 2, np.nan, 4, np.nan, 6] * 2, | ||
"age_null": [0, 1, 2, np.nan, 4, np.nan, 6] * 2, | ||
"bool_null": [True, None, False, True, False, None, True] * 2, | ||
"numerical": range(14), | ||
"categorical": ["a", "b", "a", "b", "b", "a", "b"] * 2, | ||
"dates": pd.date_range("2000-02-03", periods=14, freq="W"), | ||
"all_null": [ | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
np.nan, | ||
] | ||
* scale, | ||
"int_null": [0, 1, 2, np.nan, 4, np.nan, 6, 7, 8, 9] * scale, | ||
"age_null": [0, 1, 2, np.nan, 4, np.nan, 6, 7, 8, 9] * scale, | ||
"bool_null": [ | ||
True, | ||
None, | ||
False, | ||
True, | ||
False, | ||
None, | ||
True, | ||
True, | ||
False, | ||
True, | ||
] | ||
* scale, | ||
"numerical": range(10 * scale), | ||
"categorical": ["a", "b", "a", "b", "b", "a", "b", "a", "a", "b"] | ||
* scale, | ||
"dates": pd.date_range("2000-02-03", periods=10 * scale, freq="W"), | ||
"text": [ | ||
"this is a string", | ||
"this is another string", | ||
|
@@ -115,8 +140,11 @@ def _get_test_data_from_configuration( | |
"cats are gr8", | ||
"hello world", | ||
"evalml is gr8", | ||
"more strings", | ||
"here we go", | ||
"wheeeee!!!", | ||
] | ||
* 2, | ||
* scale, | ||
"email": [ | ||
"[email protected]", | ||
"[email protected]", | ||
|
@@ -125,8 +153,11 @@ def _get_test_data_from_configuration( | |
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
] | ||
* 2, | ||
* scale, | ||
"url": [ | ||
"https://evalml.alteryx.com/en/stable/", | ||
"https://woodwork.alteryx.com/en/stable/guides/statistical_insights.html", | ||
|
@@ -135,8 +166,11 @@ def _get_test_data_from_configuration( | |
"https://www.evalml.alteryx.com/en/stable/demos/text_input.html", | ||
"https://github.com/alteryx/evalml", | ||
"https://github.com/alteryx/featuretools", | ||
"https://github.com/alteryx/woodwork", | ||
"https://github.com/alteryx/compose", | ||
"https://woodwork.alteryx.com/en/stable/", | ||
] | ||
* 2, | ||
* scale, | ||
"ip": [ | ||
"0.0.0.0", | ||
"1.1.1.101", | ||
|
@@ -145,21 +179,28 @@ def _get_test_data_from_configuration( | |
"101.1.1.1", | ||
"192.168.1.1", | ||
"255.255.255.255", | ||
"2.1.1.101", | ||
"2.1.101.1", | ||
"2.101.1.1", | ||
] | ||
* 2, | ||
* scale, | ||
}, | ||
) | ||
y = pd.Series([0, 0, 1, 0, 0, 1, 1] * 2) | ||
y = pd.Series([0, 0, 1, 0, 0, 1, 1, 0, 1, 0] * scale) | ||
if problem_type == ProblemTypes.MULTICLASS: | ||
y = pd.Series([0, 2, 1, 2, 0, 2, 1] * 2) | ||
y = pd.Series([0, 2, 1, 2, 0, 2, 1, 2, 1, 0] * scale) | ||
elif is_regression(problem_type): | ||
y = pd.Series([1, 2, 3, 3, 3, 4, 5] * 2) | ||
y = pd.Series([1, 2, 3, 3, 3, 4, 5, 5, 6, 6] * scale) | ||
if nullable_target: | ||
y.iloc[2] = None | ||
if input_type == "ww": | ||
y = ww.init_series(y, logical_type="integer_nullable") | ||
X = X_all[column_names] | ||
|
||
if input_type == "np": | ||
X = X.to_numpy() | ||
y = y.to_numpy() | ||
|
||
if input_type == "ww": | ||
logical_types = {} | ||
if "text" in column_names: | ||
|
This file contains 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
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.
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.
Make sure you send a picture of this to @angela97lin