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
102893a1
Unverified
Commit
102893a1
authored
Nov 25, 2019
by
James Lamb
Committed by
GitHub
Nov 25, 2019
Browse files
[R-package] fixed minor issues with tests and documentation (#2581)
parent
16c551c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
R-package/R/lgb.cv.R
R-package/R/lgb.cv.R
+1
-1
R-package/R/lgb.prepare_rules2.R
R-package/R/lgb.prepare_rules2.R
+1
-1
R-package/R/lightgbm.R
R-package/R/lightgbm.R
+1
-0
R-package/tests/testthat/test_parameters.R
R-package/tests/testthat/test_parameters.R
+2
-2
No files found.
R-package/R/lgb.cv.R
View file @
102893a1
...
...
@@ -360,7 +360,7 @@ lgb.cv <- function(params = list()
# Store temporarily model data elsewhere
booster_old
<-
list
(
best_iter
=
fd
$
booster
$
best_iter
,
best_score
=
fd
$
booster
$
best_score
,
,
best_score
=
fd
$
booster
$
best_score
,
record_evals
=
fd
$
booster
$
record_evals
)
# Reload model
...
...
R-package/R/lgb.prepare_rules2.R
View file @
102893a1
...
...
@@ -46,7 +46,7 @@
#' Species = c(
#' "setosa" = 3L
#' , "versicolor" = 2L
#' , virginica" = 1L
#' ,
"
virginica" = 1L
#' )
#' )
#' newest_iris <- lgb.prepare_rules2(data = iris, rules = personal_rules)
...
...
R-package/R/lightgbm.R
View file @
102893a1
...
...
@@ -181,6 +181,7 @@ globalVariables(c(
"."
,
".N"
,
".SD"
,
"abs_contribution"
,
"Contribution"
,
"Cover"
,
"Feature"
...
...
R-package/tests/testthat/test_parameters.R
View file @
102893a1
...
...
@@ -44,7 +44,7 @@ test_that("Feature penalties work properly", {
expect_length
(
var_gain
[[
length
(
var_gain
)]],
0L
)
})
expect_true
(
".PARAMETER_ALIASES() returns a named list"
,
{
test_that
(
".PARAMETER_ALIASES() returns a named list"
,
{
param_aliases
<-
.PARAMETER_ALIASES
()
expect_true
(
is.list
(
param_aliases
))
expect_true
(
is.character
(
names
(
param_aliases
)))
...
...
@@ -55,7 +55,7 @@ expect_true(".PARAMETER_ALIASES() returns a named list", {
expect_true
(
is.character
(
param_aliases
[[
"num_iterations"
]]))
})
expect_true
(
"training should warn if you use 'dart' boosting, specified with 'boosting' or aliases"
,
{
test_that
(
"training should warn if you use 'dart' boosting, specified with 'boosting' or aliases"
,
{
for
(
boosting_param
in
.PARAMETER_ALIASES
()[[
"boosting"
]])
{
expect_warning
({
result
<-
lightgbm
(
...
...
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