Solved

# Compute cluster centroid

Posted on 2011-02-24
Medium Priority
393 Views
Last Modified: 2012-05-11
How can i compute the center of a class?
if each class has many many elements.
0
Question by:dadadude
2 Comments

LVL 5

Expert Comment

ID: 34972167
Have a look here for various methods:
http://en.wikipedia.org/wiki/Cluster_analysis
0

LVL 37

Accepted Solution

TommySzalapski earned 2000 total points
ID: 34987452
The centroid is generally calculated as the average of all the points. I assume your classes have X,Y coordinates in there somewhere? (or X,Y,Z, or something). Just take the average of each and that's the centroid.

If you need to have one existing element be the centroid, then just use euclidean distance to find the closest one to the average location.

This is the standard way of doing it in almost all cases. You could also take the element that has the least total distance from all the others, but that takes a lot longer and will usually give you the same one anyway (maybe always).
0

## Featured Post

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

## Join & Write a Comment Already a member? Login.

Linear search (searching each index in an array one by one) works almost everywhere but it is not optimal in many cases. Let's assume, we have a book which has 42949672960 pages. We also have a table of contents. Now we want to read the content on p…
Iteration: Iteration is repetition of a process. A student who goes to school repeats the process of going to school everyday until graduation. We go to grocery store at least once or twice a month to buy products. We repeat this process every mont…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…
###### Suggested Courses
Course of the Month14 days, 20 hours left to enroll

#### 597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.