Browse Source

drop in cuml

new-sep-loss
Michael Pilosov, PhD 9 months ago
parent
commit
527cc285f3
  1. 2
      makefile
  2. 7
      scripts/sortcolor.py

2
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

7
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))

Loading…
Cancel
Save