flexcluster-0.0.4
توضیحات
flexible clustering algorithm that allows user-define dissimilarity an centroid calculation
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | flexcluster-0.0.4 |
| نام | flexcluster |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Humberto Cardoso Marchezi |
| ایمیل نویسنده | hcmarchezi@gmail.com |
| آدرس صفحه اصلی | https://github.com/hcmarchezi/flexcluster |
| آدرس اینترنتی | https://pypi.org/project/flexcluster/ |
| مجوز | - |
# flexcluster
flexcluster is a python package that provides a flexible implementation for clustering algorithms based on K-means.
The package provides a generic clustering function that allows customization with callback parameters:
* **dissimilarity function** - *function(datapoint1, datapoint2) : int* - function that defines the distance between 2 data points.
* **centroid calculation function** - *function(datapoints : np.array) : datapoint* - function that calculates a centroid given an array of datapoints.
```
centroids, centroid_labels = clustering(
data, <--------------------------------- array of elements
k=3, <---------------------------------- number of clusters
dissimilarity_fn=dissimilarity_fn, <---- dissimilarity function
centroid_calc_fn=centroid_calc_fn, <---- centroid calculation function
max_tries=5) <-------------------------- number of clustering tries (get best result)
centroids => calculated centroids per cluster
centroid_labels => map with a numeric key for each cluster and value is an array of item indexes
```
Kmeans and kmedoids are also provided in this package as shortcuts to specific cluster configuration.
```
centroids, centroid_labels = kmeans(data, k=3)
```
```
centroids, centroid_labels = kmedoids(data, k=3)
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl flexcluster-0.0.4:
pip install flexcluster-0.0.4.whl
نصب پکیج tar.gz flexcluster-0.0.4:
pip install flexcluster-0.0.4.tar.gz