LightGBM
LightGBM copied to clipboard
[R-package] expose start_iteration to dump/save/lgb.model.dt.tree
@jameslamb Increadible review, thank you so much for your dedication!
Some comments:
- Now, the user sees 1-based
start_iteration. The conversion to 0-based is done before calling the R wrappers of the C_API. We could also move the 0-basing into the R wrappers. - The new argument
start_iterationhas moved to the end of all argument lists, also those of the R wrappers of the C++ code. - I have left the weak unit test of
$save_model_to_string()because I don't know how to parse the content of the string. - Also the unit test of
lgb.save()is untouched because serializing and deserializing loses the tree index. At least I have this in mind from when I tried to improve the test. Maybe you have a good idea how to make this better?
Thanks so much!
Thanks for working with me on the unit tests. I'm really happy that this PR is going to add so much better coverage of an under-tested part of the library.
I left one more set of small suggestions, and then I think this is ready to merge 🎉
Perfect! Should we reformulate the docstrings of all affected functions?
yes please
yes please
done.