jabacat / jml

JABACAT-created machine learning library from scratch.
5 stars 5 forks source link
c cpp hacktoberfest machine-learning machine-learning-algorithms-from-scratch meson neural-network neural-networks-from-scratch

JML JML


JABACAT-created machine learning library from scratch.

GitHub Workflow Status (with event)

Build

[!IMPORTANT] This project uses The Meson Build system. Follow instructions posted on the website to install meson. On Windows, there is a winget package available.

To build, setup the build directory. Any configuration steps should be done now (specifying compiler or linker, etc.).

meson setup build   # replace `build` with any arbitrary output build directory

Then, compile it.

meson compile -C build  # replace `build` with the directory specified in the previous step

The outputs are in build/ (or whatever directory specified). Install the outputs:

meson install -C build  # again, replace `build`

Test

This project uses Catch2 as its testing framework.

Run meson test to test the project.

meson test -C build     # replace `build`

Unfortunately, meson doesn't provide good output when a test fails. Running the test executable manually is often more helpful. Look under build/tests/ to find the right executable. The executable for testing the core library is core_tests.

Format

We use clang-format to check our formatting. Before you push your code, you can run the following that finds all source code files, and then formats them all in place.

find . -iname "*.hpp" -o -iname "*.cpp" -o -iname "*.c" -o -iname "*.h" -o -iname "*.tpp" | xargs -I {} clang-format {}

You can also add this to your editors formatting system or some precommit step.