[mlpack-git] master: Add some more documentation. (c2d22d6)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Mon Dec 7 09:47:59 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/1efafa13b304c7821d858754b0d2dab9a05795a7...c2d22d60c3355e82b45e6596d721c3905351989c

>---------------------------------------------------------------

commit c2d22d60c3355e82b45e6596d721c3905351989c
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Dec 7 14:38:10 2015 +0000

    Add some more documentation.


>---------------------------------------------------------------

c2d22d60c3355e82b45e6596d721c3905351989c
 src/mlpack/methods/sparse_coding/sparse_coding.hpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/mlpack/methods/sparse_coding/sparse_coding.hpp b/src/mlpack/methods/sparse_coding/sparse_coding.hpp
index 89bc49a..07c5d07 100644
--- a/src/mlpack/methods/sparse_coding/sparse_coding.hpp
+++ b/src/mlpack/methods/sparse_coding/sparse_coding.hpp
@@ -111,7 +111,15 @@ class SparseCoding
    * Set the parameters to SparseCoding.  lambda2 defaults to 0.  This
    * constructor will train the model.  If that is not desired, call the other
    * constructor that does not take a data matrix.  This constructor will also
-   * initialize the dictionary using the DictionaryInitializer before training.
+   * initialize the dictionary using the given DictionaryInitializer before
+   * training.
+   *
+   * If you want to initialize the dictionary to a custom matrix, consider
+   * either writing your own DictionaryInitializer class (with void
+   * Initialize(const arma::mat& data, arma::mat& dictionary) function), or call
+   * the constructor that does not take a data matrix, then call Dictionary() to
+   * set the dictionary matrix to a matrix of your choosing, and then call
+   * Train() with NothingInitializer (i.e. Train<NothingInitializer>(data)).
    *
    * @param data Data matrix.
    * @param atoms Number of atoms in dictionary.



More information about the mlpack-git mailing list