-
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
[R-package] init_model should accept booster #5377
Comments
Thanks for your interest in LightGBM! It is possible to pass an The following minimal example works on the latest released version (v3.3.2) and on the latest development version (44fe591). library(lightgbm)
data(agaricus.train, package = "lightgbm")
dtrain <- lgb.Dataset(
agaricus.train$data
, label = agaricus.train$label
, free_raw_data = FALSE
)
initial_model <- lightgbm::lgb.train(
data = dtrain
, params = list(
objective = "binary"
, num_iterations = 10L
)
)
new_model <- lightgbm::lgb.train(
init_model = initial_model
, data = dtrain
, params = list(
objective = "binary"
, num_iterations = 17
)
)
new_model$current_iter()
# 27 In the future, when you open issues here please provide the information asked for in the issue template. Including:
|
Thanks, what threw me off here were the docs (version 3.2.2)
|
ha! that should say "OR" lgb.Booster not "OF" . Would you like to open a pull request fixing that in the documentation? |
Sure, will do it tomorrow :) |
This issue has been automatically locked since there has not been any recent activity since it was closed. |
Summary
It would be great if one could pass the lgb.Booster directly as
init_model
and not have to save it to disk first.The text was updated successfully, but these errors were encountered: