If one feature of my objects is color, how to compute similarity between two objects?
It is correct to transform it to RGB and use Euclidean distance in 3D? Or is there any acceptable one dimensional ordering of colors (as in the case of rainbow)?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.
Sign up to join this communityIf one feature of my objects is color, how to compute similarity between two objects?
It is correct to transform it to RGB and use Euclidean distance in 3D? Or is there any acceptable one dimensional ordering of colors (as in the case of rainbow)?
Not an expert but: Any one dimensional ordering is likely arbitrary. Some form of Euclidean distance is probably what you need, but the question is: colour as perceived by whom? The human eye is differently sensitive to different colours, and the base unit is the 'just noticeable difference'. Check the Wikipedia page.
On the other hand it wouldn't exactly be incorrect simply to measure the Euclidean distance between the RGB dimensions. I think this might be the correct measure if you were interested in the amount of light emitted/reflected, for instance, rather than how (non-colour blind) humans perceive the different colours.