標籤:整合學習 xgboost
(0)前提是,你得下載好anaconda,並且安裝之,我的如下(python3 windows 64位)
https://repo.continuum.io/archive/Anaconda3-4.4.0-Windows-x86_64.exe
(1)下載xgboost源碼(這裡直接用官方最新的源碼,這裡我們不需要用git clone --recursive,因為用的是編譯好的dll,因此不需要下載那麼完整,只需要python-package完整即可),你可以通過下面的串連下載源碼即可。
https://github.com/dmlc/xgboost/archive/master.zip
(3)解壓下載好的源碼
解壓之後,進入檔案夾,找到master\python-package\xgboost目錄
(4)下載windows下的編譯好的xgboost庫檔案
選擇最新的編譯的dll,也就是當前源碼對應的那一天的dll
大家請在頁面:http://ssl.picnet.com.au/xgboost/20180515/x64/xgboost.dll
選擇最新編譯的dll,因為最新的dll與xgboost的源碼更為適配。
下載好之後將這個庫檔案放入到master\python-package\xgboost目錄
注意:如果你有NVIDIA的GPU,可以下載http://ssl.picnet.com.au/xgboost/20170610/x64_gpu/libxgboost.dll,這個是GPU版本的動態連結程式庫
(5)安裝xgboost即可
進入master\python-package目錄,執行以下命令列
python setup.py install
注意這裡的python必須使用 anaconda下面的那個python.exe 需要設定環境變數 否則不能使用 anaconda裡面裝上的numpy庫
即可完成安裝
如何在windows下安裝xgboost庫