Handle string target metric specially.
@@ -2268,6 +2268,9 @@ class UMAP(BaseEstimator):
len_x=len_X, len_y=len(y)
)
)
+ if self.target_metric == "string":
+ y_ = y[index]
+ else:
y_ = check_array(y, ensure_2d=False)[index]
if self.target_metric == "categorical":
if self.target_weight < 1.0:
