Development Guide
Algorithms
Refer to Features for understanding of important algorithms used in LightGBM.
Classes and Code Structure
Important Classes
Class |
Description |
---|---|
|
The entrance of application, including training and prediction logic |
|
Data structure used for storing feature discrete values (converted from float values) |
|
Boosting interface (GBDT, DART, etc.) |
|
Stores parameters and configurations |
|
Stores information of dataset |
|
Used to construct dataset |
|
Stores the data of feature, could be multiple features |
|
Evaluation metrics |
|
Network interfaces and communication algorithms |
|
Objective functions used to train |
|
Stores information of tree model |
|
Used to learn trees |
Code Structure
Path |
Description |
---|---|
./include |
Header files |
./include/utils |
Some common functions |
./src/application |
Implementations of training and prediction logic |
./src/boosting |
Implementations of Boosting |
./src/io |
Implementations of IO related classes, including |
./src/metric |
Implementations of metrics |
./src/network |
Implementations of network functions |
./src/objective |
Implementations of objective functions |
./src/treelearner |
Implementations of tree learners |
Documents API
Refer to docs README.
C API
Refer to C API or the comments in c_api.h file, from which the documentation is generated.
Tests
C++ unit tests are located in the ./tests/cpp_tests
folder and written with the help of Google Test framework.
To run tests locally first refer to the Installation Guide for how to build tests and then simply run compiled executable file.
It is highly recommended to build tests with sanitizers.
High Level Language Package
See the implementations at Python-package and R-package.
Questions
Refer to FAQ.
Also feel free to open issues if you met problems.