Unverified Commit 9be084c6 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] [docs] document difference between lightgbm() and lgb.train() (fixes #5203) (#5273)



* [R-package] [docs] document difference between lightgbm() and lgb.train() (fixes #5203)

* clarify language

* Apply suggestions from code review
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
parent ab9236ba
#' @name lgb.train #' @name lgb.train
#' @title Main training logic for LightGBM #' @title Main training logic for LightGBM
#' @description Logic to train with LightGBM #' @description Low-level R interface to train a LightGBM model. Unlike \code{\link{lightgbm}},
#' this function is focused on performance (e.g. speed, memory efficiency). It is also
#' less likely to have breaking API changes in new releases than \code{\link{lightgbm}}.
#' @inheritParams lgb_shared_params #' @inheritParams lgb_shared_params
#' @param valids a list of \code{lgb.Dataset} objects, used for validation #' @param valids a list of \code{lgb.Dataset} objects, used for validation
#' @param record Boolean, TRUE will record iteration message to \code{booster$record_evals} #' @param record Boolean, TRUE will record iteration message to \code{booster$record_evals}
......
...@@ -89,7 +89,12 @@ NULL ...@@ -89,7 +89,12 @@ NULL
#' @name lightgbm #' @name lightgbm
#' @title Train a LightGBM model #' @title Train a LightGBM model
#' @description Simple interface for training a LightGBM model. #' @description High-level R interface to train a LightGBM model. Unlike \code{\link{lgb.train}}, this function
#' is focused on compatibility with other statistics and machine learning interfaces in R.
#' This focus on compatibility means that this interface may experience more frequent breaking API changes
#' than \code{\link{lgb.train}}.
#' For efficiency-sensitive applications, or for applications where breaking API changes across releases
#' is very expensive, use \code{\link{lgb.train}}.
#' @inheritParams lgb_shared_params #' @inheritParams lgb_shared_params
#' @param label Vector of labels, used if \code{data} is not an \code{\link{lgb.Dataset}} #' @param label Vector of labels, used if \code{data} is not an \code{\link{lgb.Dataset}}
#' @param weights Sample / observation weights for rows in the input data. If \code{NULL}, will assume that all #' @param weights Sample / observation weights for rows in the input data. If \code{NULL}, will assume that all
......
...@@ -107,7 +107,9 @@ original datasets} ...@@ -107,7 +107,9 @@ original datasets}
a trained booster model \code{lgb.Booster}. a trained booster model \code{lgb.Booster}.
} }
\description{ \description{
Logic to train with LightGBM Low-level R interface to train a LightGBM model. Unlike \code{\link{lightgbm}},
this function is focused on performance (e.g. speed, memory efficiency). It is also
less likely to have breaking API changes in new releases than \code{\link{lightgbm}}.
} }
\section{Early Stopping}{ \section{Early Stopping}{
......
...@@ -99,7 +99,12 @@ the "objective" item of the "Parameters" section of the documentation}.} ...@@ -99,7 +99,12 @@ the "objective" item of the "Parameters" section of the documentation}.}
a trained \code{lgb.Booster} a trained \code{lgb.Booster}
} }
\description{ \description{
Simple interface for training a LightGBM model. High-level R interface to train a LightGBM model. Unlike \code{\link{lgb.train}}, this function
is focused on compatibility with other statistics and machine learning interfaces in R.
This focus on compatibility means that this interface may experience more frequent breaking API changes
than \code{\link{lgb.train}}.
For efficiency-sensitive applications, or for applications where breaking API changes across releases
is very expensive, use \code{\link{lgb.train}}.
} }
\section{Early Stopping}{ \section{Early Stopping}{
......
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