https://github.com/sachinkalsi/kmedoids
The Partitioning Around Medoids (PAM) implementation of the K-Medoids algorithm in Python [Unmaintained]
https://github.com/sachinkalsi/kmedoids
cluster clusters kmedoids-clustering machine-learning medoids partitioning unsupervised-learning
Last synced: 5 months ago
JSON representation
The Partitioning Around Medoids (PAM) implementation of the K-Medoids algorithm in Python [Unmaintained]
- Host: GitHub
- URL: https://github.com/sachinkalsi/kmedoids
- Owner: SachinKalsi
- License: mit
- Created: 2018-05-30T05:57:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-25T04:44:25.000Z (about 2 years ago)
- Last Synced: 2023-10-25T21:14:30.568Z (over 1 year ago)
- Topics: cluster, clusters, kmedoids-clustering, machine-learning, medoids, partitioning, unsupervised-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 276 KB
- Stars: 22
- Watchers: 3
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# K-Medoids
K-Medoids is a clustering algorithm. **Partitioning Around Medoids (PAM)** algorithm is one such implementation of K-Medoids## Prerequisites
- Scipy
- Numpy
## Getting Started
`from KMedoids import KMedoids`## Parameters
- `n_cluster`: number of clusters
- `max_iter`: maximum number of iterations
- `tol`: tolerance level## Example
[Wiki Example](https://en.wikipedia.org/wiki/K-medoids#Demonstration_of_PAM)
```
data = [[2, 6], [3, 4], [3, 8], [4, 7], [6, 2], [6, 4], [7, 3], [7, 4], [8, 5], [7, 6]]
k_medoids = KMedoids(n_cluster=2)
k_medoids.fit(data)
```
