-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
14 changed files
with
169 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Benchmark | ||
|
||
The `benchmark` directory contains benchmark scripts of models and algorithms implemented in the library. | ||
All the scripts can be launched by command line. | ||
Every script will print out an estimation of the time required to run an algorithm (expressed in milliseconds). | ||
|
||
The following table contains a description about the benchmark scripts and the external libraries used for comparison. | ||
Please install the packages in `requirements.txt` to be able to run the scripts. | ||
|
||
| Benchmark | Description | Compared Libraries | | ||
|----------------------|------------------------------------------------------------------------------|:-------------------:| | ||
| clt_queries.py | Benchmark on Binary Chow-Liu Trees (CLTs): learning, inference and sampling. | [*SPFlow*][SPFlow] | | ||
| spn_queries.py | Benchmark on Sum-Product Networks (SPNs): inference and sampling. | [*SPFlow*][SPFlow] | | ||
|
||
[SPFlow]: https://github.com/SPFlow/SPFlow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Documentation | ||
|
||
The documentation is generated automatically by Sphinx, using sources stored in the `docs` directory | ||
(with a slightly modified [*Read-the-Docs*](https://readthedocs.org/) theme). | ||
Sooner or later we will make it available also online, probably hosted using GitHub pages. | ||
|
||
If you wish to build the documentation yourself, you will need to install the dependencies listed in `requirements.txt` | ||
and execute the Makefile script as following: | ||
```bash | ||
# Clean existing documentation (optional) | ||
make clean | ||
|
||
# Build source code API documentation | ||
make sphinx_api | ||
|
||
# Build HTML documentation | ||
make sphinx_html | ||
``` | ||
The output HTML documentation can be found inside `_build/html` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../benchmark/README.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../docs/README.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../examples/README.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
```{include} ../../experiments/README.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```{include} ../../README.md | ||
:relative-images: | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## Code Examples | ||
|
||
A collection of code examples can be found in the `examples` directory. | ||
In order to run the code examples, it is necessary clone the repository. | ||
However, additional datasets are not required. | ||
Note that the given examples are not intended to produce state-of-the-art results, | ||
but only to present the library. | ||
|
||
The following table contains a description about them and a code complexity ranging from one to three stars. | ||
The *Complexity* column consists of a measure that roughly represents how many features of the library are used, as well as | ||
the expected time required to run the script. | ||
|
||
| Example | Description | Complexity | | ||
|----------------------|-----------------------------------------------------------------------------------|:----------:| | ||
| naive_model.py | Learn, evaluate and print statistics about a naive factorized model. | ⭐ | | ||
| spn_plot.py | Instantiate, prune, marginalize and plot some SPNs. | ⭐ | | ||
| clt_plot.py | Learn a Binary CLT and plot it. | ⭐ | | ||
| spn_moments.py | Instantiate and compute moments statistics about the random variables. | ⭐ | | ||
| sklearn_interface.py | Learn and evaluate a SPN using the scikit-learn interface. | ⭐ | | ||
| spn_custom_leaf.py | Learn, evaluate and serialize a SPN with a user-defined leaf distribution. | ⭐ | | ||
| clt_to_spn.py | Learn a Binary CLT, convert it to a structured decomposable SPN and plot it. | ⭐ | | ||
| spn_clt_em.py | Instantiate a SPN with Binary CLTs, apply EM algorithm and sample some data. | ⭐⭐ | | ||
| clt_queries.py | Learn a Binary CLT, plot it, run some queries and sample some data. | ⭐⭐ | | ||
| ratspn_mnist.py | Train and evaluate a RAT-SPN on MNIST. | ⭐⭐ | | ||
| dgcspn_olivetti.py | Train, evaluate and complete some images with DGC-SPN on Olivetti-Faces. | ⭐⭐ | | ||
| dgcspn_mnist.py | Train and evaluate a DGC-SPN on MNIST. | ⭐⭐ | | ||
| nvp1d_moons.py | Train and evaluate a 1D RealNVP on Moons dataset. | ⭐⭐ | | ||
| maf_cifar10.py | Train and evaluate a MAF on CIFAR10. | ⭐⭐⭐ | | ||
| nvp2d_mnist.py | Train and evaluate a 2D RealNVP on MNIST. | ⭐⭐⭐ | | ||
| nvp2d_cifar10.py | Train and evaluate a 2D RealNVP on CIFAR10. | ⭐⭐⭐ | | ||
| spn_latent_mnist.py | Train and evaluate a SPN on MNIST using the features extracted by an autoencoder. | ⭐⭐⭐ | |
Oops, something went wrong.