Awesome Open Source
Awesome Open Source

ModelFox for Go

The ModelFox Go module makes it easy to make predictions with your ModelFox machine learning model from Go.


$ go get -u
import ""

model, _ := modelfox.LoadModelFromPath("./heart_disease.modelfox", nil)
defer model.Destroy()

input := modelfox.PredictInput{
  "age":    63,
  "gender": "male",
  // ...

output := model.PredictOne(input, nil)

fmt.Println("Output:", output.ClassName)

For more information, read the docs.

Platform Support

ModelFox for Go is currently supported on the following combinations of $GOARCH and $GOOS:

  • amd64 linux
  • arm64 linux
  • amd64 darwin
  • arm64 darwin
  • amd64 windows

Are you interested in another platform? Open an issue or send us an email at [email protected].

ModelFox for Go links to the modelfox C library, so cgo is required. The modelfox C library will be linked statically into your executable, so when you run go build you will still get a statically linked executable you can run anywhere without having to worry about dynamic linking errors.


The source for this package contains a number of examples in the examples directory. Each example has a explaining how to run it.

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Go (156,313
Golang (156,313