From 387de6679e05f3a5c7a99bf422a85f60988be889 Mon Sep 17 00:00:00 2001 From: David Cortes Date: Sun, 18 Apr 2021 12:51:13 -0400 Subject: [PATCH 1/3] use same default arguments as python --- R-package/R/lgb.cv.R | 4 ++-- R-package/R/lgb.train.R | 2 +- R-package/R/lightgbm.R | 2 +- R-package/man/lgb.cv.Rd | 4 ++-- R-package/man/lgb.train.Rd | 2 +- R-package/man/lightgbm.Rd | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R-package/R/lgb.cv.R b/R-package/R/lgb.cv.R index 31bb1b47b307..2ce05ce0d4ed 100644 --- a/R-package/R/lgb.cv.R +++ b/R-package/R/lgb.cv.R @@ -71,8 +71,8 @@ CVBooster <- R6::R6Class( #' @export lgb.cv <- function(params = list() , data - , nrounds = 10L - , nfold = 3L + , nrounds = 100L + , nfold = 5L , label = NULL , weight = NULL , obj = NULL diff --git a/R-package/R/lgb.train.R b/R-package/R/lgb.train.R index c33fc9946b11..18c8c094d020 100644 --- a/R-package/R/lgb.train.R +++ b/R-package/R/lgb.train.R @@ -48,7 +48,7 @@ #' @export lgb.train <- function(params = list(), data, - nrounds = 10L, + nrounds = 100L, valids = list(), obj = NULL, eval = NULL, diff --git a/R-package/R/lightgbm.R b/R-package/R/lightgbm.R index a63fe94e18a6..a874835a0cb0 100644 --- a/R-package/R/lightgbm.R +++ b/R-package/R/lightgbm.R @@ -103,7 +103,7 @@ lightgbm <- function(data, label = NULL, weight = NULL, params = list(), - nrounds = 10L, + nrounds = 100L, verbose = 1L, eval_freq = 1L, early_stopping_rounds = NULL, diff --git a/R-package/man/lgb.cv.Rd b/R-package/man/lgb.cv.Rd index b502faf4f837..1b53aa7c8279 100644 --- a/R-package/man/lgb.cv.Rd +++ b/R-package/man/lgb.cv.Rd @@ -7,8 +7,8 @@ lgb.cv( params = list(), data, - nrounds = 10L, - nfold = 3L, + nrounds = 100L, + nfold = 5L, label = NULL, weight = NULL, obj = NULL, diff --git a/R-package/man/lgb.train.Rd b/R-package/man/lgb.train.Rd index 77c3ee79c523..d2b9f9ecaf56 100644 --- a/R-package/man/lgb.train.Rd +++ b/R-package/man/lgb.train.Rd @@ -7,7 +7,7 @@ lgb.train( params = list(), data, - nrounds = 10L, + nrounds = 100L, valids = list(), obj = NULL, eval = NULL, diff --git a/R-package/man/lightgbm.Rd b/R-package/man/lightgbm.Rd index 80c3fb8583e7..4ec23e3d98ee 100644 --- a/R-package/man/lightgbm.Rd +++ b/R-package/man/lightgbm.Rd @@ -9,7 +9,7 @@ lightgbm( label = NULL, weight = NULL, params = list(), - nrounds = 10L, + nrounds = 100L, verbose = 1L, eval_freq = 1L, early_stopping_rounds = NULL, From 5c5f3ade71d1447cae66d4db8353b2b890269906 Mon Sep 17 00:00:00 2001 From: david-cortes Date: Sun, 18 Apr 2021 20:29:49 +0300 Subject: [PATCH 2/3] Update R-package/R/lgb.cv.R Changed. Co-authored-by: James Lamb --- R-package/R/lgb.cv.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R-package/R/lgb.cv.R b/R-package/R/lgb.cv.R index 2ce05ce0d4ed..7678ab6d7e8a 100644 --- a/R-package/R/lgb.cv.R +++ b/R-package/R/lgb.cv.R @@ -72,7 +72,7 @@ CVBooster <- R6::R6Class( lgb.cv <- function(params = list() , data , nrounds = 100L - , nfold = 5L + , nfold = 3L , label = NULL , weight = NULL , obj = NULL From 208acd352f5771a0f5561a2e21514605129a35a3 Mon Sep 17 00:00:00 2001 From: David Cortes Date: Sun, 18 Apr 2021 13:55:30 -0400 Subject: [PATCH 3/3] revert change in docs --- R-package/man/lgb.cv.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R-package/man/lgb.cv.Rd b/R-package/man/lgb.cv.Rd index 1b53aa7c8279..1778f244d7fa 100644 --- a/R-package/man/lgb.cv.Rd +++ b/R-package/man/lgb.cv.Rd @@ -8,7 +8,7 @@ lgb.cv( params = list(), data, nrounds = 100L, - nfold = 5L, + nfold = 3L, label = NULL, weight = NULL, obj = NULL,