https://github.com/iveevi/zhetapi
A C++ ML and numerical analysis API, with an accompanying scripting language.
https://github.com/iveevi/zhetapi
machine-learning numerical-analysis numerical-methods scripting-language symbolic-computation
Last synced: 7 months ago
JSON representation
A C++ ML and numerical analysis API, with an accompanying scripting language.
- Host: GitHub
- URL: https://github.com/iveevi/zhetapi
- Owner: iveevi
- License: mit
- Created: 2019-11-09T00:33:49.000Z (over 5 years ago)
- Default Branch: focused
- Last Pushed: 2023-03-20T19:56:00.000Z (over 2 years ago)
- Last Synced: 2024-01-25T23:53:50.663Z (over 1 year ago)
- Topics: machine-learning, numerical-analysis, numerical-methods, scripting-language, symbolic-computation
- Language: C++
- Homepage: https://zhetapi.readthedocs.io/en/latest/
- Size: 40.8 MB
- Stars: 47
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


Zhetapi is a modern C++ machine learning and numerical analysis library with an
emphasis on intuitive usage.# Linear Algebra
Zhetapi provides a basic linear algebra interface using C++ 20 concepts. The
`Field` structure enforces a contraint on types to ensure they behave like
algebraic fields. As a result these structures support basic arithmetic along
with other useful methods.For now, the following template classes are provided: `Tensor`, `Matrix`,
`Vector`.# Auto Differentiation
The auto differentiation facilities in Zhetapi belong in the `zhetapi::autograd`
namespace. All operations that depend on autodiff use `float`s as the underlying
type; in particular `Constant` is a `Tensor ` and is the basis of all
numerical values in this module.To provide a seamless, operator based interface into the autodiff facilities,
two notable classes are provided, `Variable` and `Function`. As one can expect,
`Variable`s can store arbitrary `Constant` values, and `Function`s are
compositions of `Variables` under varying operations. For example:```cpp
Function f = x + y;
Function g = x * y;// f and g are now functions of *two* variables
Constant a = f(1, 2);
Constant b = g(1, 2);// Composition of functions is done likewise
Function h = f(x, g(x, y)); // NOTE: h is still a function of two variables
```## Symbolic Differentiation
## Backward Pass
Currently, only backward mode is enabled for autograd.
# Building
Zhetapi is primarily a header-only library, but for now there are some examples
that one can play around with in the `experimental` directory.This project is developed using C++ 20. Additional dependenies include PNG
(`libpng-dev` on Ubuntu systems), OpenMP (Optional) and CUDA (Optional).Generate the build configuration using CMake as follows:
```
$ cd zhetapi
$ mkdir build && cd build
$ cmake -DZHETAPI_ENABLE_CUDA= # ON by default
```And build the targets as one would usually do (e.g. `make` or `ninja`).