XGBoost bindings for golang
Перейти к файлу
Jaakko Lukkari 0b398715b2 add possibility to close predictor 2018-08-20 15:18:56 +03:00
core KeepAlive 2018-08-20 15:17:51 +03:00
scripts WIP 2018-08-17 13:57:38 +03:00
.travis.yml Add travis 2018-08-17 14:00:22 +03:00
LICENSE more matrix funcs 2018-08-17 15:43:26 +03:00
Makefile WIP implementation of the simplified prediction api 2018-08-20 14:56:28 +03:00
README.md WIP implementation of the simplified prediction api 2018-08-20 14:56:28 +03:00
booster.go add possibility to close predictor 2018-08-20 15:18:56 +03:00
booster_test.go WIP implementation of the simplified prediction api 2018-08-20 14:56:28 +03:00

README.md

Build Status GoDoc

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]