1. 程式人生 > >XGBoost的spark版編譯部署 linux

XGBoost的spark版編譯部署 linux

XGBoost的spark版編譯部署(Linux)

  1. 原始碼下載
        git clone --recursive https://github.com/dmlc/xgboost
  2. 編譯安裝
        cd xgboost; make -j4
  3. maven安裝jar包到本地mvn倉
mvn install:install-file -Dfile=./xgboost4j-0.8-SNAPSHOT.jar -DgroupId=ml.dmlc -DartifactId=xgboost4j -Dversion=0.8 -Dpackaging=jar
  1. 在工程的pom.xml檔案中新增依賴
        <dependency
>
<groupId>ml.dmlc</groupId> <artifactId>xgboost4j</artifactId> <version>0.8</version> </dependency> <dependency> <groupId>ml.dmlc</groupId> <artifactId>xgboost4j-flink</artifactId
>
<version>0.8</version> </dependency> <dependency> <groupId>ml.dmlc</groupId> <artifactId>xgboost4j-spark</artifactId> <version>0.8</version> </dependency>