Google ColaboratoryでGPU版LightGBMを使う方法
/ 1 min read
Table of Contents
はじめに
Google ColaboratoryでGPU版LightGBMを使う方法です。
方法
ランタイムの管理で GPU を設定してから、以下のコードを実行
!git clone --recursive https://github.com/Microsoft/LightGBM%cd /content/LightGBM/!mkdir build!cmake -DUSE_GPU=1 #avoid ..!make -j$(nproc)!sudo apt-get -y install python-pip!sudo -H pip install setuptools pandas numpy scipy scikit-learn -U%cd /content/LightGBM/python-package!sudo python setup.py install --precompile
ちなみに Xgboost は特に設定不要