An open API service indexing awesome lists of open source software.

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 πŸš€

Awesome Lists containing this project

README

          

[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/mirecl/catboost-cgo)](https://pkg.go.dev/mod/github.com/mirecl/catboost-cgo) ![GitHub Release](https://img.shields.io/github/v/release/mirecl/catboost-cgo)
![](https://img.shields.io/github/go-mod/go-version/mirecl/catboost-cgo) [![CI](https://github.com/mirecl/catboost-cgo/actions/workflows/ci.yml/badge.svg)](https://github.com/mirecl/catboost-cgo/actions/workflows/ci.yml) [![codecov](https://codecov.io/github/mirecl/catboost-cgo/graph/badge.svg?token=HUG4WWSSZN)](https://codecov.io/github/mirecl/catboost-cgo)
[![Go Report Card](https://goreportcard.com/badge/github.com/mirecl/catboost-cgo)](https://goreportcard.com/report/github.com/mirecl/catboost-cgo) [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go) \
![](https://img.shields.io/badge/platform-Linux-black?logo=linux&logoColor=white) ![](https://img.shields.io/badge/platform-MacOS-black?logo=apple&logoColor=white)

## 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