I am trying to figure out the best approach to determining commonality or similarity between various objects or arrays and would be interested in getting the community's input. I am currently building an early research prototype in javascript and I need to adopt a smart way of comparing objects in order to identify emerging patterns or trends. By identifying patterns the application I am working on would be capable of making more informed decisions.
So for example given 6 simplified objects:
A_obj = {w: 0.66, x: 0.36, y: 0.88, z: 0.34},
B_obj = {w: 0.46, x: 0.29, y: 0.91, z: 0.37},
C_obj = {w: 0.69, x: 0.40, y: 0.95, z: 0.38},
D_obj = {w: 0.78, x: 0.37, y: 0.84, z: 0.43},
E_obj = {w: 0.14, x: 0.41, y: 0.85, z: 0.53},
F_obj = {w: 0.85, x: 0.33, y: 0.96, z: 0.22};
By looking at the above, it is clear that there is a greater degree of commonality in the x and y traits, while there is greater variance in w and z traits.
I'm hoping to find a relatively lightweight solution that is easy to replicate in other languages also. All thoughts and comments are welcome.