[mlpack-svn] r14882 - mlpack/trunk/src/mlpack/methods/gmm

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Apr 9 14:04:14 EDT 2013


Author: rcurtin
Date: 2013-04-09 14:04:14 -0400 (Tue, 09 Apr 2013)
New Revision: 14882

Modified:
   mlpack/trunk/src/mlpack/methods/gmm/gmm_main.cpp
Log:
Add option for number of trials.


Modified: mlpack/trunk/src/mlpack/methods/gmm/gmm_main.cpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/gmm/gmm_main.cpp	2013-04-08 18:02:00 UTC (rev 14881)
+++ mlpack/trunk/src/mlpack/methods/gmm/gmm_main.cpp	2013-04-09 18:04:14 UTC (rev 14882)
@@ -18,6 +18,7 @@
 PARAM_STRING("output_file", "The file to write the trained GMM parameters into "
     "(as XML).", "o", "gmm.xml");
 PARAM_INT("seed", "Random seed.  If 0, 'std::time(NULL)' is used.", "s", 0);
+PARAM_INT("trials", "Number of trials to perform in training GMM.", "t", 10);
 
 using namespace mlpack;
 using namespace mlpack::gmm;
@@ -49,7 +50,7 @@
 
   // Compute the parameters of the model using the EM algorithm.
   Timer::Start("em");
-  double likelihood = gmm.Estimate(dataPoints);
+  double likelihood = gmm.Estimate(dataPoints, CLI::GetParam<int>("trials"));
   Timer::Stop("em");
 
   Log::Info << "Log-likelihood of estimate: " << likelihood << ".\n";




More information about the mlpack-svn mailing list