13 KiB
Note
本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
English · 原始项目 · 上游 README
原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
Note
本项目已于 2026 年 3 月从
Microsoft/LightGBM迁移至lightgbm-org/LightGBM。 本仓库仍是 LightGBM 的官方源代码,由同一批维护者(包括 LightGBM 的创建者)管理。 详情请参阅 https://github.com/lightgbm-org/LightGBM/issues/7187
Light Gradient Boosting Machine
LightGBM 是一个采用基于树的学习算法的梯度提升(gradient boosting)框架。它面向分布式与高效场景设计,具有以下优势:
- 更快的训练速度与更高的效率。
- 更低的内存占用。
- 更好的准确率。
- 支持并行、分布式与 GPU 学习。
- 能够处理大规模数据。
更多细节请参阅 Features.
得益于这些优势,LightGBM 已广泛应用于众多机器学习竞赛的获奖方案。
在公开数据集上的对比实验表明,LightGBM 在效率与准确率方面均可优于现有 boosting 框架,且内存消耗显著更低。此外,分布式学习实验表明,在特定设置下,LightGBM 可通过使用多台机器进行训练实现线性加速。
Get Started and Documentation
我们的主要文档位于 https://lightgbm.readthedocs.io/,由本仓库生成。如果你是 LightGBM 新手,请按照该站点上的安装说明操作。
接下来你可能想阅读:
- Examples展示常见任务的命令行用法。
- Features以及 LightGBM 支持的算法。
- Parameters是可进行自定义的详尽参数列表。
- Distributed Learning与 GPU Learning可加速计算。
- FLAML为 LightGBM 提供自动化调参(代码示例).
- Optuna Hyperparameter Tuner为 LightGBM 超参数提供自动化调参(代码示例).
- Understanding LightGBM Parameters (and How to Tune Them using Neptune).
面向贡献者的文档:
News
请参阅 GitHub releases页面的变更日志。
External (Unofficial) Repositories
此处列出的项目提供了使用 LightGBM 的替代方式。
它们并非由 LightGBM 开发团队维护或官方背书。
JPMML (Java PMML converter): https://github.com/jpmml/jpmml-lightgbm
Nyoka (Python PMML converter): https://github.com/SoftwareAG/nyoka
Treelite (model compiler for efficient deployment): https://github.com/dmlc/treelite
lleaves (LLVM-based model compiler for efficient inference): https://github.com/siboehm/lleaves
Hummingbird (model compiler into tensor computations): https://github.com/microsoft/hummingbird
GBNet (use LightGBM as a PyTorch Module): https://github.com/mthorrell/gbnet
cuML Forest Inference Library (GPU-accelerated inference): https://github.com/rapidsai/cuml
nvForest (GPU-accelerated inference): https://github.com/rapidsai/nvforest
daal4py (Intel CPU-accelerated inference): https://github.com/intel/scikit-learn-intelex/tree/master/daal4py
m2cgen (model appliers for various languages): https://github.com/BayesWitnesses/m2cgen
leaves(Go 模型应用器):https://github.com/dmitryikh/leaves
ONNXMLTools(ONNX 转换器):https://github.com/onnx/onnxmltools
SHAP(模型输出解释器):https://github.com/slundberg/shap
Shapash(模型可视化与解释):https://github.com/MAIF/shapash
dtreeviz(决策树可视化与模型解释):https://github.com/parrt/dtreeviz
supertree(决策树交互式可视化):https://github.com/mljar/supertree
SynapseML(Spark 上的 LightGBM):https://github.com/microsoft/SynapseML
Kubeflow Fairing(Kubernetes 上的 LightGBM):https://github.com/kubeflow/fairing
Kubeflow Operator(Kubernetes 上的 LightGBM):https://github.com/kubeflow/xgboost-operator
lightgbm_ray(Ray 上的 LightGBM):https://github.com/ray-project/lightgbm_ray
Ray(分布式计算框架):https://github.com/ray-project/ray
Mars(Mars 上的 LightGBM):https://github.com/mars-project/mars
ML.NET(.NET/C# 包):https://github.com/dotnet/machinelearning
LightGBM.NET(.NET/C# 包):https://github.com/rca22/LightGBM.Net
LightGBM Ruby(Ruby gem):https://github.com/ankane/lightgbm-ruby
LightGBM4j(Java 高级绑定):https://github.com/metarank/lightgbm4j
LightGBM4J(用 Scala 编写的 LightGBM JVM 接口):https://github.com/seek-oss/lightgbm4j
Julia-package:https://github.com/IQVIA-ML/LightGBM.jl
lightgbm3(Rust 绑定):https://github.com/Mottl/lightgbm3-rs
MLServer(LightGBM 推理服务器):https://github.com/SeldonIO/MLServer
MLflow(实验跟踪、模型监控框架):https://github.com/mlflow/mlflow
FLAML(用于超参数优化的 AutoML 库):https://github.com/microsoft/FLAML
MLJAR AutoML(表格数据上的 AutoML):https://github.com/mljar/mljar-supervised
Optuna(超参数优化框架):https://github.com/optuna/optuna
LightGBMLSS(基于 LightGBM 的概率建模):https://github.com/StatMixedML/LightGBMLSS
LightGBM-MoE(专家混合 / 状态切换扩展):https://github.com/kyo219/LightGBM-MoE
darts(使用 LightGBM 进行时间序列预测与异常检测):https://github.com/unit8co/darts
mlforecast(使用 LightGBM 进行时间序列预测):https://github.com/Nixtla/mlforecast
skforecast(使用 LightGBM 进行时间序列预测):https://github.com/JoaquinAmatRodrigo/skforecast
{bonsai}(符合 R {parsnip} 规范的接口):https://github.com/tidymodels/bonsai
{mlr3extralearners}(符合 R {mlr3} 规范的接口):https://github.com/mlr-org/mlr3extralearners
lightgbm-transform(特征转换绑定):https://github.com/lightgbm-org/LightGBM-transform
postgresml(通过 Postgres 扩展在 SQL 中进行 LightGBM 训练与预测):https://github.com/postgresml/postgresml
pyodide(在 Web 浏览器中运行 lightgbm Python 包):https://github.com/pyodide/pyodide
vaex-ml(自带 LightGBM 接口的 Python DataFrame 库):https://github.com/vaexio/vaex
支持
- 在 Stack Overflow 上使用
lightgbm标签提问, we monitor this for new questions. - 在 GitHub issues. 上提交 bug 报告 和 功能请求。
如何贡献
请参阅 CONTRIBUTING 页面。
Microsoft 开源行为准则
本项目已采纳 Microsoft Open Source Code of Conduct. 更多信息请参阅 Code of Conduct FAQ,或通过 opencode@microsoft.com 联系我们提出其他问题或意见。
参考论文
Yu Shi, Guolin Ke, Zhuoming Chen, Shuxin Zheng, Tie-Yan Liu. "Quantized Training of Gradient Boosting Decision Trees"(链接). Advances in Neural Information Processing Systems 35 (NeurIPS 2022), pp. 18822-18833.
Guolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, Tie-Yan Liu. "LightGBM: A Highly Efficient Gradient Boosting Decision Tree". Advances in Neural Information Processing Systems 30 (NIPS 2017), pp. 3149-3157.
Qi Meng, Guolin Ke, Taifeng Wang, Wei Chen, Qiwei Ye, Zhi-Ming Ma, Tie-Yan Liu. "A Communication-Efficient Parallel Algorithm for Decision Tree". Advances in Neural Information Processing Systems 29 (NIPS 2016), pp. 1279-1287.
Huan Zhang, Si Si and Cho-Jui Hsieh. "GPU Acceleration for Large-scale Tree Boosting". SysML Conference, 2018.
许可证
本项目依据 MIT 许可证条款授权。更多详情请参阅 LICENSE。