Assigning colors to classes to maximize dissimilarity of neighbouring classes in a given embedding
Opened this issue · 1 comments
Hi Leland, cool work! I wonder if you considered the following scenario: there is a 2D embedding (e.g. UMAP) of some data that contain K classes. We want to make a scatter plot and assign a distinct colour to each class. We want to do this assignment such that neighbouring classes (i.e. classes that partially overlap in the embedding, or are simply adjacent to each other) have as distinct colours as possible. I.e. if there are two shades of red, then they should be given to classes that are far away in the embedding.
I guess this could be be approached by first generating a colormap of K distinct suitable colours, and then assigning them to classes to maximize colour dissimilarity between "neighbouring" classes (could be measured by kNN overlap or some other method). This can be either solved greedily or with annealing.
Does this sound like something that could potentially be within the scope of glasbey
?
I certainly agree this is a worthwhile problem to solve. I will say that it is likely out of scope for the immediate future for glasbey -- I think there are actually some interesting potential solutions, but it would require significantly different algorithms to solve. So it may be an interesting future project, and I'll definitely keep this issue open and flagged, but I don't think I'll have time to add anything any time soon.