[mlpack-svn] r11622 - mlpack/trunk/src/mlpack/methods/lars

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Feb 28 00:51:37 EST 2012


Author: niche
Date: 2012-02-28 00:51:37 -0500 (Tue, 28 Feb 2012)
New Revision: 11622

Modified:
   mlpack/trunk/src/mlpack/methods/lars/lars.hpp
   mlpack/trunk/src/mlpack/methods/lars/lars_main.cpp
Log:
corrected elastic net / lasso objective function in the comments. I had forgotten to put the 0.5 scaling factor on the reconstruction error part of the objective

Modified: mlpack/trunk/src/mlpack/methods/lars/lars.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/lars/lars.hpp	2012-02-28 05:40:30 UTC (rev 11621)
+++ mlpack/trunk/src/mlpack/methods/lars/lars.hpp	2012-02-28 05:51:37 UTC (rev 11622)
@@ -26,7 +26,7 @@
  * Let X be a matrix where each row is a point and each column is a dimension,
  * and let y be a vector of targets.
  * The Elastic Net problem is to solve
- * min_beta ||X beta - y||_2^2 + lambda_1 ||beta||_1 + 0.5 lambda_2 ||beta||_2^2
+ * min_beta 0.5 ||X beta - y||_2^2 + lambda_1 ||beta||_1 + 0.5 lambda_2 ||beta||_2^2
  * If lambda_1 > 0, lambda_2 = 0, the problem is the LASSO.
  * If lambda_1 > 0, lambda_2 > 0, the problem is the Elastic Net.
  * If lambda_1 = 0, lambda_2 > 0, the problem is Ridge Regression.
@@ -38,7 +38,7 @@
  *
  * Only minor modifications are necessary to handle the constrained version of
  * the problem:
- *   min_beta ||X beta - y||_2^2 + 0.5 lambda_2 ||beta||_2^2
+ *   min_beta 0.5 ||X beta - y||_2^2 + 0.5 lambda_2 ||beta||_2^2
  *   subject to ||beta||_1 <= tau
  * Although this option currently is not implemented, it will be implemented
  * very soon.

Modified: mlpack/trunk/src/mlpack/methods/lars/lars_main.cpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/lars/lars_main.cpp	2012-02-28 05:40:30 UTC (rev 11621)
+++ mlpack/trunk/src/mlpack/methods/lars/lars_main.cpp	2012-02-28 05:51:37 UTC (rev 11622)
@@ -17,7 +17,7 @@
     "dimension, and let y be a vector of targets.\n"
     "\n"
     "The Elastic Net problem is to solve\n\n"
-    "  min_beta || X * beta - y ||_2^2 + lambda_1 ||beta||_1 +\n"
+    "  min_beta 0.5 || X * beta - y ||_2^2 + lambda_1 ||beta||_1 +\n"
     "      0.5 lambda_2 ||beta||_2^2\n\n"
     "If lambda_1 > 0 and lambda_2 = 0, the problem is the LASSO.\n"
     "If lambda_1 > 0 and lambda_2 > 0, the problem is the Elastic Net.\n"




More information about the mlpack-svn mailing list