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 neupu
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.
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.0.tar.gz
(14.5 kB
view details)
Built Distribution
File details
Details for the file sevq-1.0.0.tar.gz
.
File metadata
- Download URL: sevq-1.0.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.8.1 requests/2.26.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26c30bb61629d3d68e679074ec0c617b1b720fc6cd0c0078c97860744678ae51 |
|
MD5 | 56bc3e0355f678ae1b7d42b5e81898f4 |
|
BLAKE2b-256 | 2f9280330182bc0e806e8a7682727b09c115383ebadaa2f8de920fff38dec326 |
File details
Details for the file sevq-1.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: sevq-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.8.1 requests/2.26.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 983a3518fb7bbb6fe26655a211f1e5362870ea79ba7eb535b61cbe64a85d1693 |
|
MD5 | 65f0a58caffaa736b7e98e7463cfa017 |
|
BLAKE2b-256 | 5ff975e16e78ccc6f9e815d16627a7ae21278ece40df9ae1cc131ee9d4588402 |