You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1f62785
Browse filesBrowse the repository at this point in the historyBrowse files
We are rushing the documentation and tutorials, which will be updated twice a day!<br>
20
19
The v0.9.2 will be released soon, which will include many structure visualizations!<br>
21
-
我们正在加快文档和教程的更新,每天会在午饭和晚饭期间进行两次更新!<br>
22
20
我们很快将发布v0.9.2版本,其中包含了各种关联结构的可视化!
23
21
</p>
24
22
@@ -29,7 +27,7 @@ The v0.9.2 will be released soon, which will include many structure visualizatio
29
27
30
28
**DHG***(DeepHypergraph)* is a deep learning library built upon [PyTorch](https://pytorch.org) for learning with both Graph Neural Networks and Hypergraph Neural Networks. It is a general framework that supports both low-order and high-order message passing like **from vertex to vertex**, **from vertex in one domain to vertex in another domain**, **from vertex to hyperedge**, **from hyperedge to vertex**, **from vertex set to vertex set**.
31
29
32
-
It supports a wide variety of structures like low-order structures (simple graph, directed graph, bipartite graph, etc.), high-order structures (simple hypergraph, etc.). Various spectral-based operations (like Laplacian-based smoothing) and spatial-based operations (like message psssing from domain to domain) are integrated inside different structures. It provides multiple common metrics for performance evaluation on different tasks. Many state-of-the-art models are implemented and can be easily used for research. We also provide various visualization tools for both low-order structures and high-order structures.
30
+
It supports a wide variety of structures like low-order structures (graph, directed graph, bipartite graph, etc.), high-order structures (hypergraph, etc.). Various spectral-based operations (like Laplacian-based smoothing) and spatial-based operations (like message psssing from domain to domain) are integrated inside different structures. It provides multiple common metrics for performance evaluation on different tasks. Many state-of-the-art models are implemented and can be easily used for research. We also provide various visualization tools for both low-order structures and high-order structures.
33
31
34
32
In addition, DHG's [dhg.experiments](https://deephypergraph.readthedocs.io/en/latest/api/experiments.html) module (that implements **Auto-ML** upon [Optuna](https://optuna.org)) can help you automatically tune the hyper-parameters of your models in training and easily outperforms the state-of-the-art models.
35
33
@@ -56,10 +54,10 @@ DHG is built upon Pytorch, and any Pytorch-based models can be integrated into D
56
54
DHG provides various Laplacian matrices and message passing functions to help build your spectral/spatial-based models, respectively.
57
55
58
56
-**Visualization of Graphs and Hypergraphs**
59
-
DHG provides a powerful visualization tool for graphs and hypergraphs. You can easily visualize the structure of your graphs and hypergraphs.
57
+
DHG provides a powerful visualization tool for graph and hypergraph. You can easily visualize the structure of your graph and hypergraph.
60
58
61
59
-**Bridge the Gap between Graphs and Hypergraphs**:
62
-
DHG provides functions to build hypergraphs from graphs and build graphs from hypergraphs. Maybe promoting the graphs to hypergraphs can exploit those potential high-order connections and improve the performance of your model.
60
+
DHG provides functions to build hypergraph from graph and build graph from hypergraph. Maybe promoting the graph to hypergraph can exploit those potential high-order connections and improve the performance of your model.
63
61
64
62
-**Attach Spectral/Spatial-Based Operations to Structure**:
65
63
In DHG, those Laplacian matrices and message passing functions are attached to the graph/hypergraph structure. As soon as you build a structure with DHG, those functions will be ready to be used in the process of building your model.
@@ -84,7 +82,7 @@ pip install dhg
84
82
85
83
### Learning on Low-Order Structures
86
84
87
-
On simple graph structures, you can smooth a given vertex features with GCN's Laplacian matrix by:
85
+
On graph structures, you can smooth a given vertex features with GCN's Laplacian matrix by:
88
86
89
87
```python
90
88
import torch
@@ -94,7 +92,7 @@ X = torch.rand(5, 2)
94
92
X_ = g.smoothing_with_GCN(X)
95
93
```
96
94
97
-
On simple graph structures, you can pass messages from vertex to vertex with `mean` aggregation by:
95
+
On graph structures, you can pass messages from vertex to vertex with `mean` aggregation by:
On simple hypergraph structures, you can smooth a given vertex features with HGNN's Laplacian matrix by:
139
+
On hypergraph structures, you can smooth a given vertex features with HGNN's Laplacian matrix by:
142
140
143
141
```python
144
142
import torch
@@ -148,7 +146,7 @@ X = torch.rand(5, 2)
148
146
X_ = hg.smoothing_with_HGNN(X)
149
147
```
150
148
151
-
On simple hypergraph structures, you can pass messages from vertex to hyperedge with `mean` aggregation by:
149
+
On hypergraph structures, you can pass messages from vertex to hyperedge with `mean` aggregation by:
152
150
153
151
```python
154
152
import torch
@@ -362,7 +360,7 @@ If you find **DHG** is useful in your research, please consider citing:
362
360
363
361
## The DHG Team
364
362
365
-
DHG is developed by DHG's core team including [Yifan Feng](http://fengyifan.site/), [Xinwei Zhang](https://github.com/zhangxwww), and [Yue Gao (Adivsor)](http://moon-lab.tech/). It is maintained by the [iMoon-Lab](http://moon-lab.tech/), Tsinghua University. You can contact us at [email](mailto:evanfeng97@gmail.com).
363
+
DHG is developed by DHG's core team including [Yifan Feng](http://fengyifan.site/), [Xinwei Zhang](https://github.com/zhangxwww), [Jielong Yan](https://github.com/JasonYanjl), [Shuyi Ji](), [Yue Gao](http://moon-lab.tech/), and [Qionghai Dai](https://ysg.ckcest.cn/html/details/8058/index.html). It is maintained by the [iMoon-Lab](http://moon-lab.tech/), Tsinghua University. You can contact us at [email](mailto:evanfeng97@gmail.com).
r"""Return a name list for available variables for deep learning in the vertex classification on graphs. The name list includes ``features``, ``structure``, ``labels``, ``train_mask``, ``val_mask``, and ``test_mask``.
58
+
r"""Return a name list for available variables for deep learning in the vertex classification on graph. The name list includes ``features``, ``structure``, ``labels``, ``train_mask``, ``val_mask``, and ``test_mask``.
r"""Return a name list for available variables for deep learning in the vertex classification on hypergraphs. The name list includes ``features``, ``structure``, ``labels``, ``train_mask``, ``val_mask``, and ``test_mask``.
61
+
r"""Return a name list for available variables for deep learning in the vertex classification on hypergraph. The name list includes ``features``, ``structure``, ``labels``, ``train_mask``, ``val_mask``, and ``test_mask``.
r"""Return a name list for available deep learning variables for the recommender task on user-item bipartite graphs. The name list includes ``structure``.
66
+
r"""Return a name list for available deep learning variables for the recommender task on user-item bipartite graph. The name list includes ``structure``.
Copy file name to clipboardExpand all lines: dhg/metrics/recommender.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ def ndcg(
166
166
167
167
168
168
classUserItemRecommenderEvaluator(BaseEvaluator):
169
-
r"""Return the metric evaluator for recommender task on user-item bipartite graphs. The supported metrics includes: ``precision``, ``recall``, ``ndcg``.
169
+
r"""Return the metric evaluator for recommender task on user-item bipartite graph. The supported metrics includes: ``precision``, ``recall``, ``ndcg``.
170
170
171
171
Args:
172
172
``metric_configs`` (``List[Union[str, Dict[str, dict]]]``): The metric configurations. The key is the metric name and the value is the metric parameters.
r"""Construct a graph from the adjacency list. Each line in the adjacency list has two components. The first element in each line is the source vertex index, and the rest elements are the target vertex indices that connected to the source vertex.
155
155
156
156
.. note::
157
-
This function can only construct unweighted graphs.
157
+
This function can only construct unweighted graph.
``device`` (``torch.device``): The device to store the simple graph.
154
+
``device`` (``torch.device``): The device to store the graph.
155
155
"""
156
156
returnsuper().to(device)
157
157
@@ -167,7 +167,7 @@ def from_adj_list(
167
167
r"""Construct a graph from the adjacency list. Each line in the adjacency list has two components. The first element in each line is the source vertex index, and the rest elements are the target vertex indices that connected to the source vertex.
168
168
169
169
.. note::
170
-
This function can only construct the unweighted simple graph.
170
+
This function can only construct the unweighted graph.
171
171
172
172
Args:
173
173
``num_v`` (``int``): The number of vertices.
@@ -344,7 +344,7 @@ def v(self) -> List[int]:
344
344
345
345
@property
346
346
defe(self) ->Tuple[List[List[int]], List[float]]:
347
-
r"""Return the edge list and weight list in the simple graph.
347
+
r"""Return the edge list and weight list in the graph.
0 commit comments