Newer
Older
OrGAN implements a procedure of training a generative adversarial neural network model for generation of organization structures with complex relation topology. It takes into account tacit expert knowledge based on the training dataset and parametric dependencies based on both the training dataset and programmed functional dependencies.
For demonstration purposes, a fictitious but illustrative demo is included.
## Dependencies
* **python>=3.5**
* **pytorch>=0.4.1**: https://pytorch.org
* **numpy**
For more detailed list of requirements, see `requirements.txt`.
* `data`: should contain organization structure dataset. You can use `generate_dataset` script to generate the demo dataset.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
## Documentation
To generate documentation you'll need to have Sphinx installed in your machine. After that:
```
cd docs
make html
```
The HTML version of the documentation will appear in the `docs/_build` folder.
## Testing
The tests are written using PyTest framework. There are two types of tests: unit tests, covering individual
functions and classes and integration tests, covering larger blocks (cooperations of classes, delivering some
complex functionality). These types of tests are distinguished using "marks" mechanism provided by PyTest. To
run all thetests you can execute:
```
$ pytest
```
from the project root. As integration tests might take some time to complete, sometimes it might be convenient
to run only integration or only unit tests. To run only integration tests:
```
$ pytest -m integration
```
Finally, to run only unit tests:
```
$ pytest -m "not integration"
```
In some cases `pytest` script location is not in the `PATH`, so you
may have to run it via the full path, e.g.:
```
/home/tnn/.local/bin/pytest
```
(for exact path refer to your PyTest installation).
To evaluate test coverage:
```
coverage run -m pytest
coverage report organ/*.py organ/*/*.py
```
### Acknowledgement
OrGAN is based on some ideas from the MolGAN: An implicit generative model for small molecular graphs (https://arxiv.org/abs/1805.11973). However, unlike MolGAN, it is aimed for a different purpose, deals with parametric constituent and supports generation of parametrized organization structures taking into account input parameters.
* [yongqyu/MolGAN-pytorch](https://github.com/yongqyu/MolGAN-pytorch)
* [nicola-decao/MolGAN](https://github.com/nicola-decao/MolGAN)