Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
3ede5fa2
Unverified
Commit
3ede5fa2
authored
Dec 07, 2021
by
James Lamb
Committed by
GitHub
Dec 07, 2021
Browse files
[R-package] remove support for 'info' in Dataset (#4866)
parent
fe535a0e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
33 deletions
+1
-33
R-package/R/lgb.Dataset.R
R-package/R/lgb.Dataset.R
+1
-19
R-package/man/lgb.Dataset.Rd
R-package/man/lgb.Dataset.Rd
+0
-5
R-package/man/lgb.Dataset.create.valid.Rd
R-package/man/lgb.Dataset.create.valid.Rd
+0
-5
R-package/man/lgb_shared_dataset_params.Rd
R-package/man/lgb_shared_dataset_params.Rd
+0
-4
No files found.
R-package/R/lgb.Dataset.R
View file @
3ede5fa2
...
@@ -10,9 +10,6 @@
...
@@ -10,9 +10,6 @@
#' \code{group = c(10, 20, 40, 10, 10, 10)}, that means that you have 6 groups,
#' \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
#' where the first 10 records are in the first group, records 11-30 are in the
#' second group, etc.
#' 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
#' @keywords internal
NULL
NULL
...
@@ -52,7 +49,6 @@ Dataset <- R6::R6Class(
...
@@ -52,7 +49,6 @@ Dataset <- R6::R6Class(
predictor
=
NULL
,
predictor
=
NULL
,
free_raw_data
=
TRUE
,
free_raw_data
=
TRUE
,
used_indices
=
NULL
,
used_indices
=
NULL
,
info
=
list
(),
label
=
NULL
,
label
=
NULL
,
weight
=
NULL
,
weight
=
NULL
,
group
=
NULL
,
group
=
NULL
,
...
@@ -66,14 +62,7 @@ Dataset <- R6::R6Class(
...
@@ -66,14 +62,7 @@ Dataset <- R6::R6Class(
stop
(
"lgb.Dataset: If provided, predictor must be a "
,
sQuote
(
"lgb.Predictor"
))
stop
(
"lgb.Dataset: If provided, predictor must be a "
,
sQuote
(
"lgb.Predictor"
))
}
}
if
(
length
(
info
)
>
0L
)
{
info
<-
list
()
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"
))
}
if
(
!
is.null
(
label
))
{
if
(
!
is.null
(
label
))
{
info
[[
"label"
]]
<-
label
info
[[
"label"
]]
<-
label
}
}
...
@@ -113,7 +102,6 @@ Dataset <- R6::R6Class(
...
@@ -113,7 +102,6 @@ Dataset <- R6::R6Class(
},
},
create_valid
=
function
(
data
,
create_valid
=
function
(
data
,
info
=
list
(),
label
=
NULL
,
label
=
NULL
,
weight
=
NULL
,
weight
=
NULL
,
group
=
NULL
,
group
=
NULL
,
...
@@ -148,7 +136,6 @@ Dataset <- R6::R6Class(
...
@@ -148,7 +136,6 @@ Dataset <- R6::R6Class(
,
predictor
=
private
$
predictor
,
predictor
=
private
$
predictor
,
free_raw_data
=
private
$
free_raw_data
,
free_raw_data
=
private
$
free_raw_data
,
used_indices
=
NULL
,
used_indices
=
NULL
,
info
=
info
,
label
=
label
,
label
=
label
,
weight
=
weight
,
weight
=
weight
,
group
=
group
,
group
=
group
...
@@ -599,7 +586,6 @@ Dataset <- R6::R6Class(
...
@@ -599,7 +586,6 @@ Dataset <- R6::R6Class(
,
predictor
=
private
$
predictor
,
predictor
=
private
$
predictor
,
free_raw_data
=
private
$
free_raw_data
,
free_raw_data
=
private
$
free_raw_data
,
used_indices
=
sort
(
idxset
,
decreasing
=
FALSE
)
,
used_indices
=
sort
(
idxset
,
decreasing
=
FALSE
)
,
info
=
NULL
,
group
=
group
,
group
=
group
,
init_score
=
init_score
,
init_score
=
init_score
,
label
=
label
,
label
=
label
...
@@ -826,7 +812,6 @@ lgb.Dataset <- function(data,
...
@@ -826,7 +812,6 @@ lgb.Dataset <- function(data,
colnames
=
NULL
,
colnames
=
NULL
,
categorical_feature
=
NULL
,
categorical_feature
=
NULL
,
free_raw_data
=
TRUE
,
free_raw_data
=
TRUE
,
info
=
list
(),
label
=
NULL
,
label
=
NULL
,
weight
=
NULL
,
weight
=
NULL
,
group
=
NULL
,
group
=
NULL
,
...
@@ -856,7 +841,6 @@ lgb.Dataset <- function(data,
...
@@ -856,7 +841,6 @@ lgb.Dataset <- function(data,
,
predictor
=
NULL
,
predictor
=
NULL
,
free_raw_data
=
free_raw_data
,
free_raw_data
=
free_raw_data
,
used_indices
=
NULL
,
used_indices
=
NULL
,
info
=
info
,
label
=
label
,
label
=
label
,
weight
=
weight
,
weight
=
weight
,
group
=
group
,
group
=
group
...
@@ -932,7 +916,6 @@ lgb.Dataset <- function(data,
...
@@ -932,7 +916,6 @@ lgb.Dataset <- function(data,
#' @export
#' @export
lgb.Dataset.create.valid
<-
function
(
dataset
,
lgb.Dataset.create.valid
<-
function
(
dataset
,
data
,
data
,
info
=
list
(),
label
=
NULL
,
label
=
NULL
,
weight
=
NULL
,
weight
=
NULL
,
group
=
NULL
,
group
=
NULL
,
...
@@ -958,7 +941,6 @@ lgb.Dataset.create.valid <- function(dataset,
...
@@ -958,7 +941,6 @@ lgb.Dataset.create.valid <- function(dataset,
return
(
invisible
(
return
(
invisible
(
dataset
$
create_valid
(
dataset
$
create_valid
(
data
=
data
data
=
data
,
info
=
info
,
label
=
label
,
label
=
label
,
weight
=
weight
,
weight
=
weight
,
group
=
group
,
group
=
group
...
...
R-package/man/lgb.Dataset.Rd
View file @
3ede5fa2
...
@@ -11,7 +11,6 @@ lgb.Dataset(
...
@@ -11,7 +11,6 @@ lgb.Dataset(
colnames = NULL,
colnames = NULL,
categorical_feature = NULL,
categorical_feature = NULL,
free_raw_data = TRUE,
free_raw_data = TRUE,
info = list(),
label = NULL,
label = NULL,
weight = NULL,
weight = NULL,
group = NULL,
group = NULL,
...
@@ -45,10 +44,6 @@ This reduces LightGBM's memory consumption, but it means that the Dataset object
...
@@ -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
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}.}
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{label}{vector of labels to use as the target variable}
\item{weight}{numeric vector of sample weights}
\item{weight}{numeric vector of sample weights}
...
...
R-package/man/lgb.Dataset.create.valid.Rd
View file @
3ede5fa2
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
lgb.Dataset.create.valid(
lgb.Dataset.create.valid(
dataset,
dataset,
data,
data,
info = list(),
label = NULL,
label = NULL,
weight = NULL,
weight = NULL,
group = NULL,
group = NULL,
...
@@ -23,10 +22,6 @@ lgb.Dataset.create.valid(
...
@@ -23,10 +22,6 @@ lgb.Dataset.create.valid(
a character representing a path to a text file (CSV, TSV, or LibSVM),
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}
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{label}{vector of labels to use as the target variable}
\item{weight}{numeric vector of sample weights}
\item{weight}{numeric vector of sample weights}
...
...
R-package/man/lgb_shared_dataset_params.Rd
View file @
3ede5fa2
...
@@ -16,10 +16,6 @@ to be ranked. For example, if you have a 100-document dataset with
...
@@ -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,
\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
where the first 10 records are in the first group, records 11-30 are in the
second group, etc.}
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{
\description{
Parameter docs for fields used in \code{lgb.Dataset} construction
Parameter docs for fields used in \code{lgb.Dataset} construction
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment