An educational project to implement some features of a machine learning framework in C. This is not intended for real-world use.
- Data loader for CSV
- A naive implementation of matrix operations
- Autograd feature
- Config serialize/deserialize
- Checkpoint saving
- Example algorithms
- Gradient descent for linear regression
src:data.c&data.h: data definition and data handling, such as Point, Matrix, Dynamic string.io.c&io.h: for read/writing configs, checkpoints, etc.custom_math.c&custom_math.h: for math functions like matrix multiplications.gradient_descent.c&gradient_descent.h: an example for gradient descent.utils.c&utils.h: utility functions.
tests: unit testing, using Check
- GNU Autotools are required to generate build files
./autogen.sh
make
# Run tests
make check- To remove all build files, run
./autoremove.sh
- C99 compatible.
- Make a best effort to follow C89, except in cases where it makes the code harder to read (e.g., the rule for 6 significant characters for external variable names).
- Only use goto for cleaning up in error handling, as C does not support exceptions.