[mlpack-svn] r16259 - mlpack/trunk/src/mlpack/core/optimizers/lbfgs

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Feb 10 09:16:20 EST 2014


Author: rcurtin
Date: Mon Feb 10 09:16:20 2014
New Revision: 16259

Log:
Minor changes to ToString().


Modified:
   mlpack/trunk/src/mlpack/core/optimizers/lbfgs/lbfgs_impl.hpp

Modified: mlpack/trunk/src/mlpack/core/optimizers/lbfgs/lbfgs_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/optimizers/lbfgs/lbfgs_impl.hpp	(original)
+++ mlpack/trunk/src/mlpack/core/optimizers/lbfgs/lbfgs_impl.hpp	Mon Feb 10 09:16:20 2014
@@ -419,21 +419,23 @@
   return function.Evaluate(iterate);
 }
 
-
-// convert the object to a string
+// Convert the object to a string.
 template<typename FunctionType>
-std::string L_BFGS<FunctionType>::ToString() const{
+std::string L_BFGS<FunctionType>::ToString() const
+{
   std::ostringstream convert;
   convert << "L_BFGS [" << this << "]" << std::endl;
-  convert << "  Memory Size: " << numBasis << std::endl;
-  convert << "  Cube Size" << s.n_rows << "x" << s.n_cols << "x" << s.n_slices;
-  convert << std::endl;
-  convert << "  Maximum Iterations: " << maxIterations << std::endl;
-  convert << "  Armijo condition Parameter: " << armijoConstant << std::endl;
-  convert << "  Wolfe Parameter: " << wolfe << std::endl;
-  convert << "  Minimum Gradient: " << minGradientNorm << std::endl;
-  convert << "  Minimum Step of Line Search: " << minStep << std::endl;
-  convert << "  Maximum Step of Line Search: " << maxStep << std::endl;
+  convert << "  Function:" << std::endl;
+  convert << util::Indent(function.ToString(), 2);
+  convert << "  Memory size: " << numBasis << std::endl;
+  convert << "  Cube size: " << s.n_rows << "x" << s.n_cols << "x"
+      << s.n_slices << std::endl;
+  convert << "  Maximum iterations: " << maxIterations << std::endl;
+  convert << "  Armijo condition constant: " << armijoConstant << std::endl;
+  convert << "  Wolfe parameter: " << wolfe << std::endl;
+  convert << "  Minimum gradient norm: " << minGradientNorm << std::endl;
+  convert << "  Minimum step for line search: " << minStep << std::endl;
+  convert << "  Maximum step for line search: " << maxStep << std::endl;
   return convert.str();
 }
 



More information about the mlpack-svn mailing list