Skip to content

Commit

Permalink
auto-commit-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 15, 2024
1 parent 51ecf3e commit 32148d3
Show file tree
Hide file tree
Showing 14 changed files with 295 additions and 404 deletions.
6 changes: 4 additions & 2 deletions docs/vame-docs-app/docs/reference/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"reference/vame/analysis/gif_creator",
"reference/vame/analysis/pose_segmentation",
"reference/vame/analysis/tree_hierarchy",
"reference/vame/analysis/umap_visualization",
"reference/vame/analysis/umap",
"reference/vame/analysis/videowriter"
],
"label": "vame.analysis",
Expand Down Expand Up @@ -50,7 +50,9 @@
"reference/vame/util/align_egocentrical",
"reference/vame/util/auxiliary",
"reference/vame/util/csv_to_npy",
"reference/vame/util/gif_pose_helper"
"reference/vame/util/data_manipulation",
"reference/vame/util/gif_pose_helper",
"reference/vame/util/model_util"
],
"label": "vame.util",
"type": "category"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,6 @@ Compute the transition matrix from the adjacency matrix.

- `np.ndarray` - Transition matrix.

#### consecutive

```python
def consecutive(data: np.ndarray, stepsize: int = 1) -> List[np.ndarray]
```

Identifies location of missing motif finding consecutive elements in an array and returns array(s) at the split.

**Arguments**:

- `data` _np.ndarray_ - Input array.
- `stepsize` _int, optional_ - Step size. Defaults to 1.


**Returns**:

- `List[np.ndarray]` - List of arrays containing consecutive elements.

#### find\_zero\_labels

```python
Expand Down Expand Up @@ -197,7 +179,7 @@ Create community bag for given files and labels (Markov chain to tree -> comm
#### create\_cohort\_community\_bag

```python
def create_cohort_community_bag(files: List[str], labels: List[np.ndarray],
def create_cohort_community_bag(labels: List[np.ndarray],
trans_mat_full: np.ndarray, cut_tree: int,
n_cluster: int) -> Tuple
```
Expand All @@ -207,7 +189,6 @@ Create cohort community bag for given labels, transition matrix, cut tree, and n

**Arguments**:

- `files` _List[str]_ - List of files paths (deprecated).
- `labels` _List[np.ndarray]_ - List of label arrays.
- `trans_mat_full` _np.ndarray_ - Full transition matrix.
- `cut_tree` _int_ - Cut line for tree.
Expand Down Expand Up @@ -260,59 +241,13 @@ Transform kmeans parameterized latent vector into communities. Get cohort commun

- `List[np.ndarray]` - List of cohort community labels for each file.

#### umap\_embedding

```python
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

```python
def umap_vis(cfg: dict, file: str, embed: np.ndarray,
community_labels_all: np.ndarray, save_path: str | None) -> None
```

Create plotly visualizaton of UMAP embedding.

**Arguments**:

- `cfg` _dict_ - Configuration parameters.
- `file` _str_ - File path.
- `embed` _np.ndarray_ - UMAP embedding.
- `community_labels_all` _np.ndarray_ - Community labels.
- `save_path` - Path to save the plot. If None it will not save the plot.


**Returns**:

None

#### community

```python
@save_state(model=CommunityFunctionSchema)
def community(config: str,
cohort: bool = True,
show_umap: bool = False,
cut_tree: int | None = None,
save_umap_figure: bool = True,
save_logs: bool = False) -> None
```

Expand All @@ -322,7 +257,6 @@ Perform community analysis.

- `config` _str_ - Path to the configuration file.
- `cohort` _bool, optional_ - Flag indicating cohort analysis. Defaults to True.
- `show_umap` _bool, optional_ - Flag indicating weather to show UMAP visualization. Defaults to False.
- `cut_tree` _int, optional_ - Cut line for tree. Defaults to None.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,6 @@ Visualize cluster centers.

None

#### load\_model

```python
def load_model(cfg: dict, model_name: str) -> torch.nn.Module
```

Load PyTorch model.

**Arguments**:

- `cfg` _dict_ - Configuration dictionary.
- `model_name` _str_ - Name of the model.


**Returns**:

- `torch.nn.Module` - Loaded PyTorch model.

#### generative\_model

```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@ Leibniz Institute for Neurobiology, Magdeburg, Germany
https://github.com/LINCellularNeuroscience/VAME
Licensed under GNU General Public License v3.0

#### load\_model

```python
def load_model(cfg: dict, model_name: str, fixed: bool) -> RNN_VAE
```

Load the VAME model.

**Arguments**:

- `cfg` _dict_ - Configuration dictionary.
- `model_name` _str_ - Name of the model.
- `fixed` _bool_ - Fixed or variable length sequences.


**Returns**:

- `RNN_VAE` - Loaded VAME model.

#### embedd\_latent\_vectors

```python
Expand All @@ -52,24 +33,6 @@ Embed latent vectors for the given files using the VAME model.

- `List[np.ndarray]` - List of latent vectors for each file.

#### consecutive

```python
def consecutive(data: np.ndarray, stepsize: int = 1) -> List[np.ndarray]
```

Find consecutive sequences in the data array.

**Arguments**:

- `data` _np.ndarray_ - Input array.
- `stepsize` _int, optional_ - Step size. Defaults to 1.


**Returns**:

- `List[np.ndarray]` - List of consecutive sequences.

#### get\_motif\_usage

```python
Expand Down
36 changes: 0 additions & 36 deletions docs/vame-docs-app/docs/reference/vame/analysis/tree_hierarchy.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,42 +109,6 @@ Draw a tree.

None

#### traverse\_tree

```python
def traverse_tree(T: nx.Graph, root_node: str | None = None) -> str
```

Traverse a tree and return the traversal sequence.

**Arguments**:

- `T` _nx.Graph_ - The tree to be traversed.
- `root_node` _str, optional_ - The root node of the tree. If None, traversal starts from the root.


**Returns**:

- `str` - The traversal sequence.

#### traverse\_tree

```python
def traverse_tree(T: nx.Graph, root_node: str | None = None) -> str
```

Traverse a tree and return the traversal sequence.

**Arguments**:

- `T` _nx.Graph_ - The tree to be traversed.
- `root_node` _str, optional_ - The root node of the tree. If None, traversal starts from the root.


**Returns**:

- `str` - The traversal sequence.

#### traverse\_tree\_cutline

```python
Expand Down
136 changes: 136 additions & 0 deletions docs/vame-docs-app/docs/reference/vame/analysis/umap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
sidebar_label: umap
title: 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

```python
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\_community\_labels

```python
def umap_vis_community_labels(cfg: dict, embed: np.ndarray,
community_labels_all: np.ndarray,
save_path: str | None) -> None
```

Create plotly visualizaton of UMAP embedding with community labels.

**Arguments**:

- `cfg` _dict_ - Configuration parameters.
- `embed` _np.ndarray_ - UMAP embedding.
- `community_labels_all` _np.ndarray_ - Community labels.
- `save_path` - Path to save the plot. If None it will not save the plot.


**Returns**:

None

#### umap\_vis

```python
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

```python
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

```python
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

```python
@save_state(model=VisualizationFunctionSchema)
def visualization(config: Union[str, Path],
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.

Loading

0 comments on commit 32148d3

Please sign in to comment.