{"schemaVersion":"1.0","record":{"label":"LightGBM","description":"Histogram-based gradient-boosting library for classification, regression and ranking with native categorical handling.","aliases":[],"kind":"software","website":"https://lightgbm.readthedocs.io/","overview":"LightGBM is a gradient-boosting framework that builds decision trees using binned feature values and leaf-wise growth. It supports classification, regression and ranking, with Python data interfaces and separate CPU and accelerator implementations.","license":"Open source under the MIT license.","lifecycle":"active","example":false,"features":[{"name":"Histogram tree boosting","status":"supported","detail":"Offers regression, classification and ranking; leaf-wise growth remains leaf-wise even when maximum depth is limited.","useCase":"Boosted-tree classification, regression and ranking on tabular data","platforms":["Windows","macOS","Linux"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://lightgbm.readthedocs.io/en/stable/Features.html","locator":"Histogram algorithms, leaf-wise growth and modeling tasks","retrievedAt":"2026-10-07T16:58:47Z","kind":"vendor"}]},{"name":"Categorical and sparse inputs","status":"limited","detail":"Integer category codes and pandas categorical alignment are supported; negative category codes and unseen categories are treated as missing. Sparse zero semantics depend on configuration.","useCase":"Boosted-tree classification, regression and ranking on tabular data","platforms":["Windows","macOS","Linux"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://lightgbm.readthedocs.io/en/stable/Advanced-Topics.html","locator":"Missing values and categorical encoding","retrievedAt":"2026-10-07T16:58:47Z","kind":"vendor"}]},{"name":"GPU acceleration","status":"limited","detail":"OpenCL, CUDA and ROCm are separate implementations with platform/build restrictions; macOS GPU builds are not supported by the installation guide.","useCase":"Boosted-tree classification, regression and ranking on tabular data","platforms":["Windows","Linux"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://lightgbm.readthedocs.io/en/stable/Installation-Guide.html","locator":"CPU, OpenCL, CUDA and ROCm platform distinctions","retrievedAt":"2026-10-07T16:58:59Z","kind":"vendor"}]}],"alternatives":[],"slug":"lightgbm","draftAlternatives":[{"targetSlug":"xgboost","status":"limited","detail":"Can replace XGBoost for training boosted-tree classifiers, regressors or ranking models. Requires retuning, verified category/missing-value semantics and a new model, not direct artifact interchange.","useCase":"Boosted-tree classification, regression and ranking on tabular data","platforms":["Windows","macOS","Linux"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://lightgbm.readthedocs.io/en/stable/Features.html","locator":"Histogram algorithms, leaf-wise growth and modeling tasks","retrievedAt":"2026-10-07T16:58:47Z","kind":"vendor"},{"url":"https://lightgbm.readthedocs.io/en/stable/Advanced-Topics.html","locator":"Missing values and categorical encoding","retrievedAt":"2026-10-07T16:58:47Z","kind":"vendor"},{"url":"https://xgboost.readthedocs.io/en/stable/python/sklearn_estimator.html","locator":"Classification, regression and ranking","retrievedAt":"2026-10-07T16:58:00Z","kind":"vendor"}]}],"evidence":[{"url":"https://lightgbm.readthedocs.io/en/stable/Features.html","locator":"Histogram algorithms, leaf-wise growth and modeling tasks","retrievedAt":"2026-10-07T16:58:47Z","kind":"vendor"},{"url":"https://lightgbm.readthedocs.io/en/stable/Python-Intro.html","locator":"Data interfaces, validation alignment and save/load","retrievedAt":"2026-10-07T16:58:47Z","kind":"vendor"},{"url":"https://lightgbm.readthedocs.io/en/stable/Installation-Guide.html","locator":"CPU, OpenCL, CUDA and ROCm platform distinctions","retrievedAt":"2026-10-07T16:58:59Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://lightgbm.readthedocs.io/en/stable/Features.html","locator":"Histogram algorithms, leaf-wise growth and modeling tasks","retrievedAt":"2026-10-07T16:58:47Z","id":"features","title":"LightGBM features","kind":"vendor"},{"url":"https://lightgbm.readthedocs.io/en/stable/Advanced-Topics.html","locator":"Missing values and categorical encoding","retrievedAt":"2026-10-07T16:58:47Z","id":"advanced","title":"Advanced topics","kind":"vendor"},{"url":"https://lightgbm.readthedocs.io/en/stable/Python-Intro.html","locator":"Data interfaces, validation alignment and save/load","retrievedAt":"2026-10-07T16:58:47Z","id":"python","title":"Python-package introduction","kind":"vendor"},{"url":"https://lightgbm.readthedocs.io/en/stable/Installation-Guide.html","locator":"CPU, OpenCL, CUDA and ROCm platform distinctions","retrievedAt":"2026-10-07T16:58:59Z","id":"install","title":"Installation guide","kind":"vendor"},{"url":"https://github.com/lightgbm-org/LightGBM/blob/main/LICENSE","locator":"MIT license","retrievedAt":"2026-10-07T16:59:14Z","id":"license","title":"LightGBM license","kind":"vendor"},{"url":"https://xgboost.readthedocs.io/en/stable/python/sklearn_estimator.html","locator":"Classification, regression and ranking","retrievedAt":"2026-10-07T16:58:00Z","id":"target","title":"XGBoost estimator interface","kind":"vendor"}],"overviewCitations":["features","python","install"],"licenseCitations":["license"],"sections":[{"id":"trees","heading":"Training behavior","paragraphs":[{"id":"trees-detail","content":[{"text":"LightGBM discretizes continuous features into histogram bins and expands the leaf with the largest loss improvement rather than growing all levels uniformly. Limiting depth does not change that leaf-wise growth strategy. The documentation warns that this approach can overfit small datasets. Classification, regression and ranking objectives are available, with regularization, subsampling and validation controls used to shape training."}],"citations":["features"]}]},{"id":"input","heading":"Inputs and categorical values","paragraphs":[{"id":"input-detail","content":[{"text":"Python inputs include text datasets, NumPy arrays, SciPy sparse matrices and supported dataframe or Arrow objects. Data is represented by a LightGBM Dataset, and validation data must align with training data. Categorical values use integer codes; pandas categorical columns can be aligned to the categories seen during training. Negative category codes and previously unseen prediction categories are handled as missing rather than as ordinary numeric magnitudes."}],"citations":["python","advanced"]}]},{"id":"missing","heading":"Missing and sparse data","paragraphs":[{"id":"missing-detail","content":[{"text":"NaN represents missing data by default. Unrecorded sparse entries ordinarily mean zero, but enabling zero_as_missing changes both explicit zeros and absent sparse entries into missing observations. This distinction can materially change the meaning of a migrated dataset. Preserving only the same row count and feature names is therefore insufficient to establish that two training pipelines receive equivalent inputs."}],"citations":["advanced"]}]},{"id":"storage","heading":"Saving data and models","paragraphs":[{"id":"storage-detail","content":[{"text":"The Python interface distinguishes a binary Dataset cache from the trained model. It documents saving a Booster to a model text file and loading that file into another Booster; a JSON dump is also available for inspection. Early stopping uses validation metrics and exposes the best iteration. An application should preserve its preprocessing and training configuration alongside the model rather than treating a cached dataset as a deployable predictor."}],"citations":["python"]}]},{"id":"hardware","heading":"Platforms and accelerators","paragraphs":[{"id":"hardware-detail","content":[{"text":"CPU builds cover Windows, macOS and Linux. The original GPU path uses OpenCL for histogram work, with other training work on the CPU. Separate CUDA and ROCm implementations target Linux NVIDIA and AMD environments respectively; the ROCm build reuses the cuda device-type name. The installation guide directs Windows users to the OpenCL path and excludes macOS GPU builds. These are deployment distinctions, not benchmark results."}],"citations":["install"]}]},{"id":"substitution","heading":"Licensing and substitution","paragraphs":[{"id":"substitution-detail","content":[{"text":"The library is MIT-licensed. It is a task-specific alternative to "},{"text":"XGBoost","targetSlug":"xgboost"},{"text":" when a project can retrain a boosted-tree model and revalidate its feature processing. The overlap covers classification, regression and ranking, but does not establish identical defaults, model files or predictions. Compare validation results and operational fit for the intended dataset instead of assuming that either implementation is universally faster or more accurate."}],"citations":["license","features","target","advanced"]}]}]},"id":"Q1662","revision":1775,"updatedAt":"2026-10-25T22:12:57Z","sourceUrl":"https://substitutefor.net/entities/Q1662?revision=1775"}}