Skip to main content

Hyperdimensionality computing machine learning library

Project description

Hyperdimensionality computing machine learning library.

Forked from https://gitlab.com/alehd/hd-lib

Installation and use

Fork this repository and put it in you projects folder or use pip or pipenv:

pip install --user hyperdim

If you are using keras or sklearn it will be easy to use hyperdim. To use a model of dimensionality, say 10000:

from hyperdim.hdmodel import HDModel
from hyperdim.utils import to_categorical

import numpy as np

# Dummy datasets
samples = 100
features = 15
classes = 5

x = np.random.random(size = (samples, features))
y = [ int(np.random.random()*classes) for _ in x ]
y = to_categorical(y)

print(x.shape) # (samples, features)
print(y.shape) # (samples, classes)

# Build model
dimensions = 10000
model = HDModel(features, classes, d = dimensions)

# Fit using 30% of the data for validation, using one_shot_fit only
history = model.fit(x, y, validation_split = 0.3, epochs = 1)

print(history.history["acc"])
print(history.history["val_acc"])

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

hyperdim-0.0.6.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperdim-0.0.6-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file hyperdim-0.0.6.tar.gz.

File metadata

  • Download URL: hyperdim-0.0.6.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for hyperdim-0.0.6.tar.gz
Algorithm Hash digest
SHA256 f6264df6cc551784128a4a8744a72e302af92ee44456e4e59650ca5a86f14c82
MD5 d9fbb0d4f566e1e2f6b3f54ece0cca16
BLAKE2b-256 2af255f1d4257bc83d7c02b73fa139b4e3474420438f7b1ef7f2f6f7f0b90c08

See more details on using hashes here.

File details

Details for the file hyperdim-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: hyperdim-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.4

File hashes

Hashes for hyperdim-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ec6de4a80d462be977a1eb6a1687b9661cc0e9fc277f46bfb6201fdfe70a7148
MD5 dfed7537d055cd51ff86b101ff4aa666
BLAKE2b-256 ddb5f060fe1221db1370ac284a43d2e26d7a5371d0699c6ace91cc68f5a4c0e8

See more details on using hashes here.

Supported by

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