Skip to content

Commit eada8c0

Browse files
committed
update doc
1 parent 7b172f4 commit eada8c0

File tree

9 files changed

+92
-19
lines changed

9 files changed

+92
-19
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,22 @@ The Optuna library endows DHG with the Auto-ML ability. DHG supports automatical
7070

7171
## Installation
7272

73-
DHG is available for **Python 3.8** and **Pytorch 1.11.0** and above.
7473

75-
### Install with pip
74+
Current, the stable version of **DHG** is 0.9.1. You can install it with ``pip`` as follows:
7675

77-
```bash
76+
```python
7877
pip install dhg
7978
```
8079

80+
You can also try the nightly version (0.9.2) of **DHG** library with ``pip`` as follows:
81+
82+
```python
83+
pip install git+https://github.com/iMoonLab/DeepHypergraph.git
84+
```
85+
86+
Nightly version is the development version of **DHG**. It may include the lastest SOTA methods and datasets, but it can also be unstable and not fully tested.
87+
If you find any bugs, please report it to us in [GitHub Issues](https://github.com/iMoonLab/DeepHypergraph/issues).
88+
8189
## Quick Start
8290

8391
### Learning on Low-Order Structures

dhg/models/hypergraphs/hypergcn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
class HyperGCN(nn.Module):
1010
r"""The HyperGCN model proposed in `HyperGCN: A New Method of Training Graph Convolutional Networks on Hypergraphs <https://papers.nips.cc/paper/2019/file/1efa39bcaec6f3900149160693694536-Paper.pdf>`_ paper (NeurIPS 2019).
11+
1112
Args:
1213
``in_channels`` (``int``): :math:`C_{in}` is the number of input channels.
1314
``hid_channels`` (``int``): :math:`C_{hid}` is the number of hidden channels.
-16.1 KB
Loading
125 KB
Loading
-15.7 KB
Loading
122 KB
Loading

docs/source/start/install.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ Installation
99
- Python >= 3.8
1010
- Pytorch >=1.11
1111

12-
13-
You can install **DHG** library with ``pip`` as follows:
12+
Current, the stable version of **DHG** is 0.9.1. You can install it with ``pip`` as follows:
1413

1514
.. code-block:: bash
1615
1716
pip install dhg
17+
18+
You can also try the nightly version (0.9.2) of **DHG** library with ``pip`` as follows:
19+
20+
.. code-block:: bash
21+
22+
pip install git+https://github.com/iMoonLab/DeepHypergraph.git
23+
24+
.. note::
25+
26+
Nightly version is the development version of **DHG**. It may include the lastest SOTA methods and datasets, but it can also be unstable and not fully tested.
27+
If you find any bugs, please report it to us in `GitHub Issues <https://github.com/iMoonLab/DeepHypergraph/issues>`_.

docs/source/tutorial/vis_feature.rst

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Basic Usages
1010
---------------
1111
DHG provides an interface to visualize the distribution of feaures:
1212

13-
1. Load data of features and lable by specifying the corresponding path;
14-
2. Specify parameters (*i.e.*, `the dimensionality of the visualisation`, `the storage path` and `the method of dimensionality reduction`);
15-
3. Call our funtion to show or save the figure .
13+
1. Input the features and lable (optional);
14+
2. Specify parameters (*i.e.*, `the dimensionality of the visualisation`, `point size`, `color` and `the method of dimensionality reduction`);
15+
3. Call ``plt.show()`` funtion to show the figure/animation.
1616

17+
18+
.. note:: The ``plt`` is short for ``matplotlib.pyplot`` module.
1719

1820

1921
Visualization of Features in Euclidean Space
@@ -27,6 +29,16 @@ Visualization of Features in Euclidean Space
2729

2830
.. code-block:: python
2931
32+
>>> import dhg
33+
>>> import numpy as np
34+
>>> import matplotlib.pyplot as plt
35+
>>> import dhg.visualization as vis
36+
>>> lbl = (np.random.rand(200)*10).astype(int)
37+
>>> ft = dhg.random.normal_features(lbl)
38+
>>> vis.draw_in_euclidean_space(ft, lbl)
39+
>>> plt.show()
40+
41+
..
3042
>>> import numpy as np
3143
>>> from dhg.visualization.feature import draw_in_euclidean_space
3244
>>> ile_dir = "data/modelnet40/test_img_feat_4.npy"
@@ -51,6 +63,16 @@ Visualization of Features in Poincare Space
5163

5264
.. code-block:: python
5365
66+
>>> import dhg
67+
>>> import numpy as np
68+
>>> import matplotlib.pyplot as plt
69+
>>> import dhg.visualization as vis
70+
>>> lbl = (np.random.rand(200)*10).astype(int)
71+
>>> ft = dhg.random.normal_features(lbl)
72+
>>> vis.draw_in_poincare_space(ft, lbl)
73+
>>> plt.show()
74+
75+
..
5476
>>> import numpy as np
5577
>>> from dhg.visualization.feature import draw_in_poincare_space
5678
>>> file_dir = "data/modelnet40/test_img_feat_4.npy" #This varies depending on the situation
@@ -68,20 +90,29 @@ Visualization of Features in Poincare Space
6890
Make Animation
6991
-------------------------
7092

71-
Furthermore, we also offer interfaces for the visual presentation of
72-
rotation on three-dimensional visualisations with the option of `Rotation` in Euclidean and Poincare Space.
93+
We provide functions to make 3D rotation animation for feature visualization.
7394

7495
Rotating Visualization of Features in Euclidean Space
7596
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7697

77-
.. .. image:: ../_static/img/vis_ft_euclidean.png
78-
.. :align: center
79-
.. :alt: Rotating Visualization of Features in Euclidean Space
80-
.. :height: 400px
98+
.. image:: ../_static/img/vis_ft_euclidean_ani.png
99+
:align: center
100+
:alt: Rotating Visualization of Features in Euclidean Space
101+
:height: 400px
81102

82103

83104
.. code-block:: python
84105
106+
>>> import dhg
107+
>>> import numpy as np
108+
>>> import matplotlib.pyplot as plt
109+
>>> import dhg.visualization as vis
110+
>>> lbl = (np.random.rand(200)*10).astype(int)
111+
>>> ft = dhg.random.normal_features(lbl)
112+
>>> vis.animation_of_3d_euclidean_space(ft, lbl)
113+
>>> plt.show()
114+
115+
..
85116
>>> import numpy as np
86117
>>> from dhg.visualization.feature import animation_of_3d_euclidean_ball
87118
>>> ile_dir = "data/modelnet40/test_img_feat_4.npy"
@@ -98,14 +129,24 @@ Rotating Visualization of Features in Euclidean Space
98129
Rotating Visualization of Features in Poincare Space
99130
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100131

101-
.. .. image:: ../_static/img/vis_ft_euclidean.png
102-
.. :align: center
103-
.. :alt: Rotating Visualization of Features in Poincare Space
104-
.. :height: 400px
132+
.. image:: ../_static/img/vis_ft_poincare_ani.png
133+
:align: center
134+
:alt: Rotating Visualization of Features in Poincare Space
135+
:height: 400px
105136

106137

107138
.. code-block:: python
108139
140+
>>> import dhg
141+
>>> import numpy as np
142+
>>> import matplotlib.pyplot as plt
143+
>>> import dhg.visualization as vis
144+
>>> lbl = (np.random.rand(200)*10).astype(int)
145+
>>> ft = dhg.random.normal_features(lbl)
146+
>>> vis.animation_of_3d_poincare_ball(ft, lbl)
147+
>>> plt.show()
148+
149+
..
109150
>>> import numpy as np
110151
>>> from dhg.visualization.feature import animation_of_3d_poincare_ball
111152
>>> file_dir = "data/modelnet40/test_img_feat_4.npy" #This varies depending on the situation

docs/source/zh/start/install.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,21 @@
1010
- Python >= 3.8
1111
- Pytorch >=1.11
1212

13-
您可以使用 ``pip`` 指令直接安装 **DHG** 包:
13+
14+
目前, **DHG** 的最新稳定版本 **0.9.1** 已经发布,可以使用 ``pip`` 指令直接安装:
1415

1516
.. code-block:: bash
1617
1718
pip install dhg
19+
20+
如果您想尝试最新的日构建版本(nightly version) **0.9.2** ,可以使用以下指令安装:
21+
22+
.. code-block:: bash
23+
24+
pip install git+https://github.com/iMoonLab/DeepHypergraph.git
25+
26+
.. note::
27+
28+
Nightly version 通常会比稳定版本更新,因为它包含了最新的功能和SOTA方法、数据集。但是,nightly version 也可能会有一些bug,因此不建议在生产环境中使用。
29+
如果您发现了bug,请在 `GitHub <https://github.com/iMoonLab/DeepHypergraph/issues>`_ 上提交issue。
30+

0 commit comments

Comments
 (0)