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
ENH add parameter as_frame in fetch_kddcup99 #18280
Conversation
def test_OSError_message(fetch_kddcup99_fxt): | ||
expected_msg = ('Download kddcup99 to run this test') | ||
with pytest.raises(OSError, match=expected_msg): | ||
fetch_kddcup99_fxt(data_home="./", download_if_missing=False) |
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 this testing code in conftest
?
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.
True. I was not aware of it.
dataset_shuffled = fetch_kddcup99_fxt( | ||
random_state=0, subset='SA', shuffle=True, percent10=True, | ||
) | ||
assert any(dataset_shuffled.target[-100:] == b'normal.') |
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.
If this is testing shuffle should we do:
assert set(dataset['target']) == set(dataset_shuffle['target'])
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.
yes this is less error-prone even if we added the random state.
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.
LGTM, thanks!
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.
LGTM
Co-authored-by: aliang <aliang@air>
Supersede and closes #17508
Add parameter
as_frame
tofetch_kddcup99
.