TST Fix openml parser implementation for pandas-dev - #26386
Conversation
adrinjalali
left a comment
There was a problem hiding this comment.
This looks better to me. Does it need a changelog? It might be changing dtypes in some cases probably?
|
I would consider this a fix because we have better dtypes. We should have an entry in what's new to acknowledge it. |
| # with casting it will be transformed to either float or Int64 | ||
| (40966, "pandas", 1, 77, 0), | ||
| # titanic | ||
| (40945, "liac-arff", 3, 5, 0), |
There was a problem hiding this comment.
I am a bit confused by this PR: why would fixing the pandas parser impact a test for the liac-arff parser?
There was a problem hiding this comment.
This PR is fixing the liac-arff parser which uses pandas when as_frame=True.
For this specific tests, the "body" feature is interpreted as a object dtype on main. With this PR, the "body" feature is a float dtype, which increases the expected_n_floats by one.
|
Merging, thanks a lot! |
Reference Issues/PRs
Partial Addresses #26154
Alternative to #26344
What does this implement/fix? Explain your changes.
This PR uses the second chunk to infer the dtypes and uses those types for the first chunk. For the titanic dataset, this means that
bodyfeature gets correctly inferred as a numeric dtype. OpenML denotes body as a numeric feature in it's metadata.