@Author: Han Zhao
@Note: Please cite the following paper if you use the tool developed in this package.
A Unified Approach for Learning the Parameters of Sum-Product Networks by H. Zhao, P. Poupart and G. Gordon, NIPS 2016.
Collapsed Variational Inference for Sum-Product Networks by H. Zhao, T. Adel, G. Gordon and B. Amos, ICML 2016.
@Required lib:
- Boost (>= 1.55)
- CMake (>= 2.80)
The software is written in C++11 for the purpose of parameter learning in Sum-Product Networks. It supports batch learning, online learning as well as streaming learning. This software implements the following learning algorithms for SPNs:
- Projected Gradient Descent.
- Exponentiated Gradient Method.
- Sequential Monomial Approximation (NIPS 2016).
- Concave-Convex Procedure/Expectation Maximization (NIPS 2016).
- Collapsed Variational Inference (ICML 2016).
Usage:
- batch_learning.cpp, online_learning.cpp and stream_learning.cpp should be the starting source files in order to understand the package.
- All the code about network structures is implemented in SPNNode.[h|cpp] and SPNetwork.[h|cpp].
- Learning algorithms under different learning scenarios, e.g., batch, online and streaming, are implemented separately in the corresponding *.cpp files.
Example:
batch_learning --train data/nltcs.ts.data --valid data/nltcs.valid.data --test data/nltcs.test.data --model models/nltcs.spn.txt --seed 42 --algo "cvb" --lrate 1e-1 --prior_scale 10 --stop_thred 1e-3 --num_iters 50