SEVQ: Simple Evolving Vector Quantization
Project description
SEVQ: Simple 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]
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.2.tar.gz
(22.7 kB
view details)
Built Distribution
File details
Details for the file sevq-1.0.2.tar.gz
.
File metadata
- Download URL: sevq-1.0.2.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.8.2 requests/2.27.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f7dd03b5b96286bd33c7005bacfcdba009cd553d0fd64c501bf815d15523370 |
|
MD5 | b0ad2692e77c18c1cb1e05e4d163b566 |
|
BLAKE2b-256 | 4ab70fa063fa4223dd2e3b7b0d20c524794b48170857663402bf396d32ff295a |
File details
Details for the file sevq-1.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: sevq-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.8.2 requests/2.27.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f36c1e90304e90c0ff4884cdfdc217a281677169029401e5dac8cb006aaecca9 |
|
MD5 | 4b5eeb0ce1b252d026bd56e97a2c98e2 |
|
BLAKE2b-256 | 7dc869293cf0ad5796470d71d3824d819a38de5d30adbb545d6a49d739b19f25 |