"tests/vscode:/vscode.git/clone" did not exist on "0a5c5838eb679a43fc45443f71adf31ec506de22"
Unverified Commit 3ede5fa2 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] remove support for 'info' in Dataset (#4866)

parent fe535a0e
......@@ -10,9 +10,6 @@
#' \code{group = c(10, 20, 40, 10, 10, 10)}, that means that you have 6 groups,
#' where the first 10 records are in the first group, records 11-30 are in the
#' second group, etc.
#' @param info a list of information of the \code{lgb.Dataset} object. NOTE: use of \code{info}
#' is deprecated as of v3.3.0. Use keyword arguments (e.g. \code{init_score = init_score})
#' directly.
#' @keywords internal
NULL
......@@ -52,7 +49,6 @@ Dataset <- R6::R6Class(
predictor = NULL,
free_raw_data = TRUE,
used_indices = NULL,
info = list(),
label = NULL,
weight = NULL,
group = NULL,
......@@ -66,14 +62,7 @@ Dataset <- R6::R6Class(
stop("lgb.Dataset: If provided, predictor must be a ", sQuote("lgb.Predictor"))
}
if (length(info) > 0L) {
warning(paste0(
"lgb.Dataset: found fields passed through 'info'. "
, "As of v3.3.0, this behavior is deprecated, and support for it will be removed in a future release. "
, "To suppress this warning, use keyword arguments 'label', 'weight', 'group', or 'init_score' directly"
))
}
info <- list()
if (!is.null(label)) {
info[["label"]] <- label
}
......@@ -113,7 +102,6 @@ Dataset <- R6::R6Class(
},
create_valid = function(data,
info = list(),
label = NULL,
weight = NULL,
group = NULL,
......@@ -148,7 +136,6 @@ Dataset <- R6::R6Class(
, predictor = private$predictor
, free_raw_data = private$free_raw_data
, used_indices = NULL
, info = info
, label = label
, weight = weight
, group = group
......@@ -599,7 +586,6 @@ Dataset <- R6::R6Class(
, predictor = private$predictor
, free_raw_data = private$free_raw_data
, used_indices = sort(idxset, decreasing = FALSE)
, info = NULL
, group = group
, init_score = init_score
, label = label
......@@ -826,7 +812,6 @@ lgb.Dataset <- function(data,
colnames = NULL,
categorical_feature = NULL,
free_raw_data = TRUE,
info = list(),
label = NULL,
weight = NULL,
group = NULL,
......@@ -856,7 +841,6 @@ lgb.Dataset <- function(data,
, predictor = NULL
, free_raw_data = free_raw_data
, used_indices = NULL
, info = info
, label = label
, weight = weight
, group = group
......@@ -932,7 +916,6 @@ lgb.Dataset <- function(data,
#' @export
lgb.Dataset.create.valid <- function(dataset,
data,
info = list(),
label = NULL,
weight = NULL,
group = NULL,
......@@ -958,7 +941,6 @@ lgb.Dataset.create.valid <- function(dataset,
return(invisible(
dataset$create_valid(
data = data
, info = info
, label = label
, weight = weight
, group = group
......
......@@ -11,7 +11,6 @@ lgb.Dataset(
colnames = NULL,
categorical_feature = NULL,
free_raw_data = TRUE,
info = list(),
label = NULL,
weight = NULL,
group = NULL,
......@@ -45,10 +44,6 @@ 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}.}
\item{info}{a list of information of the \code{lgb.Dataset} object. NOTE: use of \code{info}
is deprecated as of v3.3.0. Use keyword arguments (e.g. \code{init_score = init_score})
directly.}
\item{label}{vector of labels to use as the target variable}
\item{weight}{numeric vector of sample weights}
......
......@@ -7,7 +7,6 @@
lgb.Dataset.create.valid(
dataset,
data,
info = list(),
label = NULL,
weight = NULL,
group = NULL,
......@@ -23,10 +22,6 @@ lgb.Dataset.create.valid(
a character representing a path to a text file (CSV, TSV, or LibSVM),
or a character representing a path to a binary \code{Dataset} file}
\item{info}{a list of information of the \code{lgb.Dataset} object. NOTE: use of \code{info}
is deprecated as of v3.3.0. Use keyword arguments (e.g. \code{init_score = init_score})
directly.}
\item{label}{vector of labels to use as the target variable}
\item{weight}{numeric vector of sample weights}
......
......@@ -16,10 +16,6 @@ to be ranked. For example, if you have a 100-document dataset with
\code{group = c(10, 20, 40, 10, 10, 10)}, that means that you have 6 groups,
where the first 10 records are in the first group, records 11-30 are in the
second group, etc.}
\item{info}{a list of information of the \code{lgb.Dataset} object. NOTE: use of \code{info}
is deprecated as of v3.3.0. Use keyword arguments (e.g. \code{init_score = init_score})
directly.}
}
\description{
Parameter docs for fields used in \code{lgb.Dataset} construction
......
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