Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assigning colors to classes to maximize dissimilarity of neighbouring classes in a given embedding #2

Open
dkobak opened this issue Nov 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@dkobak
Copy link

dkobak commented Nov 14, 2022

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?

@lmcinnes lmcinnes added the enhancement New feature or request label Nov 14, 2022
@lmcinnes
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants