Skip to main content
Question

Segmentation/Clustering of features based on attributes

  • July 13, 2015
  • 2 replies
  • 65 views

jdh
Contributor
Forum|alt.badge.img+40

Hi all, has anybody done any work on 1D clustering or segmentation of features based on an attribute?

 

 

ie if you had the following attribute values 1,1,3,4,4,4,6,7,8,8 and wanted to divide them into 4 groups there are several algorithms:

equal interval:  [1,1],[3,4,4,4],[6],[7,8,8]

 

quantiles: [1,1,3],[4,4,4],[6,7],[8,8]

 

jenks optimization: [1,1],[3,4,4,4],[6,7],[8,8]

 

etc.

 

 

I'm particularly interested in jenks optimization or kernel density estimation
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 17, 2015
Jenks breaking proces is described wel in WIKImath.

 

 it is basic statistics, not difficult.

 

 

 

What is a tad more difficult is creating permutations of n groups out of m values where the summ of the count is less then or equal to the the total count of numbers.

 

 

Eithe recursion or brute force.

 

Brute force is the easiest, just nesting a simple algorithm. You can do that using a couple of loops. But with large numbers you might run in large processingtimes.

 

 

Recursion with fme transformers? I think you will probably run in undefined macro problems. Havent tried it though.

 

 

n out of m algorithms can be found on sites like stack exchange or rosseta code.

jdh
Contributor
Forum|alt.badge.img+40
  • Author
  • Contributor
  • July 17, 2015
I ended up using a python caller based on the code provided here: http://carsonfarmer.com/2010/09/playing-around-with-classification-algorithms-python-and-qgis