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
4eb0745d
Unverified
Commit
4eb0745d
authored
Jan 01, 2020
by
James Lamb
Committed by
GitHub
Jan 01, 2020
Browse files
[R-package] simplified lgb.check.eval() (#2654)
parent
4075e495
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
R-package/R/utils.R
R-package/R/utils.R
+4
-12
No files found.
R-package/R/utils.R
View file @
4eb0745d
...
@@ -246,18 +246,10 @@ lgb.check.eval <- function(params, eval) {
...
@@ -246,18 +246,10 @@ lgb.check.eval <- function(params, eval) {
params
$
metric
<-
list
()
params
$
metric
<-
list
()
}
}
# Check if evaluation metric is null, if not then append it
# If 'eval' is a list or character vector, store it in 'metric'
if
(
!
is.null
(
eval
))
{
if
(
is.character
(
eval
)
||
is.list
(
eval
))
{
params
$
metric
<-
append
(
params
$
metric
,
eval
)
# Append metric if character or list
if
(
is.character
(
eval
)
||
is.list
(
eval
))
{
# Append metrics
params
$
metric
<-
append
(
params
$
metric
,
eval
)
}
}
}
# Return parameters
return
(
params
)
return
(
params
)
}
}
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