z4rd0s / go-xgboost

XGBoost bindings for golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WORK IN PROGRESS... USE AT OWN RISK :-)

Build Status GoDoc

go-xgboost

Go bindings for XGBoost

import "github.com/z4rd0s/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 row
res, _ := predictor.Predict(xgboost.FloatSliceVector([]float32{1, 2, 3}))
fmt.Printf("Results: %+v\n", res)
// output: Results: [1.08002]

License

MIT

About

XGBoost bindings for golang

License:MIT License


Languages

Language:Go 97.4%Language:Shell 1.9%Language:Makefile 0.7%