k-mxt and k-mxt-w clustering algorithms
Project description
k-mxt-w3
The k-mxt-w3 library contains an implementation of the k-mxt and k-mxt-w algorithms. Using clustering algorithms can identify clusters on a dataset.
Installation
pip install k-mxt-w3
Parameters
- The larger the parameter k, the more vertices will be in each cluster, and the number of clusters will be less.
- The eps parameter indicates the maximum distance between the vertices at which these vertices are connected.
Usage
import k_mxt_w3.clustering_algorithms
import k_mxt_w3.clusters_data
import k_mxt_w3.data
import pandas as pd
filename = 'dataset.csv'
df = pd.read_csv(filename) # reading csv-file data
dataset = k_mxt_w3.data.DataPropertyImportSpace(df=df)
features_list = ['column_x'] # list of the dataset columns
x, y, features = dataset.get_data(name_latitude_cols='latitude', # name of the column containing the latitude values
name_longitude_cols='longitude', # name of the column containing the longitude values
features_list=features_list) # list of others
clusters = k_mxt_w3.clusters_data.ClustersDataSpaceFeaturesEuclidean(x_init=x,
y_init=y,
features_init=features) # creating an object
# containing clusters
alg = k_mxt_w3.clustering_algorithms.K_MXT_gauss(k=5, eps=0.05, clusters_data=clusters) # creating an object
# with k=5, eps=0.05
alg() # run the clustering algorithm
print(clusters.cluster_numbers) # print cluster number for each vertex
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
k_mxt_w3-0.0.2.tar.gz
(4.4 kB
view details)
File details
Details for the file k_mxt_w3-0.0.2.tar.gz.
File metadata
- Download URL: k_mxt_w3-0.0.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d5c1ef5fac562a6b3606b61012d93e0c15a40824f0321411f05ea541c5fca51
|
|
| MD5 |
8d53dec54c929b28348cdb4dd83a9b43
|
|
| BLAKE2b-256 |
959a45a1de02b87318e86f82be13d846537e611d6596d6959d93ef96b0a3fa48
|