This repository contains a small machine learning library written in plain C. The goal is to understand machine learning fundamentals by implementing them from scratch, starting with linear algebra and basic models.
- Learn ML by implementing core concepts manually
- Build a small, reusable linear algebra library
- Keep the code simple, readable, and correct
- Production performance
- GPU acceleration
- Competing with BLAS / existing ML frameworks
linalg/— basic linear algebra (matrices, operations)ml/— machine learning models built on top of linalgexamples/— small programs using the librariesdatasets/— small datasets (e.g. Iris)
Build and run the example:
gcc -I./linalg/include -I./ml/include \
linalg/src/matrix.c \
linalg/src/linalg.c \
ml/src/linear_regression.c \
examples/synthetic_linear_regression.c \
-o bin/synthetic_linear_regression./bin/synthetic_linear_regressionEarly stage. APIs may change as concepts are added.
MIT