Unverified Commit e12409fd authored by Issac Lee's avatar Issac Lee Committed by GitHub
Browse files

[docs][R-package] Update the explanation of num_threads (fixes #4192) (#4199)

* update the explanation of num_threads in lightgbm.R

* adjusted sentences for linting.

* remove white space for lintr pass

* add note about num_thread param in files
parent 69d02e38
......@@ -46,8 +46,9 @@ CVBooster <- R6::R6Class(
#' \item{\code{max_depth}: Limit the max depth for tree model. This is used to deal with
#' overfit when #data is small. Tree still grow by leaf-wise.}
#' \item{\code{num_threads}: Number of threads for LightGBM. For the best speed, set this to
#' the number of real CPU cores, not the number of threads (most
#' CPU using hyper-threading to generate 2 threads per CPU core).}
#' the number of real CPU cores(\code{parallel::detectCores(logical = FALSE)}),
#' not the number of threads (most CPU using hyper-threading to generate 2 threads
#' per CPU core).}
#' }
#' @inheritSection lgb_shared_params Early Stopping
#' @return a trained model \code{lgb.CVBooster}.
......
......@@ -19,8 +19,9 @@
#' \item{\code{max_depth}: Limit the max depth for tree model. This is used to deal with
#' overfit when #data is small. Tree still grow by leaf-wise.}
#' \item{\code{num_threads}: Number of threads for LightGBM. For the best speed, set this to
#' the number of real CPU cores, not the number of threads (most
#' CPU using hyper-threading to generate 2 threads per CPU core).}
#' the number of real CPU cores(\code{parallel::detectCores(logical = FALSE)}),
#' not the number of threads (most CPU using hyper-threading to generate 2 threads
#' per CPU core).}
#' }
#' @inheritSection lgb_shared_params Early Stopping
#' @return a trained booster model \code{lgb.Booster}.
......
......@@ -93,8 +93,9 @@ NULL
#' \item{\code{max_depth}: Limit the max depth for tree model. This is used to deal with
#' overfit when #data is small. Tree still grow by leaf-wise.}
#' \item{\code{num_threads}: Number of threads for LightGBM. For the best speed, set this to
#' the number of real CPU cores, not the number of threads (most
#' CPU using hyper-threading to generate 2 threads per CPU core).}
#' the number of real CPU cores(\code{parallel::detectCores(logical = FALSE)}),
#' not the number of threads (most CPU using hyper-threading to generate 2 threads
#' per CPU core).}
#' }
#' @inheritSection lgb_shared_params Early Stopping
#' @return a trained \code{lgb.Booster}
......
......@@ -121,8 +121,9 @@ into a predictor model which frees up memory and the original datasets}
\item{\code{max_depth}: Limit the max depth for tree model. This is used to deal with
overfit when #data is small. Tree still grow by leaf-wise.}
\item{\code{num_threads}: Number of threads for LightGBM. For the best speed, set this to
the number of real CPU cores, not the number of threads (most
CPU using hyper-threading to generate 2 threads per CPU core).}
the number of real CPU cores(\code{parallel::detectCores(logical = FALSE)}),
not the number of threads (most CPU using hyper-threading to generate 2 threads
per CPU core).}
}}
}
\value{
......
......@@ -104,8 +104,9 @@ original datasets}
\item{\code{max_depth}: Limit the max depth for tree model. This is used to deal with
overfit when #data is small. Tree still grow by leaf-wise.}
\item{\code{num_threads}: Number of threads for LightGBM. For the best speed, set this to
the number of real CPU cores, not the number of threads (most
CPU using hyper-threading to generate 2 threads per CPU core).}
the number of real CPU cores(\code{parallel::detectCores(logical = FALSE)}),
not the number of threads (most CPU using hyper-threading to generate 2 threads
per CPU core).}
}}
}
\value{
......
......@@ -66,8 +66,9 @@ If early stopping occurs, the model will have 'best_iter' field.}
\item{\code{max_depth}: Limit the max depth for tree model. This is used to deal with
overfit when #data is small. Tree still grow by leaf-wise.}
\item{\code{num_threads}: Number of threads for LightGBM. For the best speed, set this to
the number of real CPU cores, not the number of threads (most
CPU using hyper-threading to generate 2 threads per CPU core).}
the number of real CPU cores(\code{parallel::detectCores(logical = FALSE)}),
not the number of threads (most CPU using hyper-threading to generate 2 threads
per CPU core).}
}}
}
\value{
......
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