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
8967debe
"src/vscode:/vscode.git/clone" did not exist on "7f0d5358db824a6d1b0f41621952195e30082035"
Unverified
Commit
8967debe
authored
Jul 20, 2023
by
James Lamb
Committed by
GitHub
Jul 20, 2023
Browse files
[R-package] remove unused internal variables (#5991)
parent
9a84b61d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
13 deletions
+4
-13
R-package/R/lgb.Dataset.R
R-package/R/lgb.Dataset.R
+3
-4
R-package/R/lgb.Predictor.R
R-package/R/lgb.Predictor.R
+0
-2
R-package/R/lgb.convert_with_rules.R
R-package/R/lgb.convert_with_rules.R
+0
-4
R-package/R/lgb.cv.R
R-package/R/lgb.cv.R
+0
-2
R-package/tests/testthat/test_lgb.Booster.R
R-package/tests/testthat/test_lgb.Booster.R
+1
-1
No files found.
R-package/R/lgb.Dataset.R
View file @
8967debe
...
...
@@ -494,11 +494,10 @@ Dataset <- R6::R6Class(
if
(
info_len
>
0L
)
{
# Get back fields
ret
<-
NULL
ret
<-
if
(
field_name
==
"group"
)
{
integer
(
info_len
)
if
(
field_name
==
"group"
)
{
ret
<-
integer
(
info_len
)
}
else
{
numeric
(
info_len
)
ret
<-
numeric
(
info_len
)
}
.Call
(
...
...
R-package/R/lgb.Predictor.R
View file @
8967debe
...
...
@@ -98,8 +98,6 @@ Predictor <- R6::R6Class(
start_iteration
<-
0L
}
num_row
<-
0L
# Check if data is a file name and not a matrix
if
(
identical
(
class
(
data
),
"character"
)
&&
length
(
data
)
==
1L
)
{
...
...
R-package/R/lgb.convert_with_rules.R
View file @
8967debe
...
...
@@ -116,10 +116,6 @@ lgb.convert_with_rules <- function(data, rules = NULL) {
column_classes
<-
.get_column_classes
(
df
=
data
)
is_char
<-
which
(
column_classes
==
"character"
)
is_factor
<-
which
(
column_classes
==
"factor"
)
is_logical
<-
which
(
column_classes
==
"logical"
)
is_data_table
<-
data.table
::
is.data.table
(
x
=
data
)
is_data_frame
<-
is.data.frame
(
data
)
...
...
R-package/R/lgb.cv.R
View file @
8967debe
...
...
@@ -225,8 +225,6 @@ lgb.cv <- function(params = list()
stop
(
sQuote
(
"folds"
),
" must be a list with 2 or more elements that are vectors of indices for each CV-fold"
)
}
nfold
<-
length
(
folds
)
}
else
{
if
(
nfold
<=
1L
)
{
...
...
R-package/tests/testthat/test_lgb.Booster.R
View file @
8967debe
...
...
@@ -1341,7 +1341,7 @@ test_that("Booster's print, show, and summary work correctly", {
.has_expected_content_for_fitted_model
(
log_txt
)
# summary()
log_t
e
xt
<-
capture.output
({
log_txt
<-
capture.output
({
ret
<-
summary
(
model
)
})
.have_same_handle
(
ret
,
model
)
...
...
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