Skip to content

Commit

Permalink
ready for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kayzliu committed Jul 19, 2023
1 parent ff43bb5 commit 5b49e61
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
17 changes: 7 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ Installation
^^^^^^^^^^^^

**Note on PyG and PyTorch Installation**\ :
PyGOD depends on `PyTorch <https://https://pytorch.org/get-started/locally/>`_ and `PyTorch Geometric (PyG, including its optional dependencies) <https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html#>`_.
PyGOD depends on `torch <https://https://pytorch.org/get-started/locally/>`_ and `torch_geometric (including its optional dependencies) <https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html#>`_.
To streamline the installation, PyGOD does **NOT** install these libraries for you.
Please install them from the above links for running PyGOD:

* torch>=2.0.0
* pytorch_geometric>=2.3.0
* torch_geometric>=2.3.0

It is recommended to use **pip** for installation.
Please make sure **the latest version** is installed, as PyGOD is updated frequently:
Expand All @@ -130,7 +130,7 @@ Alternatively, you could clone and run setup.py file:
**Required Dependencies**\ :

* Python 3.8+
* python>=3.8
* numpy>=1.24.3
* scikit-learn>=1.2.2
* scipy>=1.10.1
Expand All @@ -145,19 +145,16 @@ API Cheatsheet & Reference

Full API Reference: (https://docs.pygod.org). API cheatsheet for all detectors:

* **fit(data)**\ : Fit detector.
* **decision_function(data)**\ : Predict raw anomaly score of PyG data using the fitted detector.
* **fit(data)**\ : Fit the detector with train data.
* **predict(data)**\ : Predict on test data (train data if not provided) using the fitted detector.

Key Attributes of a fitted detector:

* **decision_score_**\ : The outlier scores of the input data. Outliers tend to have higher scores.
* **label_**\ : The binary labels of the input data. 0 stands for inliers and 1 for outliers.
* **threshold_**\ : The determined threshold for binary classification. Scores above the threshold are outliers.

For the inductive setting:

* **predict(data)**\ : Predict if nodes in PyG data G is an outlier or not using the fitted detector.

**Input of PyGOD**: Please pass in a `PyTorch Geometric (PyG) <https://www.pyg.org/>`_ data object.
**Input of PyGOD**: Please pass in a `PyG Data object <https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.data.Data.html#torch_geometric.data.Data>`_.
See `PyG data processing examples <https://pytorch-geometric.readthedocs.io/en/latest/notes/introduction.html#data-handling-of-graphs>`_.


Expand Down
11 changes: 4 additions & 7 deletions docs/api_cc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ API CheatSheet

The following APIs are applicable for all detectors for easy use.

* :func:`pygod.detector.Detector.fit`: Fit detector.
* :func:`pygod.detector.Detector.decision_function`: Predict raw anomaly scores of PyG data using the fitted detector
* :func:`pygod.detector.Detector.fit`: Fit the detector with train data.
* :func:`pygod.detector.Detector.predict`: Predict on test data (train data if not provided) using the fitted detector.

Key Attributes of a fitted detector:

* :attr:`pygod.detector.Detector.decision_score_`: The outlier scores of the input data. Outliers tend to have higher scores.
* :attr:`pygod.detector.Detector.label_`: The binary labels of the input data. 0 stands for inliers and 1 for outliers.
* :attr:`threshold_` : The determined threshold for binary classification. Scores above the threshold are outliers.

For the inductive setting:

* :func:`pygod.detector.Detector.predict`: Predict if a particular sample is an outlier or not using the fitted detector.

**Input of PyGOD**: Please pass in a `PyTorch Geometric (PyG) <https://www.pyg.org/>`_ data object.
**Input of PyGOD**: Please pass in a `PyG Data object <https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.data.Data.html#torch_geometric.data.Data>`_.
See `PyG data processing examples <https://pytorch-geometric.readthedocs.io/en/latest/notes/introduction.html#data-handling-of-graphs>`_.


Expand Down
6 changes: 3 additions & 3 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ Alternatively, you could clone and run setup.py file:
**Required Dependencies**\ :

* Python 3.8+
* python>=3.8
* numpy>=1.24.3
* scikit-learn>=1.2.2
* scipy>=1.10.1
* networkx>=3.1


**Note on PyG and PyTorch Installation**\ :
PyGOD depends on `PyTorch <https://https://pytorch.org/get-started/locally/>`_ and `PyTorch Geometric (PyG, including its optional dependencies) <https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html#>`_.
PyGOD depends on `torch <https://https://pytorch.org/get-started/locally/>`_ and `torch_geometric (including its optional dependencies) <https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html#>`_.
To streamline the installation, PyGOD does **NOT** install these libraries for you.
Please install them from the above links for running PyGOD:

* torch>=2.0.0
* pytorch_geometric>=2.3.0
* torch_geometric>=2.3.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[metadata]
description-file = README.rst
description_file = README.rst

0 comments on commit 5b49e61

Please sign in to comment.