Getting started with LightGBM in Python
LightGBM is implemented in C++ but has official C, R, and Python APIs. This section discusses the Python APIs that are available for working with LightGBM. LightGBM provides three Python APIs: the standard LightGBM API, the scikit-learn API (which is fully compatible with other scikit-learn functionality), and a Dask API for working with Dask. Dask is a parallel computing library discussed in Chapter 11, Distributed and GPU-Based Learning with LightGBM (https://www.dask.org/).
Throughout the rest of the book, we mainly use the scikit-learn API for LightGBM, but let’s first look at the standard Python API.
LightGBM Python API
The best way to dive into the Python API is with a hands-on example. The following are excerpts from a code listing that illustrates the use of the LightGBM Python API. The complete code example is available at https://github.com/PacktPublishing/Practical-Machine-Learning-with-LightGBM-and-Python/tree/main...