|
@ -79,15 +79,16 @@ if KIND in ("lex", "alpha", "abc"): |
|
|
preds = np.array(colors) |
|
|
preds = np.array(colors) |
|
|
|
|
|
|
|
|
elif KIND == "umap": |
|
|
elif KIND == "umap": |
|
|
import umap |
|
|
# from umap import UMAP |
|
|
|
|
|
from cuml import UMAP |
|
|
|
|
|
|
|
|
# Use UMAP to create a 1D representation |
|
|
# Use UMAP to create a 1D representation |
|
|
reducer = umap.UMAP( |
|
|
reducer = UMAP( |
|
|
n_components=1, |
|
|
n_components=1, |
|
|
n_neighbors=250, |
|
|
n_neighbors=250, |
|
|
min_dist=0.005, |
|
|
min_dist=0.005, |
|
|
metric="euclidean", |
|
|
metric="euclidean", |
|
|
# random_state=SEED, |
|
|
random_state=SEED, |
|
|
) |
|
|
) |
|
|
embedding = reducer.fit_transform(np.array(rgb_values)) |
|
|
embedding = reducer.fit_transform(np.array(rgb_values)) |
|
|
|
|
|
|
|
|