Fuzzy c-means according to the research paper by James C. Bezdek et. al
Project description
fuzzy-c-means
Fuzzy c-means Clustering
Description
This implementation is based on the paper FCM: The fuzzy c-means clustering algorithm by: James C.Bezdek, Robert Ehrlich, and William Full
To run the tests
sh run_tests.sh
To run the coverage
sh run_coverage.sh
Install via pip
pip install fuzzycmeans
How to use it
- Fit the model. This is to cluster any given data X.
X = np.array([[1, 1], [1, 2], [2, 2], [0, 0], [0, 0]])
fcm = FCM(n_clusters=3, max_iter=1)
fcm.fit(X, [0, 0, 0, 1, 2])
- (Optional.) Use the model to assign new data points to existing clusters. Note that the predict function would return the membership as this a fuzzy clustering.
Y = np.array([[1, 2], [2, 2], [3, 1], [2, 1], [6, 8]])
membership = fcm.predict(Y)
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
fuzzycmeans-1.0.4.tar.gz
(11.5 kB
view details)
Built Distribution
File details
Details for the file fuzzycmeans-1.0.4.tar.gz
.
File metadata
- Download URL: fuzzycmeans-1.0.4.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f456d21956e61272b27084709edab51b9a4ba83887ed42629be9699cc9628d01 |
|
MD5 | f9c4369fb1505791cb786d2c89567c32 |
|
BLAKE2b-256 | af3d2b5e11bc0b85f5b145db295de19e99d3f65ff32ebbed4508bd34bd3c35a5 |
File details
Details for the file fuzzycmeans-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: fuzzycmeans-1.0.4-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd7a846bd4cdeba75a1e902ecc553b61a1f0f5b4716fce8ef31b839098c0e876 |
|
MD5 | df22a9381210d9ed4c4f6db5729a1cb1 |
|
BLAKE2b-256 | 1b635970ba23af6d84322295447300e9f3d01f2602a13ef59db2df519dd1ff75 |