"vscode:/vscode.git/clone" did not exist on "aa774f38f88ceedb3eb6ee19f94d94c8b1199bf9"
Unverified Commit ea87dd88 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] remove support for '...' in `lgb.Dataset()` (#4874)

parent de08d149
......@@ -776,7 +776,6 @@ Dataset <- R6::R6Class(
#' This reduces LightGBM's memory consumption, but it means that the Dataset object
#' cannot be changed after it has been constructed. If you'd prefer to be able to
#' change the Dataset object after construction, set \code{free_raw_data = FALSE}.
#' @param ... other parameters passed to \code{params}
#'
#' @return constructed dataset
#'
......@@ -800,22 +799,8 @@ lgb.Dataset <- function(data,
label = NULL,
weight = NULL,
group = NULL,
init_score = NULL,
...) {
additional_params <- list(...)
params <- modifyList(params, additional_params)
if (length(additional_params) > 0L) {
warning(paste0(
"lgb.Dataset: Found the following passed through '...': "
, paste(names(additional_params), collapse = ", ")
, ". These will be used, but in future releases of lightgbm, this warning will become an error. "
, "Add these to 'params' instead. See ?lgb.Dataset for documentation on how to call this function."
))
}
init_score = NULL) {
# Create new dataset
return(
invisible(Dataset$new(
data = data
......
......@@ -14,8 +14,7 @@ lgb.Dataset(
label = NULL,
weight = NULL,
group = NULL,
init_score = NULL,
...
init_score = NULL
)
}
\arguments{
......@@ -56,8 +55,6 @@ where the first 10 records are in the first group, records 11-30 are in the
second group, etc.}
\item{init_score}{initial score is the base prediction lightgbm will boost from}
\item{...}{other parameters passed to \code{params}}
}
\value{
constructed dataset
......
......@@ -2075,7 +2075,9 @@ test_that("lgb.train() works with linear learners and data where a feature has o
return(lgb.Dataset(
data = X
, label = 2L * X[, 1L] + runif(nrow(X), 0L, 0.1)
, feature_pre_filter = FALSE
, params = list(
feature_pre_filter = FALSE
)
))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment