[python-package] [docs] Expand class docs for Dataset (#6558)

This commit is contained in:
Axel Durand 2024-07-24 21:45:59 +02:00 коммит произвёл GitHub
Родитель cbee5eea3e
Коммит 3d8013c83b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 24 добавлений и 7 удалений

Просмотреть файл

@ -63,4 +63,4 @@ Imports:
utils
SystemRequirements:
~~CXXSTD~~
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2

Просмотреть файл

@ -758,8 +758,13 @@ Dataset <- R6::R6Class(
)
#' @title Construct \code{lgb.Dataset} object
#' @description Construct \code{lgb.Dataset} object from dense matrix, sparse matrix
#' or local file (that was created previously by saving an \code{lgb.Dataset}).
#' @description LightGBM does not train on raw data.
#' It discretizes continuous features into histogram bins, tries to
#' combine categorical features, and automatically handles missing and
# infinite values.
#'
#' The \code{Dataset} class handles that preprocessing, and holds that
#' alternative representation of the input data.
#' @inheritParams lgb_shared_dataset_params
#' @param data a \code{matrix} object, a \code{dgCMatrix} object,
#' a character representing a path to a text file (CSV, TSV, or LibSVM),

Просмотреть файл

@ -60,8 +60,12 @@ second group, etc.}
constructed dataset
}
\description{
Construct \code{lgb.Dataset} object from dense matrix, sparse matrix
or local file (that was created previously by saving an \code{lgb.Dataset}).
LightGBM does not train on raw data.
It discretizes continuous features into histogram bins, tries to
combine categorical features, and automatically handles missing and
The \code{Dataset} class handles that preprocessing, and holds that
alternative representation of the input data.
}
\examples{
\donttest{

Просмотреть файл

@ -12,7 +12,7 @@ dependencies:
- r-markdown=1.12
- r-matrix=1.6_4
- r-pkgdown=2.0.7
- r-roxygen2=7.3.1
- r-roxygen2=7.3.2
- scikit-learn>=1.4.0
- sphinx>=6.0
- sphinx_rtd_theme>=2.0

Просмотреть файл

@ -1745,7 +1745,15 @@ class _InnerPredictor:
class Dataset:
"""Dataset in LightGBM."""
"""
Dataset in LightGBM.
LightGBM does not train on raw data.
It discretizes continuous features into histogram bins, tries to combine categorical features,
and automatically handles missing and infinite values.
This class handles that preprocessing, and holds that alternative representation of the input data.
"""
def __init__(
self,