Turfjs / Turfjs/turf

clustersKmeans Ambiguity

Open
#2,087 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

@turf/clusters-kmeans docs
Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

I've got a question about the clustersKmeans function.

Normally, a K-means clustering algorithm assumes Euclidean space. Although, my understanding is that some libraries do have special options to account for the curvature of the earth.

Does your implementation of the K means algorithm do anything to adjust for the fact that the clustering occurs over a round surface? If so, it might be a good idea to specify this in the documentation.

Thank you.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the clustersKmeans function and its existing documentation, then inspect how it measures distance and assigns points to clusters. Confirm whether the implementation accounts for Earth's curvature; done means documenting the actual behavior clearly, including any relevant limitations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.