diff --git a/makefile b/makefile index 16711e3..aa31c8b 100644 --- a/makefile +++ b/makefile @@ -55,6 +55,8 @@ umap: python scripts/sortcolor.py -s umap --dpi 300 --seed $$seed ; \ done +sort_umap:; + python scripts/sortcolor.py -s umap --dpi 300 --seed 21 sort_lex: python scripts/sortcolor.py -s lex --dpi 300 diff --git a/scripts/sortcolor.py b/scripts/sortcolor.py index 1b57691..d50bc00 100644 --- a/scripts/sortcolor.py +++ b/scripts/sortcolor.py @@ -79,15 +79,16 @@ if KIND in ("lex", "alpha", "abc"): preds = np.array(colors) elif KIND == "umap": - import umap + # from umap import UMAP + from cuml import UMAP # Use UMAP to create a 1D representation - reducer = umap.UMAP( + reducer = UMAP( n_components=1, n_neighbors=250, min_dist=0.005, metric="euclidean", - # random_state=SEED, + random_state=SEED, ) embedding = reducer.fit_transform(np.array(rgb_values))