https://github.com/mirecl/catboost-cgo
CatBoost a fast, scalable, high performance Gradient Boosting on Decision Trees library. Golang using Cgo for blazing fast inference CatBoost Model π
https://github.com/mirecl/catboost-cgo
catboost cgo deep-learning golang gradient-boosting inference
Last synced: 5 months ago
JSON representation
CatBoost a fast, scalable, high performance Gradient Boosting on Decision Trees library. Golang using Cgo for blazing fast inference CatBoost Model π
- Host: GitHub
- URL: https://github.com/mirecl/catboost-cgo
- Owner: mirecl
- License: mit
- Created: 2024-08-13T15:53:52.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-09-28T05:38:38.000Z (6 months ago)
- Last Synced: 2025-09-28T07:19:57.269Z (6 months ago)
- Topics: catboost, cgo, deep-learning, golang, gradient-boosting, inference
- Language: C
- Homepage:
- Size: 824 KB
- Stars: 18
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go-cn - catboost-cgo - cgo) (ζΊε¨ε¦δΉ / ζ£η΄’εεζθ΅ζεΊ)
- awesome-go - catboost-cgo - Fast, scalable, high performance Gradient Boosting on Decision Trees library. Golang using Cgo for blazing fast inference CatBoost Model. (Machine Learning / Search and Analytic Databases)
- awesome-go-with-stars - catboost-cgo - 02-24 | (Machine Learning / Search and Analytic Databases)
- fucking-awesome-go - catboost-cgo - Fast, scalable, high performance Gradient Boosting on Decision Trees library. Golang using Cgo for blazing fast inference CatBoost Model. (Machine Learning / Search and Analytic Databases)
- awesome-go - catboost-cgo - Fast, scalable, high performance Gradient Boosting on Decision Trees library. Golang using Cgo for blazing fast inference CatBoost Model. (Machine Learning / Search and Analytic Databases)
- awesome-go-plus - catboost-cgo - Fast, scalable, high performance Gradient Boosting on Decision Trees library. Golang using Cgo for blazing fast inference CatBoost Model.  (Machine Learning / Search and Analytic Databases)
README
[](https://pkg.go.dev/mod/github.com/mirecl/catboost-cgo) 
 [](https://github.com/mirecl/catboost-cgo/actions/workflows/ci.yml) [](https://codecov.io/github/mirecl/catboost-cgo)
[](https://goreportcard.com/report/github.com/mirecl/catboost-cgo) [](https://github.com/avelino/awesome-go) \
 
## CatBoost-Cgo
Evaluation library is the fastest way for inference a model CatBoost. The library provides a [C API](https://github.com/catboost/catboost/blob/master/catboost/libs/model_interface/c_api.h).\
The [C API](https://github.com/catboost/catboost/blob/master/catboost/libs/model_interface/c_api.h) interface can be accessed from any programming language (example Golang + [Cgo](https://go.dev/wiki/cgo)).
Prebuilt shared library (`*.so` | `*.dylib`) artifacts are available of the [releases](https://github.com/catboost/catboost/releases) page on GitHub CatBoost project.\
The shared library:
1) Should be in `/usr/local/lib`
2) Or set path in environment `CATBOOST_LIBRARY_PATH`
3) Or set path manual in source code `SetSharedLibraryPath` (see example below)
For more information, see .
## Compatibility
Previous versions
v1.2.2
v1.2.3
v1.2.4
v1.2.5
v1.2.6
v1.2.7
v1.2.8
π« (not testing)
β
β
β
β
β
β
β
## Features
**Supported functionality** ():
+ CatBoostRegressor β
+ CatBoostClassifier β
+ CatBoostRanker β
**Supported prediction types** ():
+ RawFormulaVal β
+ Probability β
+ Class β
+ RMSEWithUncertainty β
+ Exponent β
## Limitation
**Supported operating system and architectures:**
Operating system
CPU architectures
GPU support using CUDA
MacOS
β
(x86_64)
π«
Linux
β
(x86_64)
β
(x86_64)
Windows 10 and 11
π«
π«
>_If you use GPU - only device 0 is supported for now. More details: ._
**Supported Type:**
+ Numeric β
+ Categorical β
()
+ Text π« ()
+ Embeddings π« ()
## Installation
1) Install **[catboost-cgo](https://github.com/mirecl/catboost-cgo)**:
```go
go get github.com/mirecl/catboost-cgo
```
2) Download CatBoost shared library from release page:
3) Save CatBoost shared library in `/usr/local/lib` or manual set path:
```go
import (
cb "github.com/mirecl/catboost-cgo/catboost"
)
func main(){
cb.SetSharedLibraryPath(...)
}
```
4) See [examples](example) of use
### Usage
+ [Regression](example/regressor)
+ [Binary classification](example/classifier)
+ [Multiclassification](example/multiclassification)
+ [Ranker](example/ranker)
+ [Titanic](example/titanic)
+ [Metadata](example/metadata)
+ [Uncertainty](example/uncertainty)
+ [Survival](example/survival)
### Thanks
+ [@lukangping](https://github.com/lukangping) for
+ [@bourbaki](https://github.com/bourbaki) for
+ [@yalue](https://github.com/yalue) for