Unverified Commit 24ac9208 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[docs] document how to pass multi-value params from Python and R (fixes #4345) (#4346)



* [R-package] add docs and tests on monotone constraints (fixes #4345)

* remove tests

* move doc to top level

* slightly more specific

* Update docs/Parameters.rst
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
parent d677d6c6
......@@ -28,6 +28,26 @@ By using config files, one line can only contain one parameter. You can use ``#`
If one parameter appears in both command line and config file, LightGBM will use the parameter from the command line.
For the Python and R packages, any parameters that accept a list of values (usually they have ``multi-xxx`` type, e.g. ``multi-int`` or ``multi-double``) can be specified in those languages' default array types.
For example, ``monotone_constraints`` can be specified as follows.
**Python**
.. code-block:: python
params = {
"monotone_constraints": [-1, 0, 1]
}
**R**
.. code-block:: r
params <- list(
monotone_constraints = c(-1, 0, 1)
)
.. start params list
Core Parameters
......
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