Metadata-Version: 2.4
Name: wnnlib
Version: 0.1.0
Summary: Weightless Neural Networks library
Author-email: Stiven Schwanz Dias <stven.dias@gmail.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/stivenschwanz/wnnlib
Project-URL: Issues, https://github.com/stivenschwanz/wnnlib/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: contourpy==1.3.3
Requires-Dist: cycler==0.12.1
Requires-Dist: fonttools==4.60.1
Requires-Dist: kiwisolver==1.4.9
Requires-Dist: matplotlib==3.10.7
Requires-Dist: numpy==2.3.5
Requires-Dist: packaging==25.0
Requires-Dist: pillow==12.0.0
Requires-Dist: pyparsing==3.2.5
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: scipy==1.16.3
Requires-Dist: six==1.17.0
Dynamic: license-file

# Weightless Neural Networks library (wnnlib)

## Setup

Clone the repository:
```bash
git clone https://github.com/stivenschwanz/wnnlib
cd wnnlib
```

Create the virtual environment:
```bash
pip3 install virtualenv
python3 -m venv .venv
```

Add the source folder permanently to the Python path:
```bash
echo "$(pwd)/src" > `echo $VIRTUAL_ENV/lib/python*/site-packages/`src.pth
```

Activate the virtual environment:
```bash
source .venv/bin/activate
```

Install required packages:
```bash
pip3 install -r requirements.txt
```

## Run experiments

Activate the virtual environment:
```bash
source .venv/bin/activate
```

Toy anomaly detection problems:
```bash
python3 -m unittest src/wnnlib/algos/NPCLAD.py
```

## Run unit tests

Test VGRAM node:
```bash
python3 -m unittest src/wnnlib/vgram/VGRAMNode.py
```

Test VGRAM array:
```bash
python3 -m unittest src/wnnlib/vgram/VGRAMArray.py
```

Test fixed scalar codec:
```bash
python3 -m unittest src/wnnlib/codecs/FixedScalarCodec.py
```

Test adaptive scalar codec:
```bash
python3 -m unittest src/wnnlib/codecs/AdaptiveScalarCodec.py
```

Test flex scalar codec:
```bash
python3 -m unittest src/wnnlib/codecs/FlexScalarCodec.py
```

Test KD-tree vector codec:
```bash
python3 -m unittest src/wnnlib/codecs/KDTree.py
```

Test binary utilities:
```bash
python3 -m unittest src/wnnlib/utils/BitUtils.py
```

## Generate distribution archives

Make sure you have the latest version of PyPA’s build installed:
```bash
python3 -m pip install --upgrade build
```

Build the distribution archives:
```bash
python3 -m build
```

Install twine to upload the distribution packages:
```bash
python3 -m pip install --upgrade twine
```

Upload the distribution packages:
```bash
python3 -m twine upload --repository testpypi dist/*
```

