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

[python-package] Introduce refit_tree_manual to Booster class. #6617

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Add comment
  • Loading branch information
Atanas Dimitrov committed Aug 16, 2024
commit 9c5540258be51dd3da4c6e12755019b226497a88
8 changes: 8 additions & 0 deletions include/LightGBM/c_api.h
Original file line number Diff line number Diff line change
@@ -779,6 +779,14 @@ LIGHTGBM_C_EXPORT int LGBM_BoosterRefit(BoosterHandle handle,
int32_t ncol);

/*!
* \brief Refit a single tree by specifying a new set of leaf scores for each data point
* \note
* The length of the array referenced by ``vals`` must be equal to the number of leaves.
* \param handle Handle of the Booster model
* \param tree_idx Index of the tree to refit
* \param vals The new set of leaf scores for each data point
* \param vals_size Number of data points for which leaf scores are provided
* \return 0 when successful, -1 when failure occurs
*/
LIGHTGBM_C_EXPORT int LGBM_BoosterRefitTreeManual(BoosterHandle handle,
int32_t tree_idx,
Loading
Oops, something went wrong.