Search code examples
algorithmclassificationgeospatialspatialcartesian-coordinates

Spatial pattern classification


I got list of categorized dots(left image) by color. I am looking to classify gray dots according to the already categorized dots(colored dots) to indentify patterns and create boundaries.

Are there any algorithms o tools to achieve that?

enter image description here

Thanks


Solution

  • A k-means clustering machine learning algorithm would help you get the center of each cluster:

    enter image description here

    Here is a really good explanation of how the algorithm works.

    If you are using JS you can use the ml-kmeans module. Here is a quick example I made that will obtain an array of centroid clusters. All other gray points whose distance is less than centroid + size would be part of the color group.