SEVQ: Simplified Evolving Vector Quantization
Project description
sevq
SEVQ: Simplified Evolving Vector Quantization
Free software: MIT license
Documentation: https://sevq.readthedocs.io.
Installation
To install sevq, run this command in your terminal:
pip install sevq
Usage
Training and prediction one sample at a time
from sevq.algorithm import SEVQ
c = SEVQ()
c.partial_fit([-2, -2], 2)
c.partial_fit([-1, -1], 1)
c.partial_fit([1, 1], 1)
c.partial_fit([2, 2], 2)
print(c.predict([0, 0])) # 1
print(c.predict([3, 3])) # 2
print(c.predict([-3, -3])) # 2
Training and prediction on multiple samples
from sevq.algorithm import SEVQ
c = SEVQ()
c.fit(
[[-2, -2], [-1, -1], [1, 1], [2, 2]],
[2, 1, 1, 2],
epochs=1, permute=False
)
print(c.predict([[0, 0], [3, 3], [-3, -3]])) # [1, 2, 2]
To replicate the research run:
# python 3.6 is required by neupy
git clone https://github.com/sylwekczmil/sevq
cd sevq
# create venv and activate
# up to you
# install dependencies
pip3 install -r requirements_research.txt
# run research code, please ignore warnings, this script can run long time
python3 run_research.py
History
1.0.0 (2021-11-24)
First release on PyPI.
1.0.1 (2021-11-24)
Fix typos in release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sevq-1.0.1.tar.gz
(14.5 kB
view hashes)