Ubuntu16.04安裝xgboost


1.Python下安裝方法

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

如果在import xgboost后,遇到問題

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)

解決方法

conda install libgcc

2.Java下安裝方法

請先在Python下安裝好,因為上面的gcc版本問題會影響到java下xgboost的編譯和安裝

先更新

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

然后參考

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

 

幾個xgboost的Scala實現方法

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM