Git Product home page Git Product logo

go-xgboost's Introduction

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

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

License

MIT

go-xgboost's People

Contributors

orktes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-xgboost's Issues

How to solve this problem?

$ go build

github.com/Applifier/go-xgboost/core

core/xgbooster.go:65: cannot use &outLen (type *C.ulong) as type *C.bst_ulong in argument to func literal
core/xgbooster.go:113: cannot use C.ulong(len(handles)) (type C.ulong) as type C.bst_ulong in argument to func literal
core/xgdmatrix.go:30: cannot use &count (type *C.ulong) as type *C.bst_ulong in argument to func literal
core/xgdmatrix.go:40: cannot use &count (type *C.ulong) as type *C.bst_ulong in argument to func literal
core/xgdmatrix.go:52: cannot use C.ulong(len(values)) (type C.ulong) as type C.bst_ulong in argument to func literal
core/xgdmatrix.go:60: cannot use C.ulong(len(group)) (type C.ulong) as type C.bst_ulong in argument to func literal
core/xgdmatrix.go:70: cannot use C.ulong(len(values)) (type C.ulong) as type C.bst_ulong in argument to func literal
core/xgdmatrix.go:87: cannot use &outLen (type *C.ulong) as type *C.bst_ulong in argument to func literal
core/xgdmatrix.go:108: cannot use &outLen (type *C.ulong) as type *C.bst_ulong in argument to func literal
core/xgdmatrix.go:132: cannot use C.ulong(nrows) (type C.ulong) as type C.bst_ulong in argument to func literal
core/xgdmatrix.go:132: too many errors

go get fail

not enough arguments in call to _Cfunc_XGBoosterPredict
have (_Ctype_BoosterHandle, _Ctype_DMatrixHandle, _Ctype_int, _Ctype_uint, *_Ctype_ulong, **_Ctype_float)
want (_Ctype_BoosterHandle, _Ctype_DMatrixHandle, _Ctype_int, _Ctype_uint, _Ctype_int, *_Ctype_ulong, **_Ctype_float)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.