0b398715b2 | ||
---|---|---|
core | ||
scripts | ||
.travis.yml | ||
LICENSE | ||
Makefile | ||
README.md | ||
booster.go | ||
booster_test.go |
README.md
go-xgboost
Go bindings for XGBoost
import "github.com/Applifier/go-xgboost"
Usage
This library is meant for running predictions against a pre-trained XGBoost model. Limited training related functionality is implemented under core but training the model in python or using the xgboost cli is encouraged.
// Create predictor for a model and define the number of workers (and other settings)
predictor, _ := xgboost.NewPredictor(modelPath, runtime.NumCPU(), 0, 0, -1)
// Make prediction for one column
res, _ := predictor.Predict(xgboost.FloatSliceVector([]float32{1, 2, 3}))
fmt.Printf("Results: %+v\n", res)
// output: Results: [1.08002]