Skip to content
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 high precision conversion from double to string in Tree::ToString() for new linear tree members #3938

Merged
merged 17 commits into from
Feb 19, 2021

Conversation

mjmckp
Copy link
Contributor

@mjmckp mjmckp commented Feb 11, 2021

In the Tree::ToString() method, print double values for linear tree models with high precision, so that the tree may be accurately reproduced elsewhere (LightGBM.Net in particular). Note that this is already done for other double-to-string conversions in the same method, however was overlooked when the linear tree functionality was added.

matthew-peacock and others added 16 commits November 2, 2018 13:07
…datasets.

Prior to this change, the line "score_t threshold = tmp_gradients[top_k - 1];" would generate an exception, since tmp_gradients would be empty when the cnt input value to the function is zero.
…data set given as of array of pointers to rows (as opposed to existing method LGBM_BoosterPredictForMat which requires data given as contiguous array)
…s with high precision, so that the tree may be accurately reproduced elsewhere (LightGBM.Net in particular)
…hen parsing double valued arrays for linear trees, to ensure models round-trip via string or file correctly.
@guolinke guolinke merged commit 7f91dc6 into microsoft:master Feb 19, 2021
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants