[mlpack-svn] r10575 - mlpack/trunk/src/mlpack/methods/gmm
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Dec 6 03:58:59 EST 2011
Author: rcurtin
Date: 2011-12-06 03:58:59 -0500 (Tue, 06 Dec 2011)
New Revision: 10575
Modified:
mlpack/trunk/src/mlpack/methods/gmm/gmm.hpp
Log:
Issue a warning when an empty GMM is created.
Modified: mlpack/trunk/src/mlpack/methods/gmm/gmm.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/gmm/gmm.hpp 2011-12-06 08:38:53 UTC (rev 10574)
+++ mlpack/trunk/src/mlpack/methods/gmm/gmm.hpp 2011-12-06 08:58:59 UTC (rev 10575)
@@ -50,7 +50,14 @@
*/
GMM() :
gaussians(0),
- dimensionality(0) { /* nothing to do */ }
+ dimensionality(0)
+ {
+ // Warn the user. They probably don't want to do this. If this constructor
+ // is being used (because it is required by some template classes), the user
+ // should know that it is potentially dangerous.
+ Log::Warn << "GMM::GMM(): no parameters given; Estimate() will fail "
+ << "unless parameters are set." << std::endl;
+ }
/**
* Create a GMM with the given number of Gaussians, each of which have the
More information about the mlpack-svn
mailing list