Skip to content

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

Description

@dkobak

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions