LightGBM

LightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed and efficient with the following advantages:

  • Faster training speed and higher efficiency
  • Lower memory usage
  • Better accuracy
  • Parallel and GPU learning supported
  • Capable of handling large-scale data

Installation on Ubuntu 16.04 (for GPU)

echo $CUDA_HOME
export CUDA_HOME=/usr/local/cuda
echo $CUDA_HOME
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

export OPENCL_LIBRARIES=/usr/local/cuda/lib64
export OPENCL_INCLUDE_DIR=/usr/local/cuda/include
apt-get update && apt-get install -y build-essential curl wget bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 git vim mercurial subversion cmake libboost-dev libboost-system-dev libboost-filesystem-dev gcc g++
mkdir -p /etc/OpenCL/vendors
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd

pip3.6 install mkl
pip3.6 install numpy scipy scikit-learn
pip3.6 install jupyterlab
pip3.6 install pandas matplotlib
cd /usr/local/src && mkdir lightgbm && cd lightgbm
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM && mkdir build && cd build
cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ ..
make OPENCL_HEADERS=/usr/local/cuda-8.0/targets/x86_64-linux/include LIBOPENCL=/usr/local/cuda-8.0/targets/x86_64-linux/lib
cd ../python-package/
python3.6 setup.py install --precompile
Written on August 24, 2018