grape.ensmallen.datasets.zenodo

This sub-module offers methods to automatically retrieve the graphs from Zenodo repository.

View Source
"""This sub-module offers methods to automatically retrieve the graphs from Zenodo repository."""

from .gianttn import GiantTN

__all__ = [
	"GiantTN",
]
#   def GiantTN( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = 'graphs/zenodo', version: str = 'latest', **additional_graph_kwargs: Dict ) -> grape.ensmallen.ensmallen.Graph:
View Source
def GiantTN(
    directed: bool = False,
    preprocess: bool = True,
    load_nodes: bool = True,
    verbose: int = 2,
    cache: bool = True,
    cache_path: str = "graphs/zenodo",
    version: str = "latest",
    **additional_graph_kwargs: Dict
) -> Graph:
    """Return new instance of the GIANT-TN graph.

    The graph is automatically retrieved from the Zenodo repository.	

    Parameters
    -------------------
    directed: bool = False
        Wether to load the graph as directed or undirected.
        By default false.
    preprocess: bool = True
        Whether to preprocess the graph to be loaded in 
        optimal time and memory.
    load_nodes: bool = True,
        Whether to load the nodes vocabulary or treat the nodes
        simply as a numeric range.
    verbose: int = 2,
        Wether to show loading bars during the retrieval and building
        of the graph.
    cache: bool = True
        Whether to use cache, i.e. download files only once
        and preprocess them only once.
    cache_path: str = "graphs"
        Where to store the downloaded graphs.
    version: str = "latest"
        The version of the graph to retrieve.	
    additional_graph_kwargs: Dict
        Additional graph kwargs.

    Returns
    -----------------------
    Instace of GIANT-TN graph.

	References
	---------------------
	Please cite the following if you use the data:
	
	```bib
	@article{yue2020graph,
	  title={Graph embedding on biomedical networks: methods, applications and evaluations},
	  author={Yue, Xiang and Wang, Zhen and Huang, Jingong and Parthasarathy, Srinivasan and Moosavinasab, Soheil and Huang, Yungui and Lin, Simon M and Zhang, Wen and Zhang, Ping and Sun, Huan},
	  journal={Bioinformatics},
	  volume={36},
	  number={4},
	  pages={1241--1251},
	  year={2020},
	  publisher={Oxford University Press}
	}
	```
    """
    return AutomaticallyRetrievedGraph(
        graph_name="GiantTN",
        repository="zenodo",
        version=version,
        directed=directed,
        preprocess=preprocess,
        load_nodes=load_nodes,
        verbose=verbose,
        cache=cache,
        cache_path=cache_path,
        additional_graph_kwargs=additional_graph_kwargs
    )()

Return new instance of the GIANT-TN graph.

The graph is automatically retrieved from the Zenodo repository.

Parameters
  • directed (bool = False): Wether to load the graph as directed or undirected. By default false.
  • preprocess (bool = True): Whether to preprocess the graph to be loaded in optimal time and memory.
  • load_nodes (bool = True,): Whether to load the nodes vocabulary or treat the nodes simply as a numeric range.
  • verbose (int = 2,): Wether to show loading bars during the retrieval and building of the graph.
  • cache (bool = True): Whether to use cache, i.e. download files only once and preprocess them only once.
  • cache_path (str = "graphs"): Where to store the downloaded graphs.
  • version (str = "latest"): The version of the graph to retrieve.
  • additional_graph_kwargs (Dict): Additional graph kwargs.
Returns

- Instace of GIANT-TN graph.: References

Please cite the following if you use the data:

@article{yue2020graph,
  title={Graph embedding on biomedical networks: methods, applications and evaluations},
  author={Yue, Xiang and Wang, Zhen and Huang, Jingong and Parthasarathy, Srinivasan and Moosavinasab, Soheil and Huang, Yungui and Lin, Simon M and Zhang, Wen and Zhang, Ping and Sun, Huan},
  journal={Bioinformatics},
  volume={36},
  number={4},
  pages={1241--1251},
  year={2020},
  publisher={Oxford University Press}
}