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
"tests/vscode:/vscode.git/clone" did not exist on "0a5c5838eb679a43fc45443f71adf31ec506de22"
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
Show 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 @@
#' \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
...
...
R-package/man/lgb.Dataset.Rd
View file @
3ede5fa2
...
...
@@ -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}
...
...
R-package/man/lgb.Dataset.create.valid.Rd
View file @
3ede5fa2
...
...
@@ -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}
...
...
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
\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
...
...
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