Ubuntu16.04安装xgboost

1.Python下安装方法java

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
make -j4
cd python-package/
sudo python setup.py install

若是在import xgboost后,遇到问题python

OSError: /home/common/anaconda2/lib/python2.7/site-packages/scipy/sparse/../../../../libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/common/coding/coding/Scala/xgboost/python-package/xgboost/../../lib/libxgboost.so)

解决方法c++

conda install libgcc

2.Java下安装方法git

请先在Python下安装好,由于上面的gcc版本问题会影响到java下xgboost的编译和安装github

先更新bash

git pull && git submodule init && git submodule update && git submodule status

而后参考python2.7

http://xgboost.readthedocs.io/en/latest/jvm/

 

几个xgboost的Scala实现方法jvm

https://www.elenacuoco.com/2016/10/10/scala-spark-xgboost-classification/
http://blog.csdn.net/luoyexuge/article/details/71422270
http://blog.csdn.net/luoyexuge/article/details/71422270