Skip to main content

MiniSom

Self Organizing Maps

MiniSom GPU is a minimalistic and PyTorch based implementation of the Self Organizing Maps (SOM). SOM is a type of Artificial Neural Network able to convert complex, nonlinear statistical relationships between high-dimensional data items into simple geometric relationships on a low-dimensional display. Minisom is designed to allow researchers to easily build on top of it and to give students the ability to quickly grasp its details.

This repository is a fork of the original MiniSom package.

Installation

Just use pip:

pip install minisom_gpu

How to use it

In order to use MiniSom you need your data organized as a PyTorch tensor where each row corresponds to an observation like the following:

import torch

data = torch.tensor([[ 0.80,  0.55,  0.22,  0.03],
        [ 0.82,  0.50,  0.23,  0.03],
        [ 0.80,  0.54,  0.22,  0.03],
        [ 0.80,  0.53,  0.26,  0.03],
        [ 0.79,  0.56,  0.22,  0.03],
        [ 0.75,  0.60,  0.25,  0.03],
        [ 0.77,  0.59,  0.22,  0.03]])

Then you can train MiniSom just as follows:

from minisom_gpu.som import MiniSom    
som = MiniSom(6, 6, 4, sigma=0.3, learning_rate=0.5) # initialization of 6x6 SOM
som.train(data, 100) # trains the SOM with 100 iterations

You can obtain the position of the winning neuron on the map for a given sample as follows:

som.winner(data[0])

For an overview of all the features implemented in minisom you can browse the following examples: https://github.com/rctorres/minisom/tree/master/examples

Metadata

Release files for minisom-gpu 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minisom-gpu 0.2.0
File Size Uploaded Provenance
minisom_gpu-0.2.0.tar.gz 9.7 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for minisom-gpu 0.2.0
File Interpreter ABI Platform
minisom_gpu-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 MB

Release files / minisom_gpu-0.2.0.tar.gz

Download URL minisom_gpu-0.2.0.tar.gz
Size 9.7 MB
Tags Source
SHA-256 checksum
How to use checksums
acddd06cf28f6004cf4bd4808002527dca9fc9703eaecc538351c1bfdb672c15
BLAKE2b-256 checksum
How to use checksums
e2f2ccd359de76c719021fc0216cc225fc2c0478a65fe9a3f587996811c59306
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.5

Release files / minisom_gpu-0.2.0-py3-none-any.whl

Download URL minisom_gpu-0.2.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5461c1c6a9f7543b6b6b7448e3cf0e522d7f08d11176049148a62b01be75096f
BLAKE2b-256 checksum
How to use checksums
3b059b8eabeb049cfec6abddef21e8c08c3dde2950cb1155c8501334a002c3fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.5

Security for minisom-gpu 0.2.0

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.

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