Skip to main content

SEVQ: Simplified Evolving Vector Quantization

Project description

sevq

https://img.shields.io/pypi/v/sevq.svg https://img.shields.io/travis/sylwekczmil/sevq.svg Documentation Status

SEVQ: Simplified Evolving Vector Quantization

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


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 details)

Uploaded Source

Built Distribution

sevq-1.0.1-py2.py3-none-any.whl (4.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sevq-1.0.1.tar.gz.

File metadata

  • Download URL: sevq-1.0.1.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

Hashes for sevq-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0a48df87469b0080b300f5afd805bd4b2d870297bab1f9204d843c8416152f2b
MD5 645a29ceeac5e5530aaa2fd9ffe94f75
BLAKE2b-256 af16a567fafd11fefb46098cb7a28ebeaa0a11477e3e36ad144dd5a59332f7ed

See more details on using hashes here.

File details

Details for the file sevq-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: sevq-1.0.1-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

Hashes for sevq-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2d06666b9993998d9729d8460c8dac9a8db197288e2967df314b023dd450110e
MD5 03812ba7e648c6ad41cdde0a93eb260b
BLAKE2b-256 a1482f0fd02c92e6f1e0e1ae6e8bbd2f8251c771540e7c392aa65fa6204c851c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page