-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
option to disable the shape checking in prediction. #2669
Conversation
docs/Parameters.rst
Outdated
|
||
- used only in ``prediction`` task | ||
|
||
- if ``true``, will disable the shape checking in prediction. This is dangerous, please aware what you are doing |
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 think it would be valuable to elaborate on which "shape checking" this refers to. I didn't know until I read the text of the error message in the diff.
Would you consider something like this?
Control whether or not
LightGBM
raises an error when you try to predict on data with a different number of features than the training data. Iffalse
(the default), a fatal error will be raised if the number of features in the dataset you predict on differs from the number seen during training. Iftrue
,LightGBM
will attempt to predict on whatever data you provide. This is dangerous because you might get incorrect predictions, but you could use it in situations where it is difficult or expensive to generate some features and you are very confident that they were never chosen for splits in the model. Be very careful setting this parameter totrue
.
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, I am sort of guessing what the context is for this PR, but if you could give a more specific example for when it would be good to set this to true
I think it would help users.
Ok I understand more after reading #2668 . But my comment above about elaborating in the documentation stands.
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.
Thanks @jameslamb for detailed documentation!
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.
Some stylish fixes according to our conventions:
Co-Authored-By: Nikita Titov <[email protected]>
Co-Authored-By: Nikita Titov <[email protected]>
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.
Thanks for the updates to the documentation. Looks good to me!
to fix #2668