Unverified Commit 788f3a1a authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] remove unnecessary comments (#3356)

* [R-package] remove unused code and comments

* put check back

* other typos
parent fee6f4a2
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
\alias{lgb_shared_params} \alias{lgb_shared_params}
\title{Shared parameter docs} \title{Shared parameter docs}
\arguments{ \arguments{
\item{callbacks}{list of callback functions \item{callbacks}{List of callback functions that are applied at each iteration.}
List of callback functions that are applied at each iteration.}
\item{data}{a \code{lgb.Dataset} object, used for training. Some functions, such as \code{\link{lgb.cv}}, \item{data}{a \code{lgb.Dataset} object, used for training. Some functions, such as \code{\link{lgb.cv}},
may allow you to pass other types of data like \code{matrix} and then separately supply may allow you to pass other types of data like \code{matrix} and then separately supply
......
...@@ -45,8 +45,7 @@ If early stopping occurs, the model will have 'best_iter' field.} ...@@ -45,8 +45,7 @@ If early stopping occurs, the model will have 'best_iter' field.}
\item{init_model}{path of model file of \code{lgb.Booster} object, will continue training from this model} \item{init_model}{path of model file of \code{lgb.Booster} object, will continue training from this model}
\item{callbacks}{list of callback functions \item{callbacks}{List of callback functions that are applied at each iteration.}
List of callback functions that are applied at each iteration.}
\item{...}{Additional arguments passed to \code{\link{lgb.train}}. For example \item{...}{Additional arguments passed to \code{\link{lgb.train}}. For example
\itemize{ \itemize{
......
...@@ -13,7 +13,7 @@ set.seed(708L) ...@@ -13,7 +13,7 @@ set.seed(708L)
# This is used to mock the situation where an evaluation # This is used to mock the situation where an evaluation
# metric increases every iteration # metric increases every iteration
ACCUMULATOR_NAME <- "INCREASING_METRIC_ACUMULATOR" ACCUMULATOR_NAME <- "INCREASING_METRIC_ACUMULATOR"
assign(x = "INCREASING_METRIC_ACUMULATOR", value = 0.0, envir = .GlobalEnv) assign(x = ACCUMULATOR_NAME, value = 0.0, envir = .GlobalEnv)
.increasing_metric <- function(preds, dtrain) { .increasing_metric <- function(preds, dtrain) {
if (!exists(ACCUMULATOR_NAME, envir = .GlobalEnv)) { if (!exists(ACCUMULATOR_NAME, envir = .GlobalEnv)) {
......
context(".METRICS_HIGHER_BETTER()") context(".METRICS_HIGHER_BETTER()")
test_that(".METRICS_HIGHER_BETTTER() should be well formed", { test_that(".METRICS_HIGHER_BETTER() should be well formed", {
metrics <- .METRICS_HIGHER_BETTER() metrics <- .METRICS_HIGHER_BETTER()
metric_names <- names(.METRICS_HIGHER_BETTER()) metric_names <- names(.METRICS_HIGHER_BETTER())
# should be a logical vector # should be a logical vector
......
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