catboost-cgo

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: MIT

README ΒΆ

PkgGoDev GitHub Release CI codecov

CatBoost-Cgo

Evaluation library is the fastest way for inference a model CatBoost. The library provides a C API.
The C API interface can be accessed from any programming language (example Golang + Cgo).

Prebuilt shared library (*.so | *.dylib) artifacts are available of the 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 https://catboost.ai/en/docs/concepts/c-plus-plus-api_dynamic-c-pluplus-wrapper.

Compatibility

Previous versions v1.2.2 v1.2.3 v1.2.4 v1.2.5 v1.2.6
🚫 (not testing) βœ… βœ… βœ… βœ… βœ…

Features

Supported functionality (https://catboost.ai/en/docs/concepts/python-quickstart):

  • CatBoostRegressor βœ…
  • CatBoostClassifier βœ…
  • CatBoostRanker βœ…

Supported prediction types (https://github.com/catboost/catboost/blob/master/catboost/libs/model/enums.h):

  • 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) 🚫
Windows 10 and 11 🚫 🚫

Supported Type:

Installation

  1. Install catboost-cgo:
go get github.com/mirecl/catboost-cgo
  1. Download CatBoost shared library from release page: https://github.com/catboost/catboost/releases

  2. Save CatBoost shared library in /usr/local/lib or manual set path:

import (
 cb "github.com/mirecl/catboost-cgo/catboost"
)

func main(){
  cb.SetSharedLibraryPath(...)
}
  1. See examples of use

Usage

Thanks

Directories ΒΆ

Path Synopsis
example
classifier command
metadata command
ranker command
regressor command
survival command
titanic command
uncertainty command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL