cdlib.datasets.fetch_network_ground_truth¶
- cdlib.datasets.fetch_network_ground_truth(net_name: str = 'karate_club', net_type: str = 'igraph') [<class 'object'>, <class 'object'>]¶
从远程仓库加载所需的网络及其真实分区。
- Parameters:
net_name – 网络名称
net_type – 期望的图形对象,可选“networkx”和“igraph”。默认值为igraph。
- Returns:
一个元组,包含 (graph_object, NodeClustering)
- Example:
>>> from cdlib import datasets >>> G, gt_coms = datasets.fetch_network_ground_truth(fetch_ground_truth_data="karate_club", net_type="igraph")