[mlpack] Issue in tutorial and docs
Ryan Curtin
ryan at ratml.org
Mon Feb 9 11:17:17 EST 2015
On Mon, Feb 09, 2015 at 09:44:34AM +0530, Kumar Shubham wrote:
> Hi ,
>
> I am going through the tutorials and Docs on your site for my preparation
> of GSOC 2015 and I am facing few Issues in tutorial on "Non Negative
> Matrix Factorization with AMF"
>
> in the example given on site for "Using Non-Negative Matrix Factorization
> with AMF" it is trying to create an object of class NMFALSFactorizer
> but I didn't find any such class in "mlpack/methods/amf/amf.hpp" although I
> was able to run the code with few modification for AMF class. I think this
> is the reason for getting an error of "‘NMFALSFactorizer’ was not
> declared in this scope" during compilation.
> or
> Am I missing something??
The NMFALSFactorizer typedef only exists in the master branch of the git
repository; it does not exist in mlpack 1.0.12 (or earlier). If you
have built the master branch locally (say, in /home/kumar/mlpack/build/
or something), but have also installed mlpack on your system (perhaps
through the libmlpack packages available in Debian and Ubuntu), make
sure that the compiler is linking against the correct version of mlpack.
With g++ you might do that like this:
$ g++ -o amf_example amf_example.cpp -I/home/kumar/mlpack/build/include/
-L/home/kumar/mlpack/lib/ -lmlpack <... whatever else is needed ...>
I fixed the misspelling of "return" in the example too. :)
> Morever in the comment of " mlpack/methods/amf/amf.hpp" and also on site
> http://www.mlpack.org/doxygen.php?doc=classmlpack_1_1amf_1_1AMF.html
> @code
> amf.Apply(V, W, H, r); is written while the actual Apply is of the form
>
> template<typename MatType> double Apply(const MatType& V,
> const size_t r,
> arma::mat& W,
> arma::mat& H);
>
>
> i.e. r should be declared before W and after V. I would suggest you to
> change it.
I've updated the documentation. Thanks for pointing that out.
--
Ryan Curtin | "Open the pig!"
ryan at ratml.org | - Frank Moses
More information about the mlpack
mailing list