KMOR Numpy
The python implementation for k-means clustering with outlier removal from the paper written by Guojun Gan et al. [1]
Installation
pip install kmor
You can also install by conda
conda install -c ksunhokim kmor
Example
import numpy as np
from kmor import kmor
X = np.array([
[1,0,0],
[0,1,0],
[0,0,1],
[0,0,100]
])
U = kmor(X, 1)
print(U) # [0,0,0,1]
The outliers are assigned to the extra cluster k.
Documentation
kmor(X, k, y, nc0, max_iteration, gamma)
| Parameter | Description |
|---|---|
| X | Your data. |
| k | Number of clusters. |
| y | Parameter for outlier detection. (default=3) Increase this to make outlier removal subtle. |
| nc0 | Maximum percentage of your data that can be assigned to outlier cluster. (default=0.1) |
| max_iteration | Maximum number of iterations. |
| gamma | Used to check the convergence. |
References
[1] Gan, Guojun, and Michael Kwok-Po Ng. "K-means clustering with outlier removal." Pattern Recognition Letters 90 (2017): 8-14.
Metadata
Release files for kmor 1.0.7
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 | |
|---|---|---|---|---|
| kmor-1.0.7.tar.gz | 2.7 kB | Without provenance | Details |
Release files / kmor-1.0.7.tar.gz
| Download URL | kmor-1.0.7.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee4e6c74ea1b134b4228573d837c3799920907b3acab1474a59071c7e45b27be
|
|
BLAKE2b-256 checksum How to use checksums |
1023e28f3f875a141f65afe95b753afc33d6d34682fb029f538202637f485ef2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
|
Security for kmor 1.0.7
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.