I would like to use one of sklearn's clustering algorithms but with the restriction that certain sets of points must belong to the same class. For instance, given the set of points below I would like to enforce that all red points belong to the same class and all blue points belong to the same class. I would also like it so that red and blue points can belong to the same class. If this is not possible in sklearn I am also open to using other libraries.
