[mlpack-svn] r14133 - mlpack/trunk/src/mlpack/tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Jan 18 13:15:20 EST 2013
Author: rcurtin
Date: 2013-01-18 13:15:19 -0500 (Fri, 18 Jan 2013)
New Revision: 14133
Modified:
mlpack/trunk/src/mlpack/tests/gmm_test.cpp
Log:
Update test for changed GMM API.
Modified: mlpack/trunk/src/mlpack/tests/gmm_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/gmm_test.cpp 2013-01-18 18:15:00 UTC (rev 14132)
+++ mlpack/trunk/src/mlpack/tests/gmm_test.cpp 2013-01-18 18:15:19 UTC (rev 14133)
@@ -201,7 +201,7 @@
// Now, train the model.
GMM<> gmm(1, 2);
- gmm.Estimate(data, 10);
+ double likelihood = gmm.Estimate(data, 10);
arma::vec actualMean = arma::mean(data, 1);
arma::mat actualCovar = ccov(data, 1 /* biased estimator */);
@@ -291,7 +291,7 @@
// Now train the model.
GMM<> gmm(gaussians, dims);
- gmm.Estimate(data, 10);
+ double likelihood = gmm.Estimate(data, 10);
arma::uvec sortRef = sort_index(weights);
arma::uvec sortTry = sort_index(gmm.Weights());
@@ -334,7 +334,7 @@
// Now train the model.
GMM<> g(1, 2);
- g.Estimate(observations, probabilities, 10);
+ double likelihood = g.Estimate(observations, probabilities, 10);
// Check that it is trained correctly. 7% tolerance because of random error
// present in observations.
@@ -407,7 +407,7 @@
// Now train the model.
GMM<> g(4, 3); // 3 dimensions, 4 components.
- g.Estimate(points, probabilities, 8);
+ double likelihood = g.Estimate(points, probabilities, 8);
// Now check the results. We need to order by weights so that when we do the
// checking, things will be correct.
@@ -487,7 +487,7 @@
// A new one which we'll train.
GMM<> gmm2(2, 2);
- gmm2.Estimate(observations, 10);
+ double likelihood = gmm2.Estimate(observations, 10);
// Now check the results. We need to order by weights so that when we do the
// checking, things will be correct.
More information about the mlpack-svn
mailing list