Is there a name for this type of algorithm?
I have a 2 dimensional array forming a table:
[color][number][shape ]
-------------------------
[black][10 ][square ]
[black][10 ][circle ]
[red ][05 ][triangle]
[red ][04 ][triangle]
[green][11 ][oval ]
and what I want to do is group largest common denominators, such that we get:
3 groups
- group #1: color=black, number=10, shapes = [square, circle]
- group #2: color=red, shape=triange, numbers = [05,04]
- group #3: color=green, number=11, shape = oval
I wrote code that will handl开发者_JAVA技巧e a 2 "column" scenario, then I needed to adjusted it for 3 and I was figuring I might as well do it for n. I wanted to check first if there is some literature around this but I can't think of what to start looking for!
Data Clustering Algorithms is the closest thing I could find.
And your space is 3-dimensional where each point is identified by 3-tuple (color,number,shape)
.
- http://home.dei.polimi.it/matteucc/Clustering/tutorial_html/
- http://en.wikipedia.org/wiki/Cluster_analysis
精彩评论