-
-
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
Use new predict function for R. #6819
Merged
Merged
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
d06786e
Use new predict function for R.
trivialfis baf9187
Callback, vec.
trivialfis 15dbd02
Unused variable.
trivialfis 71a55f9
Evil unbox.
trivialfis ceb7bc8
Rename.
trivialfis 6671dc5
Fix strict_shape with softmax.
trivialfis a58d875
Fix softprob.
trivialfis 8a28fab
Fix predict leaf.
trivialfis fee7a2e
Fix shap.
trivialfis 779862c
Fix callback.
trivialfis e4b791f
Lint.
trivialfis 35a43be
Fix index.
trivialfis 0329506
Small cleanup.
trivialfis cfc8654
Note.
trivialfis f4a2e5f
Remove some use of ntreelimit.
trivialfis c5e7383
Quick tests.
trivialfis d20212c
Lint.
trivialfis e5faa66
lintr.
trivialfis 48414aa
Change name.
trivialfis eb1ee9a
Add tests.
trivialfis b385eac
Lint.
trivialfis 48d5105
lintr.
trivialfis e98ce00
Handle it in predict.
trivialfis dff4908
Remove print.
trivialfis 7fc0c8c
Comment.
trivialfis 67c05d9
Update documents.
trivialfis 64b82fb
Fix.
trivialfis 5805bf4
lintr.
trivialfis 7805ea7
Fix doc.
trivialfis 2029e4e
Remove RF example.
trivialfis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Should we use 0-based index here?
@jameslamb What's the convention for R packages that wrap native code? Do users expect to use 1-based indexing?
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.
Also, please add a note that
iteration_range=(0,0)
indicates the use of all trees.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.
In general, I'm in favor of parameters like this being 1-based and having the documentation clearly indicate that. I think that's more friendly for R users.
But, to be fair, in
{lightgbm}
we have not been very consistent about this. Keyword arguments in the package's interface expect 1-based values, but{lightgbm}
won't look inside parameters passed through a listparams
and subtract 1 from any parameters that are indices.So I think that there is not really a "right" answer to this, and that it's more important to:
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.
I will try to use 1 based index.
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.
Changed to use 1-based index. Thanks for the suggestions!