We use weighted K-means clustering algorithm to determine warehouses' location of a specific restaurant chain that operates in Java Island. The data points are all cities in Java island. What become the weights are cities population. Moreover, the distance used is Haversine distance, as we will work with lon-lat coordinate system.
- Define Haversine distance using
haversine_dist.R
- Define sum of squares error using
SSM.R
- Define and execute weighted K-means algorithm using
weighted_kmeans.R
- Find the optimal K via The Elbow Method using
elbow_method.R
- Plot the result using
plotting_result.R