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
ac2a9141
Commit
ac2a9141
authored
Sep 29, 2017
by
Bernie Gray
Committed by
Huan Zhang
Sep 29, 2017
Browse files
closes #946 and #947 (#948)
fix typos in callback.R and lgb.cv.R, closing #946 and #947
parent
6068ba5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
R-package/R/callback.R
R-package/R/callback.R
+1
-1
R-package/R/lgb.cv.R
R-package/R/lgb.cv.R
+1
-1
No files found.
R-package/R/callback.R
View file @
ac2a9141
...
@@ -132,7 +132,7 @@ merge.eval.string <- function(env) {
...
@@ -132,7 +132,7 @@ merge.eval.string <- function(env) {
msg
<-
list
(
sprintf
(
"[%d]:"
,
env
$
iteration
))
msg
<-
list
(
sprintf
(
"[%d]:"
,
env
$
iteration
))
# Set if evaluation error
# Set if evaluation error
is_eval_err
or
<-
length
(
env
$
eval_err_list
)
>
0
is_eval_err
<-
length
(
env
$
eval_err_list
)
>
0
# Loop through evaluation list
# Loop through evaluation list
for
(
j
in
seq_along
(
env
$
eval_list
))
{
for
(
j
in
seq_along
(
env
$
eval_list
))
{
...
...
R-package/R/lgb.cv.R
View file @
ac2a9141
...
@@ -217,7 +217,7 @@ lgb.cv <- function(params = list(),
...
@@ -217,7 +217,7 @@ lgb.cv <- function(params = list(),
# Check for early stopping passed as parameter when adding early stopping callback
# Check for early stopping passed as parameter when adding early stopping callback
early_stop
<-
c
(
"early_stopping_round"
,
"early_stopping_rounds"
,
"early_stopping"
)
early_stop
<-
c
(
"early_stopping_round"
,
"early_stopping_rounds"
,
"early_stopping"
)
if
(
any
(
names
(
params
)
%in%
eary_stop
))
{
if
(
any
(
names
(
params
)
%in%
ear
l
y_stop
))
{
if
(
params
[[
which
(
names
(
params
)
%in%
early_stop
)[
1
]]]
>
0
)
{
if
(
params
[[
which
(
names
(
params
)
%in%
early_stop
)[
1
]]]
>
0
)
{
callbacks
<-
add.cb
(
callbacks
,
cb.early.stop
(
params
[[
which
(
names
(
params
)
%in%
early_stop
)[
1
]]],
verbose
=
verbose
))
callbacks
<-
add.cb
(
callbacks
,
cb.early.stop
(
params
[[
which
(
names
(
params
)
%in%
early_stop
)[
1
]]],
verbose
=
verbose
))
}
}
...
...
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