Weighted KMeans Clustering for Geolocational Problem
Project description
Repo for weighted k means clustering for specifically geo locational problems.
For an example and mathematical explanation:
https://emrahcimren.github.io/data%20science/Greenfield-Analysis-with-Weighted-Clustering/
Prerequisites
Install environment.yml for prerequisites.
` conda env create -f environment.yml `
To recreate environment.yml
` conda env export > environment.yml `
To create requirements.txt from environment.yml
` pip freeze > requirements.txt `
Installation
` pip install cimren-wkmeans-geo `
Inputs
input_locations is a pandas dataframe with the following format.
LOCATION_NAME | LATITUDE | LONGITUDE | WEIGHT — | — | — | — LOC 0 | -27.0065 | 170.583 | 1
number_of_clusters: Number of clusters to be created
minimum_elements_in_a_cluster: Minimum elements in a cluster
maximum_elements_in_a_cluster: Maximum elements in a cluster
maximum_iteration: How many maximum number of steps the algorithm takes to stop if it does not find the solution
enable_minimum_maximum_elements_in_a_cluster: True/False to enable minimum and maximum cluster size
objective_range: Acceptable difference between objectives at each iteration
How to use
` from wkmeans_geo import wkmeans_clustering as wkc clusters, locations_with_clusters = wkc.calculate_clusters(...) `
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
Built Distribution
Hashes for cimren_wkmeans_geo-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b6b5f1a98a1a9af77821d5a0295b85816a75401067ef22c578218403f3731c4 |
|
MD5 | 2cbec11bf96e96e4a3843a9c00cab965 |
|
BLAKE2b-256 | 3e47d2b6f8e804902b569de4a9a54fbfdd80731a35c6fb5d02e335d1c6ef709b |