Skip to main content

vame.analysis.umap

Variational Animal Motion Embedding 1.0-alpha Toolbox © K. Luxem & P. Bauer, Department of Cellular Neuroscience Leibniz Institute for Neurobiology, Magdeburg, Germany

https://github.com/LINCellularNeuroscience/VAME Licensed under GNU General Public License v3.0

umap_embedding

def umap_embedding(cfg: dict, file: str, model_name: str, n_cluster: int,
parametrization: str) -> np.ndarray

Perform UMAP embedding for given file and parameters.

Arguments:

  • cfg dict - Configuration parameters.
  • file str - File path.
  • model_name str - Model name.
  • n_cluster int - Number of clusters.
  • parametrization str - parametrization.

Returns:

  • np.ndarray - UMAP embedding.

umap_vis

def umap_vis(embed: np.ndarray, num_points: int) -> None

Visualize UMAP embedding without labels.

Arguments:

  • embed np.ndarray - UMAP embedding.
  • num_points int - Number of data points to visualize.

Returns:

None - Plot Visualization of UMAP embedding.

umap_label_vis

def umap_label_vis(embed: np.ndarray, label: np.ndarray, n_cluster: int,
num_points: int) -> None

Visualize UMAP embedding with motif labels.

Arguments:

  • embed np.ndarray - UMAP embedding.
  • label np.ndarray - Motif labels.
  • n_cluster int - Number of clusters.
  • num_points int - Number of data points to visualize.

Returns:

fig - Plot figure of UMAP visualization embedding with motif labels.

umap_vis_comm

def umap_vis_comm(embed: np.ndarray, community_label: np.ndarray,
num_points: int) -> None

Visualize UMAP embedding with community labels.

Arguments:

  • embed np.ndarray - UMAP embedding.
  • community_label np.ndarray - Community labels.
  • num_points int - Number of data points to visualize.

Returns:

fig - Plot figure of UMAP visualization embedding with community labels.

visualization

@save_state(model=VisualizationFunctionSchema)
def visualization(config: Union[str, Path],
parametrization: Parametrizations,
label: Optional[str] = None,
save_logs: bool = False) -> None

Visualize UMAP embeddings based on configuration settings.

Arguments:

  • config Union[str, Path] - Path to the configuration file.
  • label str, optional - Type of labels to visualize. Default is None.

Returns:

None - Plot Visualization of UMAP embeddings.