[mlpack] make test failure

Ryan Curtin gth671b at mail.gatech.edu
Sun Mar 9 00:13:18 EST 2014


On Thu, Mar 06, 2014 at 11:57:52AM +0800, Li Dong wrote:
> rmbp:mlpack-1.0.8 dongli$ bin/mlpack_test -t NMFTest/SparseNMFRandomDivTest
> Running 1 test case...
> /Library/Caches/Homebrew/mlpack-1.0.8/src/mlpack/tests/nmf_test.cpp:239: fatal error in "SparseNMFRandomDivTest": difference{nan%} between h(i){nan} and dh(i){nan} exceeds 1.0000000000000001e-05%
> 
> *** 1 failure detected in test suite “MLPACKTest"
> 
> Sleep is more important! :)

Hello Li,

I'm sorry for the slow response.  In this case the test error is an edge
case where the matrices approximated by NMF have elements that converge
to zero, then there is a line where there is a division by those
elements, so then suddenly there are NaNs everywhere.

In trunk, I've committed a fix with r16349, but for mlpack-1.0.8 you can
either choose to ignore the error, or apply the backported patch I've
attached.

But with either thing you choose, mlpack is still functioning the same
on OS X as it would on Linux (note that the test would pass if it
considered, more carefully, what to do when h(i) and dh(i) were both
NaNs).

Let me know if I can clarify any further.

Thanks,

Ryan

-- 
Ryan Curtin    | "Exterminate all rational thought."
ryan at ratml.org |   - Bill Lee
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nan-handling.diff
Type: text/x-diff
Size: 1745 bytes
Desc: not available
URL: <http://mailman.cc.gatech.edu/pipermail/mlpack/attachments/20140309/5a55ae5a/attachment-0001.diff>


More information about the mlpack mailing list