-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[R] Fix parsing decision stump. #7689
Conversation
30e73a7
to
120dd68
Compare
@hetong007 Could you please take a look into this fix? I'm a little bit confused by the regex parsing. |
Sure. What exactly is the confusing part? |
@hetong007 For instance this comment in the code:
I'm not entirely sure what's it skipping. In general, I would have more confidence about the correctness of the code if we use the JSON dump along with jsonlite for parsing. But right now in the R API, the user can directly pass a text string input so I can't make the change otherwise it would be breaking. |
Would be great if you can review the PR and see if the fix makes sense. |
I looked into the code with an example. The to-parse text is After the
So basically the skipped indices contains either the input or an empty string, thus the list Overall I think your fix here makes sense, with one inline comment. |
This reverts commit c41c451.
@hetong007 Thank you for digging into this! Your explanation of the code is helpful. On the issue of using constant instead of string value |
Cool! This makes sense. |
Still need tests for more sophisticated cases like mixed tree types.
Close #7669