Skip to content

Getting started

Get the source

git clone https://github.com/rotsl/mathai
cd mathai

Create an environment

Python 3.10 or later is required. From the repository root, create and activate a virtual environment, then install the project with its development tools.

macOS and Linux:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

Windows PowerShell:

py -3 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

The install is CPU-only. The dev extra includes pytest, hypothesis and pytest-cov.

To leave the environment later, run:

deactivate

Verify the installation

python -m mathai validate

This imports every architecture, fits it on XOR, predicts, and round-trips a checkpoint. Expected output: five OK lines and ALL OK.

Run a single evaluation

python -m mathai evaluate --model gci --dataset iris

Prints a JSON record with the architecture's metrics and the seven baseline metrics (logistic regression, decision tree, random forest, SVM, kNN, naive Bayes, MLP) on the same split.

Run the benchmark suite

python scripts/run_benchmark.py 10

The runner prints a unique RUN DIRECTORY under results/runs/. To analyse that run, pass the printed directory to the statistics script:

python scripts/run_statistics.py results/runs/20261203T232736123456Z

Raw records, processed summaries, figures, provenance, and statistical outputs remain together in that run directory.

Reproduce a named experiment

python -m mathai reproduce --experiment experiment_001

experiments/experiment_001.json pins the datasets, architectures, repeats and seed.

Run the tests

pytest -q

The test suite covers unit, mathematical-property, statistical, integration and end-to-end behavior.

Next steps

  • docs/architectures/ for an overview of the implemented architectures.
  • docs/troubleshooting/KNOWN_LIMITATIONS.md for experimental and mathematical limitations.