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
f7b08b54
Unverified
Commit
f7b08b54
authored
Mar 22, 2018
by
Guolin Ke
Committed by
GitHub
Mar 22, 2018
Browse files
[R Package] remove default metrics since we have this in cpp side.
parent
19562a90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
27 deletions
+1
-27
R-package/R/utils.R
R-package/R/utils.R
+1
-27
No files found.
R-package/R/utils.R
View file @
f7b08b54
...
@@ -211,33 +211,7 @@ lgb.check.eval <- function(params, eval) {
...
@@ -211,33 +211,7 @@ lgb.check.eval <- function(params, eval) {
}
}
}
}
# Check if evaluation metric is not a function
if
(
!
is.function
(
eval
))
{
# Check if there is no parameter
if
(
length
(
params
$
metric
)
==
0
)
{
# Add default metric
params
$
metric
<-
switch
(
params
$
objective
,
regression
=
"l2"
,
# MSE
regression_l1
=
"l1"
,
# MAE
regression_l2
=
"l2"
,
# MSE
huber
=
"l1"
,
# Proxy for MAE
fair
=
"l1"
,
# Proxy for MAE
poisson
=
"poisson"
,
# Poisson
binary
=
"binary_logloss"
,
# Logloss
multiclass
=
"multi_logloss"
,
# Multiclass logloss
lambdarank
=
"ndcg"
,
# Normalized discounted cumulative gain
stop
(
"lgb.check.eval: No default metric available for objective "
,
sQuote
(
params
$
objective
))
# Unknown objective parameter
)
}
}
# Return parameters
# 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