LightGBM安装与模型训练

安装:

LightGBM和正常的python安装包不一样,一般的正常安装包都可以使用pip install 包名 就可以,但是安装LightGBM中发现并没有这么简单,中间有很多坑,首先,我先拿我的Mac安装测试了一下,步骤如下:

安装命令:

(1)、brew install open-mpi

(2)、brew install cmake   

(3)、git clone --recursive https://github.com/Microsoft/LightGBM 

(4)、cd LightGBM

(5)、export CXX=g++-8 CC=gcc-8

(6)、mkdir build

(7)、cd build

(8)、cmake -DUSE_MPI=ON ..

(9)、make -j4

(10)、进入LightGBM的python-package目录下 ,找到setup.py文件

(11)、python setup.py install

模型训练

猜你喜欢

转载自blog.csdn.net/weixin_41362649/article/details/82080198