Unverified Commit 102893a1 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] fixed minor issues with tests and documentation (#2581)

parent 16c551c1
......@@ -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
......
......@@ -46,7 +46,7 @@
#' Species = c(
#' "setosa" = 3L
#' , "versicolor" = 2L
#' , virginica" = 1L
#' , "virginica" = 1L
#' )
#' )
#' newest_iris <- lgb.prepare_rules2(data = iris, rules = personal_rules)
......
......@@ -181,6 +181,7 @@ globalVariables(c(
"."
, ".N"
, ".SD"
, "abs_contribution"
, "Contribution"
, "Cover"
, "Feature"
......
......@@ -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(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment