EVQ
Evolving Vector Quantization for Classification of On-Line Data Streams
Note
Inspired by this algorithm and several others, I created a new one called SEVQ: https://github.com/sylwekczmil/sevq
Inspiration
Implementation done by Sylwester Czmil based on pseudocode and algorithm description from:
E. Lughofer, “Evolving Vector Quantization for Classification of On-Line Data Streams,” 2008 International Conference on Computational Intelligence for Modelling Control & Automation, 2008, pp.779-784, doi: 10.1109/CIMCA.2008.47.
Installation
# create venv and activate
# install algorithm
pip3 evq
Example usage
Training and prediction one sample at a time
from evq.algorithm import EVQ
c = EVQ(number_of_classes=2, vigilance=0.1)
c.partial_fit([-2, -2], 1)
c.partial_fit([-1, -1], 0)
c.partial_fit([1, 1], 0)
c.partial_fit([2, 2], 1)
print(c.predict([0, 0])) # 0
print(c.predict([3, 3])) # 1
print(c.predict([-3, -3])) # 1
Training and prediction on multiple samples
from evq.algorithm import EVQ
c = EVQ(number_of_classes=2, vigilance=0.1)
c.fit(
[[-2, -2], [-1, -1], [1, 1], [2, 2]],
[1, 0, 0, 1],
epochs=1, permute=False
)
print(c.predict([[0, 0], [3, 3], [-3, -3]])) # [0, 1, 1]
Metadata
Release files for evq 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| evq-0.0.2.tar.gz | 3.4 kB | Without provenance | Details for evq-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evq-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for evq-0.0.2-py2.py3-none-any.whl |
Total release size: 7.4 kB
Release files / evq-0.0.2.tar.gz
| Download URL | evq-0.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02cd3082fbb586874d4d96eb9bc5154d93f1b05aaec3005bad7a7f2c5e411b85
|
|
BLAKE2b-256 checksum How to use checksums |
6223f36cefc425ad36e2d39107f929dfea9e44d55e055f931a360d32a3c5b107
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.8.2 requests/2.27.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / evq-0.0.2-py2.py3-none-any.whl
| Download URL | evq-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7a3f9ab98e765888a31b823597b83e85ca8ac228b73a8df12388b213387c23b7
|
|
BLAKE2b-256 checksum How to use checksums |
b247f1092ee3537d64798c536a21a89a2186752fd155f96025ea4bf9b6cf4bbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.8.2 requests/2.27.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Security for evq 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.