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
2b485ce5
Unverified
Commit
2b485ce5
authored
Jun 04, 2021
by
James Lamb
Committed by
GitHub
Jun 04, 2021
Browse files
[R-package] remove unused code in lgb.params2str() (#4337)
parent
1b5bec00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
19 deletions
+2
-19
R-package/R/utils.R
R-package/R/utils.R
+2
-19
No files found.
R-package/R/utils.R
View file @
2b485ce5
...
@@ -24,7 +24,8 @@ lgb.last_error <- function() {
...
@@ -24,7 +24,8 @@ lgb.last_error <- function() {
stop
(
"api error: "
,
err_msg
)
stop
(
"api error: "
,
err_msg
)
return
(
invisible
(
NULL
))
return
(
invisible
(
NULL
))
}
}
lgb.params2str
<-
function
(
params
,
...
)
{
lgb.params2str
<-
function
(
params
)
{
# Check for a list as input
# Check for a list as input
if
(
!
identical
(
class
(
params
),
"list"
))
{
if
(
!
identical
(
class
(
params
),
"list"
))
{
...
@@ -34,24 +35,6 @@ lgb.params2str <- function(params, ...) {
...
@@ -34,24 +35,6 @@ lgb.params2str <- function(params, ...) {
# Split parameter names
# Split parameter names
names
(
params
)
<-
gsub
(
"\\."
,
"_"
,
names
(
params
))
names
(
params
)
<-
gsub
(
"\\."
,
"_"
,
names
(
params
))
# Merge parameters from the params and the dots-expansion
dot_params
<-
list
(
...
)
names
(
dot_params
)
<-
gsub
(
"\\."
,
"_"
,
names
(
dot_params
))
# Check for identical parameters
if
(
length
(
intersect
(
names
(
params
),
names
(
dot_params
)))
>
0L
)
{
stop
(
"Same parameters in "
,
sQuote
(
"params"
)
,
" and in the call are not allowed. Please check your "
,
sQuote
(
"params"
)
,
" list"
)
}
# Merge parameters
params
<-
c
(
params
,
dot_params
)
# Setup temporary variable
# Setup temporary variable
ret
<-
list
()
ret
<-
list
()
...
...
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