-
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
linear_tree parameter not recognised by R version of LightGBM #4001
Comments
@SpeckledJim2 Linear trees are not yet available in the CRAN release. As a workaround you can build the package from source, see: #3910 (comment) |
@SpeckledJim2 or to #3872 particularly to be notified about updates. |
That's great, all installed and working, thank you! I will raise another issue when I have created an example because when using predict() with predcontrib = TRUE the feature contributions no longer sum to prediction for the row if linear_tree = TRUE . I think the feature contributions aren't using the linear model in the leaves, they are still using the constant value, even when linear_tree = TRUE. |
Could you please check this one #3998? I guess it is the same case. |
This issue 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. |
Description
Warning message: [LightGBM] [Warning] Unknown parameter: linear_tree
Reproducible example
library(lightgbm)
x <- matrix(data = sample(rnorm(100L), size = 100L), ncol = 1L)
y <- 2L * x + runif(nrow(x), 0L, 0.1)
dtrain <- lgb.Dataset(data = x, label = y)
lgb_parameters <- list(
objective = "regression"
, linear_tree = TRUE # this parameter isn't recognised by lightGBM
, verbose = -1L
, metric = "mse"
, seed = 0L
, num_leaves = 2L
, bagging_freq = 1L
, subsample = 1.0
)
bst_linear <- lgb.train(
data = dtrain
, nrounds = 10L
, params = lgb_parameters
, valids = list("train" = dtrain)
)
Environment info
sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
lightgbm_3.1.1 R6_2.5.0, installed from CRAN using install.packages('lightgbm')
Many thanks for creating lightgbm!
The text was updated successfully, but these errors were encountered: