Skip to content

Add regression tests for createDataPartition()#1383

Open
MichaelChirico wants to merge 5 commits intotopepo:masterfrom
MichaelChirico:createDataPartition-tests
Open

Add regression tests for createDataPartition()#1383
MichaelChirico wants to merge 5 commits intotopepo:masterfrom
MichaelChirico:createDataPartition-tests

Conversation

@MichaelChirico
Copy link
Copy Markdown
Contributor

@MichaelChirico MichaelChirico commented May 29, 2025

Created as a confidence booster for the refactor in #1382.

Note the added input validation for numeric y -- currently, createDataPartition() will error from quantile() when passed missing values. See also #1384.

This started as a suite generated by Gemini -- I prompted it for a test suite, then cleaned up a few stale usage patterns, ran the tests and iterated until the HEAD behavior passes the suite. However, I did not find it very satisfactory -- it seems wary of the random nature of the output & unwililng to put some actually useful tests in place, despite the use of local_seed(). So, I mostly stripped out all the crufty tests it wrote and replaced them with expect_identical() tests of the createDataPartition() output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant