Files
lightgbm-org--lightgbm/docs/Python-API.rst
T
Alexander L. Hayes 207bb3ef32 [docs] 🎨 Sphinx Autosummary for generating Python-API documentation (#2286)
* 🎨 `sphinx.ext.autosummary` for generating Python-API summaries

Add `docs/.gitignore` to not track autosummary stubs
Add `sphinx.ext.autosummary` in `docs/conf.py`
  Add 'members' and 'inherited-members' as default parameters
  Add 'autosummary = True' for setting output with `:toctree:`
Add `.. autosummary::` tags to replace `.. autoclass::`

Previously the `Python-API.rst` dumped all of the Python API onto
a single page.

This replaces the Python-API documentation with an index listing
all modules, and paginates all functions and classes onto
separate pages.

* ✏️ Corrections following feedback

Drop `docs/.gitignore` to use the general `.gitignore`
Add `show-inheritance` to `autodoc_default_flags` in `docs/conf.py`
Fix `both` to `class` in `autoclass_content` in `docs/conf.py`

* ✏️ Replacing deprecated Sphinx parameter

Fix deprecated `autodoc_default_flags` to `autodoc_default_options`

* ✏️ Adding `autodoc_default_flags` in to support early Sphinx versions

Add `autodoc_default_flags` with parameters from
  `autodoc_default_options`
2019-07-27 14:59:51 +03:00

57 lines
706 B
ReStructuredText

Python API
==========
.. currentmodule:: lightgbm
Data Structure API
------------------
.. autosummary::
:toctree: pythonapi/
Dataset
Booster
Training API
------------
.. autosummary::
:toctree: pythonapi/
train
cv
Scikit-learn API
----------------
.. autosummary::
:toctree: pythonapi/
LGBMModel
LGBMClassifier
LGBMRegressor
LGBMRanker
Callbacks
---------
.. autosummary::
:toctree: pythonapi/
early_stopping
print_evaluation
record_evaluation
reset_parameter
Plotting
--------
.. autosummary::
:toctree: pythonapi/
plot_importance
plot_split_value_histogram
plot_metric
plot_tree
create_tree_digraph