# colonize a polarized set

I've a set of numbers like S ={0.1, 0.12, 0.15, 0.11, 0.8, 0.82, 0.9} As I can humanly see this set is heavily polarized I case see two different Pole/Colony in S one having poor values S1 = {0.1,0.12,0.11,0.15} and S2 = {0.8,0.82,0.9} I want a function that will take a set and return a set of colonies in given set.

If there exists one number like 0.5 here which doesn't belong to any colony I need to assume its an exception and that value should be ignored as it doesn't describe nature of whole set

where a colony is a set of elements having values close to each other. and I don't want a fixed definition of close, rather close should be defined relatively.

I've thought to calculate a deviation table of all elements of the set where I calculate how much each elements deviate from mean. but not able to furnish it completely without a fixed magic margin value.

or do there already exist any similar mathematical model ?

-
I am dealing with all floating point numbers varying from 0..1 and also rounding have a fixed margin of 10^-n –  Neel Basu Oct 9 '12 at 11:11
Not every question with the word "set" is "set theory". –  Asaf Karagila Oct 9 '12 at 11:28
Cluster analysis is designed to solve problems like that. Although this will not give you a function that returns colonies given a set of numbers. Rather you will have an algorithm that after providing some parameteres and the input set will suggest the colonies. –  Hagen Oct 9 '12 at 12:05
I want an algorithm that decides what that some parameters should be –  Neel Basu Oct 9 '12 at 12:25