Skip to content

Commit

Permalink
MAterail Ref. added
Browse files Browse the repository at this point in the history
  • Loading branch information
jan authored and jan committed Apr 22, 2017
1 parent 568499d commit 6297f44
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
19 changes: 19 additions & 0 deletions docs/tutorials/Binary_RBM_MNIST_small.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ The model is small enough to calculate the exact Log-Likelihood and annealed imp

For an analysis of advantage of centering in RBMs see `How to Center Deep Boltzmann Machines. Melchior, J., Fischer, A., & Wiskott, L.. (2016). Journal of Machine Learning Research, 17(99), 1–61. <http://jmlr.org/papers/v17/14-237.html>`_

If you are new on RBMs, a good theoretical introduction is given by `Course Material ICA <https://www.ini.rub.de/PEOPLE/wiskott/Teaching/Material/index.html>`_ and in the following video.

.. raw:: html

<div style="margin-top:10px;">
<iframe width="560" height="315" src="http://www.youtube.com/embed/bMaITeXhOaE" frameborder="0" allowfullscreen></iframe>
</div>

and

.. raw:: html

<div style="margin-top:10px;">
<iframe width="560" height="315" src="http://www.youtube.com/embed/nyk5XUklb5M" frameborder="0" allowfullscreen></iframe>
</div>

Results
***********

The code_ given below produces the following output.

Learned filters of a centered binary RBM on the MNIST dataset.
Expand Down
5 changes: 4 additions & 1 deletion docs/tutorials/ICA_2D_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Independent Component Analysis on a 2D example.
Example for Independent Component Analysis (`ICA <https://en.wikipedia.org/wiki/Principal_component_analysis>`_) used
for a blind source separation on a linear 2D mixture.

If you are new on blind source separation, a good theoretical introduction is given in the following video.
If you are new on ICA and blind source separation, a good theoretical introduction is given by `Course Material ICA <https://www.ini.rub.de/PEOPLE/wiskott/Teaching/Material/index.html>`_ and in the following videos.

.. raw:: html

Expand All @@ -22,6 +22,9 @@ and the follow up video introduces to ICA.
<iframe width="560" height="315" src="http://www.youtube.com/embed/ugiMhRbFnTo" frameborder="0" allowfullscreen></iframe>
</div>

Results
***********

The code_ given below produces the following output.

Visualization of the data and true mixing matrix projected to the whitened space.
Expand Down
3 changes: 3 additions & 0 deletions docs/tutorials/ICA_natural_images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on natural image patches. The independent components (columns of the ICA project

See `ICA_2D_example <ICA_2D_example.html#ICA_2D_example>`__ for a theoretical introduction.

Results
***********

The code_ given below produces the following output.

Visualization of 100 examples of the gray scale natural image dataset.
Expand Down
6 changes: 5 additions & 1 deletion docs/tutorials/PCA_2D_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ Principal Component Analysis 2D example.

Example for Principal Component Analysis (`PCA <https://en.wikipedia.org/wiki/Principal_component_analysis>`_) on a linear 2D mixture.

If you are new on PCA, a good theoretical introduction is given in the following video.

If you are new on PCA, a good theoretical introduction is given by `Course Material ICA <https://www.ini.rub.de/PEOPLE/wiskott/Teaching/Material/index.html>`_ and in the following videos.

.. raw:: html

<div style="margin-top:10px;">
<iframe width="560" height="315" src="http://www.youtube.com/embed/9H-1FH1gn6w" frameborder="0" allowfullscreen></iframe>
</div>

Results
***********

The code_ given below produces the following output.

The data is plotted with the extracted principal components.
Expand Down
3 changes: 3 additions & 0 deletions docs/tutorials/PCA_eigenfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Example for Principal Component Analysis (PCA) on face images also known as `Eig

See `PCA_2D_example <PCA_2D_example.html#PCA_2D_example>`__ for a theoretical introduction.

Results
***********

The code_ given below produces the following output.

Some examples of the face images of the olivetti face dataset.
Expand Down
6 changes: 4 additions & 2 deletions examples/RBM_binary_MNIST_small.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,14 @@

# Calculate true partition function
logZ = estimator.partition_function_factorize_h(rbm, batchsize_exponent=h1, status=False)
print("True Partition: {} (LL: {})".format(logZ, numx.mean(estimator.log_likelihood_v(rbm, logZ, train_data))))
print("True Partition: {} (LL: {})".format(logZ, numx.mean(
estimator.log_likelihood_v(rbm, logZ, train_data))))

# Approximate partition function by AIS (tends to overestimate)
logZ_approx_ = estimator.annealed_importance_sampling(rbm)[0]
print(
"AIS Partition: {} (LL: {})".format(logZ_approx_, numx.mean(estimator.log_likelihood_v(rbm, logZ_approx_, train_data))))
"AIS Partition: {} (LL: {})".format(logZ_approx_, numx.mean(
estimator.log_likelihood_v(rbm, logZ_approx_, train_data))))

# Approximate partition function by reverse AIS (tends to underestimate)
logZ_approx_up = estimator.reverse_annealed_importance_sampling(rbm, data=train_data)[0]
Expand Down

0 comments on commit 6297f44

Please sign in to comment.