[mlpack-svn] r13087 - mlpack/trunk/src/mlpack/tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Jun 20 10:16:44 EDT 2012
Author: rcurtin
Date: 2012-06-20 10:16:43 -0400 (Wed, 20 Jun 2012)
New Revision: 13087
Modified:
mlpack/trunk/src/mlpack/tests/nmf_test.cpp
Log:
Fix some syntax errors I introduced, and print the matrices. The test does not
appear to be working correctly...?
Modified: mlpack/trunk/src/mlpack/tests/nmf_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/nmf_test.cpp 2012-06-20 05:43:01 UTC (rev 13086)
+++ mlpack/trunk/src/mlpack/tests/nmf_test.cpp 2012-06-20 14:16:43 UTC (rev 13087)
@@ -27,14 +27,17 @@
size_t r = 4;
mat w, h;
- NMF<> nmf;
- nmf.Apply(V, W, H, r);
+ NMF<> nmf(0);
+ nmf.Apply(v, w, h, r);
mat wh = w * h;
+ v.print("v");
+ wh.print("wh");
+
for (size_t row = 0; row < 5; row++)
for (size_t col = 0; col < 5; col++)
- BOOST_REQUIRE_CLOSE(v(row, col), wh(row, col), 5);
+ BOOST_REQUIRE_CLOSE(v(row, col), wh(row, col), 5.0);
}
More information about the mlpack-svn
mailing list