Metadata-Version: 2.1
Name: fuzzycmeans
Version: 1.0.4
Summary: Fuzzy c-means according to the research paper by James C. Bezdek et. al
Home-page: https://github.com/oeg-upm/fuzzy-c-means
Author: Ahmad Alobaid
Author-email: aalobaid@fi.upm.es
Classifier: Programming Language :: Python :: 3.9
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
License-File: LICENSE

# 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
1. Fit the model. This is to cluster any given data *X*.
```Python
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])
```
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. 
```Python
Y = np.array([[1, 2], [2, 2], [3, 1], [2, 1], [6, 8]])
membership = fcm.predict(Y)
```


