зеркало из https://github.com/microsoft/LightGBM.git
[R-package] remove unused code in lgb.params2str() (#4337)
This commit is contained in:
Родитель
1b5bec0047
Коммит
2b485ce537
|
@ -24,7 +24,8 @@ lgb.last_error <- function() {
|
|||
stop("api error: ", err_msg)
|
||||
return(invisible(NULL))
|
||||
}
|
||||
lgb.params2str <- function(params, ...) {
|
||||
|
||||
lgb.params2str <- function(params) {
|
||||
|
||||
# Check for a list as input
|
||||
if (!identical(class(params), "list")) {
|
||||
|
@ -34,24 +35,6 @@ lgb.params2str <- function(params, ...) {
|
|||
# Split parameter names
|
||||
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
|
||||
ret <- list()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче