morphoclass.deepwalk module¶
Portal to DeepWalk methods from morphoclass.
-
morphoclass.deepwalk.check_installed() → bool¶ Check whether the DeepWalk package is installed.
- Returns
Whether the DeepWalk package is installed
- Return type
bool
-
morphoclass.deepwalk.get_embedding(tree, undirected, number_walks, walk_length, max_memory_data_size, seed, representation_size, window_size, workers)¶ Learn representations for tree vertices in graphs using DeepWalk.
- Parameters
tree (tmd.Tree.Tree.Tree) – TMD tree of the neuron.
undirected (bool) – Treat graph as undirected.
number_walks (int) – Number of random walks to start at each node.
walk_length (int) – Length of the random walk started at each node.
max_memory_data_size (int) – Size to start dumping walks to disk, instead of keeping them in memory.
seed (int) – Seed for random walk generator.
representation_size (int) – Number of latent dimensions to learn for each node.
window_size (int) – Window size of skipgram model.
workers (int) – Number of parallel processes.
- Returns
Embedded vectors.
- Return type
numpy.ndarray
References
See file: - https://github.com/phanein/deepwalk/blob/ 6e6dff245e4692e9bea47e9017c1034e51afbf29/deepwalk/__main__.py in case max_memory_data_size is ever crossed.
- Raises
NotImplementedError – The part was not implemented since we don’t have big graphs size that are not able to fit into the memory.
-
morphoclass.deepwalk.how_to_install_msg() → str¶ Get installation instructions for DeepWalk.
- Returns
The instructions on how to install DeepWalk.
- Return type
str
-
morphoclass.deepwalk.warn_if_not_installed() → None¶ Issue a UserWarning if deepwalk is not installed.