This is python implementation for Kohonen Self Organizing map using numpy and tensor
## Installtion
**Python 3**
`pip install somlib`
## Usage
1. Numpy implementation
```
from somlib import som
s = som.SOM(neurons=(5,5), dimentions=3, n_iter=500, learning_rate=0.1)
s.train(samples) # samples is a n x 3 matrix
print("Cluster centres:", s.weights_)
print("labels:", s.labels_)
result = s.predict(samples)
```
Here 5,5 is the dimention of neurons, 3 is the number of features. samples is numpy array with each sample a 3 dimentional vector
2. Tensor implementation
```
from somlib import som
s = SOM(neurons=(5,5), dimentions=3, n_iter=500, learning_rate=0.1, mode="tensor")
s.train(samples) # samples is a n x 3 matrix
print("Cluster centres:", s.weights_)
print("labels:", s.labels_)
result = s.predict(samples)
```
### Display clusters
To display clusters after training use this
```s.displayClusters(samples)```

Metadata
Release files for somlib 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| somlib-0.0.4.tar.gz | 6.1 kB | Without provenance | Details for somlib-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| somlib-0.0.4-py2-none-any.whl | Python 2 | none | any | Details for somlib-0.0.4-py2-none-any.whl |
Total release size: 16.2 kB
Release files / somlib-0.0.4.tar.gz
| Download URL | somlib-0.0.4.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
620ddbf1beb61e25725b66198cb50e59847401e55ea270dc346d030bffe6e117
|
|
BLAKE2b-256 checksum How to use checksums |
28c38d500699b256fda57c6ee2bee42cc34035fa30a71ed8b05e6fc9403fe9f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.12
|
Release files / somlib-0.0.4-py2-none-any.whl
| Download URL | somlib-0.0.4-py2-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
3dbeed2556138fc568a38a40a32ad755e4bbd877e09532ff91a5f2efd89d8094
|
|
BLAKE2b-256 checksum How to use checksums |
c463be68a94599eaa0fb880751b86607dc09cb31a4918d96b60ea47e71833427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.12
|
Security for somlib 0.0.4
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.