Skip to content

Commit

Permalink
[docs] documentation improvement (#976)
Browse files Browse the repository at this point in the history
* fixed typos and hotfixes

* converted gcc-tips.Rmd; added ref to gcc-tips

* renamed files

* renamed Advanced-Topics

* renamed README

* renamed Parameters-Tuning

* renamed FAQ

* fixed refs to FAQ

* fixed undecodable source characters

* renamed Features

* renamed Quick-Start

* fixed undecodable source characters in Features

* renamed Python-Intro

* renamed GPU-Tutorial

* renamed GPU-Windows

* fixed markdown

* fixed undecodable source characters in GPU-Windows

* renamed Parameters

* fixed markdown

* removed recommonmark dependence

* hotfixes

* added anchors to links

* fixed 404

* fixed typos

* added more anchors

* removed sphinxcontrib-napoleon dependence

* removed outdated line in Travis config

* fixed max-width of the ReadTheDocs theme

* added horizontal align to images
  • Loading branch information
StrikerRUS authored and henry0312 committed Oct 12, 2017
1 parent 12257fe commit 4aa3296
Show file tree
Hide file tree
Showing 43 changed files with 2,691 additions and 1,901 deletions.
7 changes: 3 additions & 4 deletions .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ cd $TRAVIS_BUILD_DIR
if [[ ${TASK} == "check-docs" ]]; then
cd docs
sudo apt-get install linkchecker
pip install rstcheck # html5validator
pip install -r requirements.txt
pip install rstcheck sphinx sphinx_rtd_theme # html5validator
rstcheck --report warning --ignore-directives=autoclass,autofunction `find . -type f -name "*.rst"` || exit -1
make html || exit -1
find ./_build/html/ -type f -name '*.html' -exec \
sed -i -e 's#\(\.\/[^.]*\.\)\(md\|rst\)#\1html#g' {} \; # Emulate js function
# html5validator --root ./_build/html/ || exit -1 For future (Sphinx 1.6) usage
sed -i -e 's;\(\.\/[^.]*\.\)rst\([^[:space:]]*\);\1html\2;g' {} \; # Emulate js function
# html5validator --root ./_build/html/ || exit -1
linkchecker --config=.linkcheckerrc ./_build/html/*.html || exit -1
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/lgb.cv.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CVBooster <- R6Class(
#' If early stopping occurs, the model will have 'best_iter' field
#' @param callbacks list of callback functions
#' List of callback functions that are applied at each iteration.
#' @param ... other parameters, see parameters.md for more informations
#' @param ... other parameters, see Parameters.rst for more informations
#'
#' @return a trained model \code{lgb.CVBooster}.
#'
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/lgb.train.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' @param reset_data Boolean, setting it to TRUE (not the default value) will transform the booster model into a predictor model which frees up memory and the original datasets
#' @param callbacks list of callback functions
#' List of callback functions that are applied at each iteration.
#' @param ... other parameters, see parameters.md for more informations
#' @param ... other parameters, see Parameters.rst for more informations
#'
#' @return a trained booster model \code{lgb.Booster}.
#'
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LightGBM is a gradient boosting framework that uses tree based learning algorith
- Parallel and GPU learning supported
- Capable of handling large-scale data

For more details, please refer to [Features](https://github.com/Microsoft/LightGBM/blob/master/docs/Features.md).
For more details, please refer to [Features](https://github.com/Microsoft/LightGBM/blob/master/docs/Features.rst).

[Comparison experiments](https://github.com/Microsoft/LightGBM/blob/master/docs/Experiments.rst#comparison-experiment) on public datasets show that LightGBM can outperform existing boosting frameworks on both efficiency and accuracy, with significantly lower memory consumption. What's more, the [parallel experiments](https://github.com/Microsoft/LightGBM/blob/master/docs/Experiments.rst#parallel-experiment) show that LightGBM can achieve a linear speed-up by using multiple machines for training in specific settings.

Expand All @@ -36,7 +36,7 @@ News

05/03/2017 : LightGBM v2 stable release.

04/10/2017 : LightGBM supports GPU-accelerated tree learning now. Please read our [GPU Tutorial](./docs/GPU-Tutorial.md) and [Performance Comparison](./docs/GPU-Performance.rst).
04/10/2017 : LightGBM supports GPU-accelerated tree learning now. Please read our [GPU Tutorial](./docs/GPU-Tutorial.rst) and [Performance Comparison](./docs/GPU-Performance.rst).

02/20/2017 : Update to LightGBM v2.

Expand All @@ -62,22 +62,22 @@ JPMML: https://github.com/jpmml/jpmml-lightgbm
Get Started and Documentation
-----------------------------

Install by following the [guide](https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst) for the command line program, [Python-package](https://github.com/Microsoft/LightGBM/tree/master/python-package) or [R-package](https://github.com/Microsoft/LightGBM/tree/master/R-package). Then please see the [Quick Start](https://github.com/Microsoft/LightGBM/blob/master/docs/Quick-Start.md) guide.
Install by following the [guide](https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst) for the command line program, [Python-package](https://github.com/Microsoft/LightGBM/tree/master/python-package) or [R-package](https://github.com/Microsoft/LightGBM/tree/master/R-package). Then please see the [Quick Start](https://github.com/Microsoft/LightGBM/blob/master/docs/Quick-Start.rst) guide.

Our primary documentation is at https://lightgbm.readthedocs.io/ and is generated from this repository.

Next you may want to read:

* [**Examples**](https://github.com/Microsoft/LightGBM/tree/master/examples) showing command line usage of common tasks
* [**Features**](https://github.com/Microsoft/LightGBM/blob/master/docs/Features.md) and algorithms supported by LightGBM
* [**Parameters**](https://github.com/Microsoft/LightGBM/blob/master/docs/Parameters.md) is an exhaustive list of customization you can make
* [**Parallel Learning**](https://github.com/Microsoft/LightGBM/blob/master/docs/Parallel-Learning-Guide.rst) and [**GPU Learning**](https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Tutorial.md) can speed up computation
* [**Features**](https://github.com/Microsoft/LightGBM/blob/master/docs/Features.rst) and algorithms supported by LightGBM
* [**Parameters**](https://github.com/Microsoft/LightGBM/blob/master/docs/Parameters.rst) is an exhaustive list of customization you can make
* [**Parallel Learning**](https://github.com/Microsoft/LightGBM/blob/master/docs/Parallel-Learning-Guide.rst) and [**GPU Learning**](https://github.com/Microsoft/LightGBM/blob/master/docs/GPU-Tutorial.rst) can speed up computation
* [**Laurae++ interactive documentation**](https://sites.google.com/view/lauraepp/parameters) is a detailed guide for hyperparameters

Documentation for contributors:

* [**How we Update readthedocs.io**](https://github.com/Microsoft/LightGBM/blob/master/docs/README.md)
* Check out the [Development Guide](https://github.com/Microsoft/LightGBM/blob/master/docs/development.rst).
* Check out the [Development Guide](https://github.com/Microsoft/LightGBM/blob/master/docs/Development-Guide.rst).

Support
-------
Expand Down
34 changes: 0 additions & 34 deletions docs/Advanced-Topic.md

This file was deleted.

59 changes: 59 additions & 0 deletions docs/Advanced-Topics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Advanced Topics
===============

Missing Value Handle
--------------------

- LightGBM enables the missing value handle by default, you can disable it by set ``use_missing=false``.

- LightGBM uses NA (NaN) to represent the missing value by default, you can change it to use zero by set ``zero_as_missing=true``.

- When ``zero_as_missing=false`` (default), the unshown value in sparse matrices (and LightSVM) is treated as zeros.

- When ``zero_as_missing=true``, NA and zeros (including unshown value in sparse matrices (and LightSVM)) are treated as missing.

Categorical Feature Support
---------------------------

- LightGBM can offer a good accuracy when using native categorical features. Not like simply one-hot coding, LightGBM can find the optimal split of categorical features.
Such an optimal split can provide the much better accuracy than one-hot coding solution.

- Use ``categorical_feature`` to specify the categorical features.
Refer to the parameter ``categorical_feature`` in `Parameters <./Parameters.rst>`__.

- Converting to ``int`` type is needed first, and there is support for non-negative numbers only.
It is better to convert into continues ranges.

- Use ``max_cat_group``, ``cat_smooth_ratio`` to deal with over-fitting
(when ``#data`` is small or ``#category`` is large).

- For categorical features with high cardinality (``#category`` is large), it is better to convert it to numerical features.

LambdaRank
----------

- The label should be ``int`` type, and larger numbers represent the higher relevance (e.g. 0:bad, 1:fair, 2:good, 3:perfect).

- Use ``label_gain`` to set the gain(weight) of ``int`` label.

- Use ``max_position`` to set the NDCG optimization position.

Parameters Tuning
-----------------

- Refer to `Parameters Tuning <./Parameters-Tuning.rst>`__.

Parallel Learning
-----------------

- Refer to `Parallel Learning Guide <./Parallel-Learning-Guide.rst>`__.

GPU Support
-----------

- Refer to `GPU Tutorial <./GPU-Tutorial.rst>`__ and `GPU Targets <./GPU-Targets.rst>`__.

Recommendations for gcc Users (MinGW, \*nix)
--------------------------------------------

- Refer to `gcc Tips <./gcc-Tips.rst>`__.
8 changes: 3 additions & 5 deletions docs/development.rst → docs/Development-Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Development Guide
Algorithms
----------

Refer to `Features <./Features.md>`__ to understand important algorithms used in LightGBM.
Refer to `Features <./Features.rst>`__ to understand important algorithms used in LightGBM.

Classes and Code Structure
--------------------------
Expand Down Expand Up @@ -68,9 +68,7 @@ Code Structure
Documents API
~~~~~~~~~~~~~

LightGBM support use `doxygen <http://www.stack.nl/~dimitri/doxygen/>`__ to generate documents for classes and functions.

Refer to `docs README <./README.md>`__.
Refer to `docs README <./README.rst>`__.

C API
-----
Expand All @@ -85,6 +83,6 @@ See the implementations at `Python-package <https://github.com/Microsoft/LightGB
Questions
---------

Refer to `FAQ <./FAQ.md>`__.
Refer to `FAQ <./FAQ.rst>`__.

Also feel free to open `issues <https://github.com/Microsoft/LightGBM/issues>`__ if you met problems.
138 changes: 0 additions & 138 deletions docs/FAQ.md

This file was deleted.

0 comments on commit 4aa3296

Please sign in to comment.