Unverified Commit 6f26cfca authored by Xiangkun Hu's avatar Xiangkun Hu Committed by GitHub
Browse files

[Doc] Fix links and references in dataset user guide (#2085)

* PPIDataset

* Revert "PPIDataset"

This reverts commit 264bd0c960cfa698a7bb946dad132bf52c2d0c8a.

* data pipeline user guide

* remove chapter numbers

* Update data.rst

* image in dataset userguide

* update links using ref

* modify the link of save_graphs and load_graphs in dataset user guide

* move image to s3 server.

* fix links and ref
parent cd204a4a
...@@ -18,13 +18,14 @@ Base Dataset Class ...@@ -18,13 +18,14 @@ Base Dataset Class
.. autoclass:: DGLDataset .. autoclass:: DGLDataset
:members: download, save, load, process, has_cache, __getitem__, __len__ :members: download, save, load, process, has_cache, __getitem__, __len__
.. _sstdata:
Node Prediction Datasets Node Prediction Datasets
--------------------------------------- ---------------------------------------
DGL hosted datasets for node classification/regression tasks. DGL hosted datasets for node classification/regression tasks.
.. _sstdata:
Stanford sentiment treebank dataset Stanford sentiment treebank dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: SSTDataset .. autoclass:: SSTDataset
...@@ -32,12 +33,14 @@ Stanford sentiment treebank dataset ...@@ -32,12 +33,14 @@ Stanford sentiment treebank dataset
.. _karateclubdata: .. _karateclubdata:
Karate club dataset Karate club dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: KarateClubDataset .. autoclass:: KarateClubDataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _citationdata: .. _citationdata:
Citation network dataset Citation network dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: CoraGraphDataset .. autoclass:: CoraGraphDataset
...@@ -50,12 +53,14 @@ Citation network dataset ...@@ -50,12 +53,14 @@ Citation network dataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _corafulldata: .. _corafulldata:
CoraFull dataset CoraFull dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: CoraFullDataset .. autoclass:: CoraFullDataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _rdfdata: .. _rdfdata:
RDF datasets RDF datasets
``````````````````````````````````` ```````````````````````````````````
...@@ -72,6 +77,7 @@ RDF datasets ...@@ -72,6 +77,7 @@ RDF datasets
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _amazoncobuydata: .. _amazoncobuydata:
Amazon Co-Purchase dataset Amazon Co-Purchase dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: AmazonCoBuyComputerDataset .. autoclass:: AmazonCoBuyComputerDataset
...@@ -81,6 +87,7 @@ Amazon Co-Purchase dataset ...@@ -81,6 +87,7 @@ Amazon Co-Purchase dataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _coauthordata: .. _coauthordata:
Coauthor dataset Coauthor dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: CoauthorCSDataset .. autoclass:: CoauthorCSDataset
...@@ -90,18 +97,21 @@ Coauthor dataset ...@@ -90,18 +97,21 @@ Coauthor dataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _ppidata: .. _ppidata:
Protein-Protein Interaction dataset Protein-Protein Interaction dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: PPIDataset .. autoclass:: PPIDataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _redditdata: .. _redditdata:
Reddit dataset Reddit dataset
`````````````` ``````````````
.. autoclass:: RedditDataset .. autoclass:: RedditDataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _sbmdata: .. _sbmdata:
Symmetric Stochastic Block Model Mixture dataset Symmetric Stochastic Block Model Mixture dataset
```````````````````````````````````````````````` ````````````````````````````````````````````````
.. autoclass:: SBMMixtureDataset .. autoclass:: SBMMixtureDataset
...@@ -114,6 +124,7 @@ Edge Prediction Datasets ...@@ -114,6 +124,7 @@ Edge Prediction Datasets
DGL hosted datasets for edge classification/regression and link prediction tasks. DGL hosted datasets for edge classification/regression and link prediction tasks.
.. _kgdata: .. _kgdata:
Knowlege graph dataset Knowlege graph dataset
``````````````````````````````````` ```````````````````````````````````
...@@ -127,6 +138,7 @@ Knowlege graph dataset ...@@ -127,6 +138,7 @@ Knowlege graph dataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _bitcoinotcdata: .. _bitcoinotcdata:
BitcoinOTC dataset BitcoinOTC dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: BitcoinOTCDataset .. autoclass:: BitcoinOTCDataset
...@@ -150,6 +162,7 @@ DGL hosted datasets for graph classification/regression tasks. ...@@ -150,6 +162,7 @@ DGL hosted datasets for graph classification/regression tasks.
.. _qm7bdata: .. _qm7bdata:
QM7b dataset QM7b dataset
``````````````````````````````````` ```````````````````````````````````
.. autoclass:: QM7bDataset .. autoclass:: QM7bDataset
...@@ -157,12 +170,14 @@ QM7b dataset ...@@ -157,12 +170,14 @@ QM7b dataset
.. _minigcdataset: .. _minigcdataset:
Mini graph classification dataset Mini graph classification dataset
````````````````````````````````` `````````````````````````````````
.. autoclass:: MiniGCDataset .. autoclass:: MiniGCDataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _tudata: .. _tudata:
TU dataset TU dataset
`````````` ``````````
.. autoclass:: TUDataset .. autoclass:: TUDataset
...@@ -172,6 +187,7 @@ TU dataset ...@@ -172,6 +187,7 @@ TU dataset
:members: __getitem__, __len__ :members: __getitem__, __len__
.. _gindataset: .. _gindataset:
Graph isomorphism network dataset Graph isomorphism network dataset
``````````````````````````````````` ```````````````````````````````````
A compact subset of graph kernel dataset A compact subset of graph kernel dataset
......
...@@ -180,7 +180,7 @@ how to process datasets related to these tasks. ...@@ -180,7 +180,7 @@ how to process datasets related to these tasks.
Here we focus on the standard way to process graphs, features and masks. Here we focus on the standard way to process graphs, features and masks.
We will use builtin datasets as examples and skip the implementations We will use builtin datasets as examples and skip the implementations
for building graphs from files, but add links to the detailed for building graphs from files, but add links to the detailed
implementations. Please refer to `Creating graphs from external sources <https://>`__ to see a implementations. Please refer to :ref:`guide-graph-external` to see a
complete guide on how to build graphs from external sources. complete guide on how to build graphs from external sources.
Processing Graph Classification datasets Processing Graph Classification datasets
...@@ -237,7 +237,7 @@ In ``process()``, the raw data is processed to a list of graphs and a ...@@ -237,7 +237,7 @@ In ``process()``, the raw data is processed to a list of graphs and a
list of labels. We must implement ``__getitem__(idx)`` and ``__len__()`` list of labels. We must implement ``__getitem__(idx)`` and ``__len__()``
for iteration. We recommend to make ``__getitem__(idx)`` to return a for iteration. We recommend to make ``__getitem__(idx)`` to return a
tuple ``(graph, label)`` as above. Please check the `QM7bDataset source tuple ``(graph, label)`` as above. Please check the `QM7bDataset source
code <https://docs.dgl.ai/en/latest/_modules/dgl/data/qm7b.html#QM7bDataset>`__ code <https://docs.dgl.ai/en/0.5.x/_modules/dgl/data/qm7b.html#QM7bDataset>`__
for details of ``self._load_graph()`` and ``__getitem__``. for details of ``self._load_graph()`` and ``__getitem__``.
We can also add properties to the class to indicate some useful We can also add properties to the class to indicate some useful
...@@ -280,7 +280,7 @@ follows: ...@@ -280,7 +280,7 @@ follows:
pass pass
A complete guide for training graph classification models can be found A complete guide for training graph classification models can be found
in `Training Graph Classification models <https://>`__. in :ref:`guide-training-graph-classification`.
For more examples of graph classification datasets, please refer to our builtin graph classification For more examples of graph classification datasets, please refer to our builtin graph classification
datasets: datasets:
...@@ -299,7 +299,7 @@ Processing Node Classification datasets ...@@ -299,7 +299,7 @@ Processing Node Classification datasets
Different from graph classification, node classification is typically on Different from graph classification, node classification is typically on
a single graph. As such, splits of the dataset are on the nodes of the a single graph. As such, splits of the dataset are on the nodes of the
graph. We recommend using node masks to specify the splits. We use graph. We recommend using node masks to specify the splits. We use
builtin dataset `CitationGraphDataset <https://docs.dgl.ai/en/latest/api/python/dgl.data.html#citation-network-dataset>`__ as an example: builtin dataset `CitationGraphDataset <https://docs.dgl.ai/en/0.5.x/_modules/dgl/data/citation_graph.html#CitationGraphDataset>`__ as an example:
.. code:: .. code::
...@@ -354,7 +354,7 @@ For brevity, we skip some code in ``process()`` to highlight the key ...@@ -354,7 +354,7 @@ For brevity, we skip some code in ``process()`` to highlight the key
part for processing node classification dataset: spliting masks, node part for processing node classification dataset: spliting masks, node
features and node labels are stored in ``g.ndata``. For detailed features and node labels are stored in ``g.ndata``. For detailed
implementation, please refer to `CitationGraphDataset source implementation, please refer to `CitationGraphDataset source
code <https://docs.dgl.ai/en/latest/_modules/dgl/data/citation_graph.html#CitationGraphDataset>`__. code <https://docs.dgl.ai/en/0.5.x/_modules/dgl/data/citation_graph.html#CitationGraphDataset>`__.
Notice that the implementations of ``__getitem__(idx)`` and Notice that the implementations of ``__getitem__(idx)`` and
``__len__()`` are changed as well, since there is often only one graph ``__len__()`` are changed as well, since there is often only one graph
...@@ -382,7 +382,7 @@ to show the usage of it: ...@@ -382,7 +382,7 @@ to show the usage of it:
labels = graph.ndata['label'] labels = graph.ndata['label']
A complete guide for training node classification models can be found in A complete guide for training node classification models can be found in
`Training Node Classification/Regression models <https://>`__. :ref:`guide-training-node-classification`.
For more examples of node classification datasets, please refer to our For more examples of node classification datasets, please refer to our
builtin datasets: builtin datasets:
...@@ -414,7 +414,7 @@ The processing of link prediction datasets is similar to that for node ...@@ -414,7 +414,7 @@ The processing of link prediction datasets is similar to that for node
classification’s, there is often one graph in the dataset. classification’s, there is often one graph in the dataset.
We use builtin dataset We use builtin dataset
`KnowledgeGraphDataset <https://docs.dgl.ai/en/latest/api/python/dgl.data.html#knowlege-graph-dataset>`__ `KnowledgeGraphDataset <https://docs.dgl.ai/en/0.5.x/_modules/dgl/data/knowledge_graph.html#KnowledgeGraphDataset>`__
as example, and still skip the detailed data processing code to as example, and still skip the detailed data processing code to
highlight the key part for processing link prediction datasets: highlight the key part for processing link prediction datasets:
...@@ -455,7 +455,7 @@ highlight the key part for processing link prediction datasets: ...@@ -455,7 +455,7 @@ highlight the key part for processing link prediction datasets:
As shown in the code, we add splitting masks into ``edata`` field of the As shown in the code, we add splitting masks into ``edata`` field of the
graph. Check `KnowledgeGraphDataset source graph. Check `KnowledgeGraphDataset source
code <https://docs.dgl.ai/en/latest/_modules/dgl/data/knowledge_graph.html#KnowledgeGraphDataset>`__ code <https://docs.dgl.ai/en/0.5.x/_modules/dgl/data/knowledge_graph.html#KnowledgeGraphDataset>`__
to see the complete code. We use a subclass of ``KnowledgeGraphDataset``, :class:`dgl.data.FB15k237Dataset`, to see the complete code. We use a subclass of ``KnowledgeGraphDataset``, :class:`dgl.data.FB15k237Dataset`,
to show the usage of it: to show the usage of it:
...@@ -476,7 +476,7 @@ to show the usage of it: ...@@ -476,7 +476,7 @@ to show the usage of it:
A complete guide for training link prediction models can be found in A complete guide for training link prediction models can be found in
`Training Link Prediction models <https://>`__. :ref:`guide-training-link-prediction`.
For more examples of link prediction datasets, please refer to our For more examples of link prediction datasets, please refer to our
builtin datasets: builtin datasets:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment