r"""Pubmed citation network dataset. Nodes mean scientific publications and edges mean citation relationships. Each node has a predefined feature with 500 dimensions. The dataset is designed for the node classification task. The task is to predict the category of certain pub
| 571 | |
| 572 | |
| 573 | class PubmedGraphDataset(CitationGraphDataset): |
| 574 | r"""Pubmed citation network dataset. |
| 575 | |
| 576 | Nodes mean scientific publications and edges |
| 577 | mean citation relationships. Each node has a |
| 578 | predefined feature with 500 dimensions. The |
| 579 | dataset is designed for the node classification |
| 580 | task. The task is to predict the category of |
| 581 | certain publication. |
| 582 | |
| 583 | Statistics: |
| 584 | |
| 585 | - Nodes: 19717 |
| 586 | - Edges: 88651 |
| 587 | - Number of Classes: 3 |
| 588 | - Label Split: |
| 589 | |
| 590 | - Train: 60 |
| 591 | - Valid: 500 |
| 592 | - Test: 1000 |
| 593 | |
| 594 | Parameters |
| 595 | ----------- |
| 596 | raw_dir : str |
| 597 | Raw file directory to download/contains the input data directory. |
| 598 | Default: ~/.dgl/ |
| 599 | force_reload : bool |
| 600 | Whether to reload the dataset. Default: False |
| 601 | verbose : bool |
| 602 | Whether to print out progress information. Default: True. |
| 603 | reverse_edge : bool |
| 604 | Whether to add reverse edges in graph. Default: True. |
| 605 | transform : callable, optional |
| 606 | A transform that takes in a :class:`~dgl.DGLGraph` object and returns |
| 607 | a transformed version. The :class:`~dgl.DGLGraph` object will be |
| 608 | transformed before every access. |
| 609 | reorder : bool |
| 610 | Whether to reorder the graph using :func:`~dgl.reorder_graph`. Default: False. |
| 611 | |
| 612 | Attributes |
| 613 | ---------- |
| 614 | num_classes: int |
| 615 | Number of label classes |
| 616 | |
| 617 | Notes |
| 618 | ----- |
| 619 | The node feature is row-normalized. |
| 620 | |
| 621 | Examples |
| 622 | -------- |
| 623 | >>> dataset = PubmedGraphDataset() |
| 624 | >>> g = dataset[0] |
| 625 | >>> num_class = dataset.num_of_class |
| 626 | >>> |
| 627 | >>> # get node feature |
| 628 | >>> feat = g.ndata['feat'] |
| 629 | >>> |
| 630 | >>> # get data split |
no outgoing calls
no test coverage detected