Repository navigation
[Test] Auto category conversion test cases - #1771
Open
AtharvaManale wants to merge 3 commits into
Open
AtharvaManale wants to merge 3 commits into
AtharvaManale wants to merge 3 commits into
Conversation
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue reference:
closes/realtes to: #1489
Related pr: #1490
Task performed:
Tested proposed solution in pr #1490 using a couple of edge cases and added tests for integer categories and categorical columns containing missing values.
Observation:
test_case_2) categorical columns containing missing values.(https://github.com/AtharvaManale/openml-python/blob/19f09407bb23712c479cfec988e97d3ae1643d49/tests/test_datasets/test_dataset_functions.py#L681)
result:
The integer-category test passes, but the missing-value test produces "1.0" and "2.0" because pandas infers floating-point values from [1, None, 2] before the column is converted to categorical. This raises a broader question about how aggressively the function should normalize category labels and which edge cases it should support.
Automatic conversion may require additional decisions about type normalization and edge cases. Retaining the existing ValueError behavior could be preferable if the project intends to reject unsupported categorical types rather than introduce implicit conversion rules.
No need of merging, just for showcasing the testcases used.