class_docstr: UMAP Mixin for automagic UMAPing
class_docstr_tok: ["UMAP","Mixin","for","automagic","UMAPing"]
docstr: Transforms data into UMAP embedding
  
  Args:
      :df: Dataframe to transform
      :y: Target column
      :kind: One of `nodes` or `edges`
      :min_dist: Epsilon for including neighbors in infer_graph
      :n_neighbors: Number of neighbors to use for contextualization
      :merge_policy: if True, use previous graph, adding new batch to existing graph's neighbors
          useful to contextualize new data against existing graph. If False, `sample` is irrelevant.
  
      sample: Sample number of existing graph's neighbors to use for contextualization -- helps make denser graphs
      return_graph: Whether to return a graph or just the embeddings
      fit_umap_embedding: Whether to infer graph from the UMAP embedding on the new data, default True
      verbose: Whether to print information about the graph inference
docstr_tok: ["Transforms","data","into","UMAP","embedding","Args",":",":","df",":","Dataframe","to","transform",":","y",":","Target","column",":","kind",":","One","of","`","nodes","`","or","`","edges","`",":","min_dist",":","Epsilon","for","including","neighbors","in","infer_graph",":","n_neighbors",":","Number","of","neighbors","to","use","for","contextualization",":","merge_policy",":","if","True",",","use","previous","graph",",","adding","new","batch","to","existing","graph","'s","neighbors","useful","to","contextualize","new","data","against","existing","graph",".","If","False",",","`","sample","`","is","irrelevant",".","sample",":","Sample","number","of","existing","graph","'s","neighbors","to","use","for","contextualization","--","helps","make","denser","graphs","return_graph",":","Whether","to","return","a","graph","or","just","the","embeddings","fit_umap_embedding",":","Whether","to","infer","graph","from","the","UMAP","embedding","on","the","new","data",",","default","True","verbose",":","Whether","to","print","information","about","the","graph","inference"]
code: def transform_umap(
      self,
      df: pd.DataFrame,
      y: Optional[pd.DataFrame] = None,
      kind: str = "nodes",
      min_dist: Union[str, float, int] = "auto",
      n_neighbors: int = 7,
      merge_policy: bool = False,
      sample: Optional[int] = None,
      return_graph: bool = True,
      fit_umap_embedding: bool = True,
      verbose: bool = False,
  ) -> Union[
      Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame], Plottable
  ]:
      """Transforms data into UMAP embedding
  
      Args:
          :df: Dataframe to transform
          :y: Target column
          :kind: One of `nodes` or `edges`
          :min_dist: Epsilon for including neighbors in infer_graph
          :n_neighbors: Number of neighbors to use for contextualization
          :merge_policy: if True, use previous graph, adding new batch to existing graph's neighbors
              useful to contextualize new data against existing graph. If False, `sample` is irrelevant.
  
          sample: Sample number of existing graph's neighbors to use for contextualization -- helps make denser graphs
          return_graph: Whether to return a graph or just the embeddings
          fit_umap_embedding: Whether to infer graph from the UMAP embedding on the new data, default True
          verbose: Whether to print information about the graph inference
      """
      df, y = make_safe_gpu_dataframes(df, y, "pandas")
      X, y_ = self.transform(
          df, y, kind=kind, return_graph=False, verbose=verbose
      )
      X, y_ = make_safe_gpu_dataframes(X, y_, self.engine)  # type: ignore
      emb = self._umap.transform(X)  # type: ignore
      emb = self._bundle_embedding(emb, index=df.index)
      if return_graph and kind not in ["edges"]:
          emb, _ = make_safe_gpu_dataframes(
              emb, None, "pandas"
          )  # for now so we don't have to touch infer_edges, force to pandas
          X, y_ = make_safe_gpu_dataframes(X, y_, "pandas")
          g = self._infer_edges(
              emb,
              X,
              y_,
              df,
              infer_on_umap_embedding=fit_umap_embedding,
              merge_policy=merge_policy,
              eps=min_dist,
              sample=sample,
              n_neighbors=n_neighbors,
              verbose=verbose,
          )
          return g
      return emb, X, y_
  
imports: import copy
  from time import time
  from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union
  from inspect import getmodule
  import pandas
  from .None import constants
  from .constants import CUML, UMAP_LEARN
  from .feature_utils import FeatureMixin, Literal, XSymbolic, YSymbolic, prune_weighted_edges_df_and_relabel_nodes, resolve_feature_engine
  from .PlotterBase import Plottable, WeakValueDictionary
  from .util import check_set_memoize
  import logging
label_desc: Use image node_id 7 for calling the UMAPMixin obj's underlying member method code with example usage: obj.transform_umap(df, y, kind, min_dist, n_neighbors, merge_policy, sample, return_graph, fit_umap_embedding, verbose) and returns: emb,  X,  y_, g