in denseclus/DenseClus.py [0:0]
def _umap_embeddings(self):
if self.umap_combine_method == "intersection":
self.mapper_ = self.numerical_umap_ * self.categorical_umap_
elif self.umap_combine_method == "union":
self.mapper_ = self.numerical_umap_ + self.categorical_umap_
elif self.umap_combine_method == "contrast":
self.mapper_ = self.numerical_umap_ - self.categorical_umap_
elif self.umap_combine_method == "intersection_union_mapper":
intersection_mapper = umap.UMAP(
random_state=self.random_state,
n_neighbors=self.n_neighbors,
n_components=self.n_components,
min_dist=0.0,
).fit(self.numerical_)
self.mapper_ = intersection_mapper * (
self.numerical_umap_ + self.categorical_umap_
)
else:
raise KeyError("Select valid UMAP combine method")
return self