Unverified Commit 4848776f authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[docs] clarified support of LibSVM zero-based format files (#2504)

parent b0500dde
...@@ -172,6 +172,11 @@ In ``LightGBM``, `we have decided to require that users specify this set directl ...@@ -172,6 +172,11 @@ In ``LightGBM``, `we have decided to require that users specify this set directl
The appropriate splitting strategy depends on the task and domain of the data, information that a modeler has but which ``LightGBM`` as a general-purpose tool does not. The appropriate splitting strategy depends on the task and domain of the data, information that a modeler has but which ``LightGBM`` as a general-purpose tool does not.
13. Does LightGBM support direct loading data from zero-based or one-based LibSVM format file?
----------------------------------------------------------------------------------------------
LightGBM supports loading data from zero-based LibSVM format file directly.
------ ------
R-package R-package
......
...@@ -577,7 +577,7 @@ IO Parameters ...@@ -577,7 +577,7 @@ IO Parameters
- ``zero_as_missing`` :raw-html:`<a id="zero_as_missing" title="Permalink to this parameter" href="#zero_as_missing">&#x1F517;&#xFE0E;</a>`, default = ``false``, type = bool - ``zero_as_missing`` :raw-html:`<a id="zero_as_missing" title="Permalink to this parameter" href="#zero_as_missing">&#x1F517;&#xFE0E;</a>`, default = ``false``, type = bool
- set this to ``true`` to treat all zero as missing values (including the unshown values in libsvm/sparse matrices) - set this to ``true`` to treat all zero as missing values (including the unshown values in LibSVM / sparse matrices)
- set this to ``false`` to use ``na`` for representing missing values - set this to ``false`` to use ``na`` for representing missing values
......
...@@ -34,7 +34,7 @@ Data Interface ...@@ -34,7 +34,7 @@ Data Interface
The LightGBM Python module can load data from: The LightGBM Python module can load data from:
- libsvm/tsv/csv/txt format file - LibSVM (zero-based) / TSV / CSV / TXT format file
- NumPy 2D array(s), pandas DataFrame, H2O DataTable's Frame, SciPy sparse matrix - NumPy 2D array(s), pandas DataFrame, H2O DataTable's Frame, SciPy sparse matrix
...@@ -48,7 +48,7 @@ Many of the examples in this page use functionality from ``numpy``. To run the e ...@@ -48,7 +48,7 @@ Many of the examples in this page use functionality from ``numpy``. To run the e
import numpy as np import numpy as np
**To load a libsvm text file or a LightGBM binary file into Dataset:** **To load a LibSVM (zero-based) text file or a LightGBM binary file into Dataset:**
.. code:: python .. code:: python
......
...@@ -18,7 +18,7 @@ Follow the `Installation Guide <./Installation-Guide.rst>`__ to install LightGBM ...@@ -18,7 +18,7 @@ Follow the `Installation Guide <./Installation-Guide.rst>`__ to install LightGBM
Training Data Format Training Data Format
-------------------- --------------------
LightGBM supports input data files with `CSV`_, `TSV`_ and `LibSVM`_ formats. LightGBM supports input data files with `CSV`_, `TSV`_ and `LibSVM`_ (zero-based) formats.
Files could be both with and without `headers <./Parameters.rst#header>`__. Files could be both with and without `headers <./Parameters.rst#header>`__.
......
...@@ -551,7 +551,7 @@ struct Config { ...@@ -551,7 +551,7 @@ struct Config {
// desc = set this to ``false`` to disable the special handle of missing value // desc = set this to ``false`` to disable the special handle of missing value
bool use_missing = true; bool use_missing = true;
// desc = set this to ``true`` to treat all zero as missing values (including the unshown values in libsvm/sparse matrices) // desc = set this to ``true`` to treat all zero as missing values (including the unshown values in LibSVM / sparse matrices)
// desc = set this to ``false`` to use ``na`` for representing missing values // desc = set this to ``false`` to use ``na`` for representing missing values
bool zero_as_missing = false; bool zero_as_missing = false;
......
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