Skip to main content

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)

Source distribution for evq 0.0.2
File Size Uploaded
evq-0.0.2.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evq 0.0.2
File Interpreter ABI Platform
evq-0.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page