Skip to main content

onlinehd

Authors: Alejandro Hernández Cano, Mohsen Imani.

Installation

In order to install the package, simply run the following:

pip install onlinehd

Visit the PyPI project page for more information about releases.

Documentation

Read the documentation of this project.

Quick start

The following code generates dummy data and trains a OnlnineHD classification model with it.

>>> import onlinehd
>>> dim = 10000
>>> n_samples = 1000
>>> features = 100
>>> classes = 5
>>> x = torch.randn(n_samples, features) # dummy data
>>> y = torch.randint(0, classes, [n_samples]) # dummy data
>>> model = onlinehd.OnlineHD(classes, features, dim=dim)
>>> if torch.cuda.is_available():
...     print('Training on GPU!')
...     model = model.to('cuda')
...     x = x.to('cuda')
...     y = y.to('cuda')
...
Training on GPU!
>>> model.fit(x, y, epochs=10)
>>> ypred = model(x)
>>> ypred.size()
torch.Size([1000])

For more examples, see the example.py script. Be aware that this script needs pytorch, sklearn and numpy to run.

Citation Request

If you use onlinehd code, please cite the following paper:

  1. Alejandro Hernández-Cano, Namiko Matsumoto, Eric Ping, Mohsen Imani "OnlineHD: Robust, Efficient, and Single-Pass Online Learning Using Hyperdimensional System", IEEE/ACM Design Automation and Test in Europe Conference (DATE), 2021.

Metadata

Release files for onlinehd 0.1.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 onlinehd 0.1.2
File Size Uploaded Provenance Actions
onlinehd-0.1.2.tar.gz 7.5 kB Without provenance Details for onlinehd-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for onlinehd 0.1.2
File Interpreter ABI Platform Actions
onlinehd-0.1.2-py3-none-any.whl Python 3 none any Details for onlinehd-0.1.2-py3-none-any.whl

Total release size: 16.2 kB

Release files / onlinehd-0.1.2.tar.gz

Download URL onlinehd-0.1.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
97b5721c73092c88a42a4ae12faefff65729dbf8fa659296900bc44de1e954d8
BLAKE2b-256 checksum
How to use checksums
83d3acf1baa56e88698a93a4abd4cb637d78452cd6ea630f48198a47fb49fbfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.10.11-arch1-1

Release files / onlinehd-0.1.2-py3-none-any.whl

Download URL onlinehd-0.1.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0096a39b9c6a79c864db370c423c8d8b7b308d9eb98ec7e76e57b8aa99d2fa12
BLAKE2b-256 checksum
How to use checksums
cb05e170bef130a68f50e11ab0085a03b5955df23998d862faf5ef39eac68271
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/5.10.11-arch1-1

Security for onlinehd 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

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