Skip to content

Commit

Permalink
fix dominant num_layers
Browse files Browse the repository at this point in the history
  • Loading branch information
kayzliu committed Oct 17, 2022
1 parent a87e918 commit 90c85ae
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
18 changes: 12 additions & 6 deletions README.rst
Expand Up @@ -77,19 +77,25 @@ See examples below for detecting outliers with PyGOD in 5 lines!
**Citing PyGOD**\ :

Our `PyGOD benchmark paper <https://arxiv.org/abs/2206.10071>`_ is available on arxiv.
If you use PyGOD in a scientific publication, we would appreciate
citations to the following paper::

@article{liu2022benchmarking,
Our `software paper <https://arxiv.org/abs/2204.12095>`_ and `benchmark paper <https://arxiv.org/abs/2206.10071>`_ are available on arxiv.
If you use PyGOD in a scientific publication, we would appreciate citations to the following papers::

@article{liu2022pygod,
title={PyGOD: A Python Library for Graph Outlier Detection},
author={Liu, Kay and Dou, Yingtong and Zhao, Yue and Ding, Xueying and Hu, Xiyang and Zhang, Ruitong and Ding, Kaize and Chen, Canyu and Peng, Hao and Shu, Kai and Chen, George H. and Jia, Zhihao and Yu, Philip S.},
journal={arXiv preprint arXiv:2204.12095},
year={2022}
}
@article{liu2022bond,
author = {Liu, Kay and Dou, Yingtong and Zhao, Yue and Ding, Xueying and Hu, Xiyang and Zhang, Ruitong and Ding, Kaize and Chen, Canyu and Peng, Hao and Shu, Kai and Sun, Lichao and Li, Jundong and Chen, George H. and Jia, Zhihao and Yu, Philip S.},
title = {Benchmarking Node Outlier Detection on Graphs},
title = {BOND: Benchmarking Unsupervised Outlier Node Detection on Static Attributed Graphs},
journal = {arXiv preprint arXiv:2206.10071},
year = {2022},
}

or::

Liu, K., Dou, Y., Zhao, Y., Ding, X., Hu, X., Zhang, R., Ding, K., Chen, C., Peng, H., Shu, K. and Chen, G.H., Jia, Z., and Yu, P.S. 2022. PyGOD: A Python Library for Graph Outlier Detection. arXiv preprint arXiv:2204.12095.
Liu, K., Dou, Y., Zhao, Y., Ding, X., Hu, X., Zhang, R., Ding, K., Chen, C., Peng, H., Shu, K., Sun, L., Li, J., Chen, G.H., Jia, Z., and Yu, P.S. 2022. Benchmarking Node Outlier Detection on Graphs. arXiv preprint arXiv:2206.10071.


Expand Down
18 changes: 12 additions & 6 deletions docs/index.rst
Expand Up @@ -86,19 +86,25 @@ See examples below for detecting anomalies with PyGOD in 5 lines!
**Citing PyGOD**\ :

Our `PyGOD benchmark paper <https://arxiv.org/abs/2206.10071>`_ is available on arxiv :cite:`liu2022benchmarking`.
If you use PyGOD in a scientific publication, we would appreciate
citations to the following paper::

@article{liu2022benchmarking,
Our `software paper <https://arxiv.org/abs/2204.12095>`_ and `benchmark paper <https://arxiv.org/abs/2206.10071>`_ are available on arxiv.
If you use PyGOD in a scientific publication, we would appreciate citations to the following papers::

@article{liu2022pygod,
title={PyGOD: A Python Library for Graph Outlier Detection},
author={Liu, Kay and Dou, Yingtong and Zhao, Yue and Ding, Xueying and Hu, Xiyang and Zhang, Ruitong and Ding, Kaize and Chen, Canyu and Peng, Hao and Shu, Kai and Chen, George H. and Jia, Zhihao and Yu, Philip S.},
journal={arXiv preprint arXiv:2204.12095},
year={2022}
}
@article{liu2022bond,
author = {Liu, Kay and Dou, Yingtong and Zhao, Yue and Ding, Xueying and Hu, Xiyang and Zhang, Ruitong and Ding, Kaize and Chen, Canyu and Peng, Hao and Shu, Kai and Sun, Lichao and Li, Jundong and Chen, George H. and Jia, Zhihao and Yu, Philip S.},
title = {Benchmarking Node Outlier Detection on Graphs},
title = {BOND: Benchmarking Unsupervised Outlier Node Detection on Static Attributed Graphs},
journal = {arXiv preprint arXiv:2206.10071},
year = {2022},
}

or::

Liu, K., Dou, Y., Zhao, Y., Ding, X., Hu, X., Zhang, R., Ding, K., Chen, C., Peng, H., Shu, K. and Chen, G.H., Jia, Z., and Yu, P.S. 2022. PyGOD: A Python Library for Graph Outlier Detection. arXiv preprint arXiv:2204.12095.
Liu, K., Dou, Y., Zhao, Y., Ding, X., Hu, X., Zhang, R., Ding, K., Chen, C., Peng, H., Shu, K., Sun, L., Li, J., Chen, G.H., Jia, Z., and Yu, P.S. 2022. Benchmarking Node Outlier Detection on Graphs. arXiv preprint arXiv:2206.10071.


Expand Down
8 changes: 4 additions & 4 deletions pygod/models/dominant.py
Expand Up @@ -33,8 +33,8 @@ class DOMINANT(BaseDetector):
hid_dim : int, optional
Hidden dimension of model. Default: ``0``.
num_layers : int, optional
Total number of layers in model. A half (ceil) of the layers
are for the encoder, the other half (floor) of the layers are
Total number of layers in model. A half (floor) of the layers
are for the encoder, the other half (ceil) of the layers are
for decoders. Default: ``4``.
dropout : float, optional
Dropout rate. Default: ``0.``.
Expand Down Expand Up @@ -275,8 +275,8 @@ def __init__(self,
super(DOMINANT_Base, self).__init__()

# split the number of layers for the encoder and decoders
decoder_layers = int(num_layers / 2)
encoder_layers = num_layers - decoder_layers
encoder_layers = int(num_layers / 2)
decoder_layers = num_layers - encoder_layers

self.shared_encoder = GCN(in_channels=in_dim,
hidden_channels=hid_dim,
Expand Down

0 comments on commit 90c85ae

Please sign in to comment.