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
a8fae81f
Unverified
Commit
a8fae81f
authored
Jun 09, 2021
by
James Lamb
Committed by
GitHub
Jun 10, 2021
Browse files
[R-package] remove defaults in internal functions (#4361)
parent
24ac9208
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
R-package/R/callback.R
R-package/R/callback.R
+3
-3
R-package/R/lgb.cv.R
R-package/R/lgb.cv.R
+1
-1
No files found.
R-package/R/callback.R
View file @
a8fae81f
...
...
@@ -111,7 +111,7 @@ cb.reset.parameters <- function(new_params) {
}
# Format the evaluation metric string
format.eval.string
<-
function
(
eval_res
,
eval_err
=
NULL
)
{
format.eval.string
<-
function
(
eval_res
,
eval_err
)
{
# Check for empty evaluation string
if
(
is.null
(
eval_res
)
||
length
(
eval_res
)
==
0L
)
{
...
...
@@ -158,7 +158,7 @@ merge.eval.string <- function(env) {
}
cb.print.evaluation
<-
function
(
period
=
1L
)
{
cb.print.evaluation
<-
function
(
period
)
{
# Create callback
callback
<-
function
(
env
)
{
...
...
@@ -271,7 +271,7 @@ cb.record.evaluation <- function() {
}
cb.early.stop
<-
function
(
stopping_rounds
,
first_metric_only
=
FALSE
,
verbose
=
TRUE
)
{
cb.early.stop
<-
function
(
stopping_rounds
,
first_metric_only
,
verbose
)
{
factor_to_bigger_better
<-
NULL
best_iter
<-
NULL
...
...
R-package/R/lgb.cv.R
View file @
a8fae81f
...
...
@@ -509,7 +509,7 @@ generate.cv.folds <- function(nfold, nrows, stratified, label, group, params) {
# It was borrowed from caret::createFolds and simplified
# by always returning an unnamed list of fold indices.
#' @importFrom stats quantile
lgb.stratified.folds
<-
function
(
y
,
k
=
10L
)
{
lgb.stratified.folds
<-
function
(
y
,
k
)
{
## Group the numeric data based on their magnitudes
## and sample within those groups.
...
...
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