[mlpack-git] master: Spacing and line length fixes. (7b8ecf5)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:00:35 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit 7b8ecf5c18ac844d17855d72ec757fb110c15421
Author: Ryan Curtin <ryan at ratml.org>
Date:   Sat Sep 27 16:35:43 2014 +0000

    Spacing and line length fixes.


>---------------------------------------------------------------

7b8ecf5c18ac844d17855d72ec757fb110c15421
 src/mlpack/methods/linear_regression/linear_regression.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mlpack/methods/linear_regression/linear_regression.cpp b/src/mlpack/methods/linear_regression/linear_regression.cpp
index 753ea08..17dafae 100644
--- a/src/mlpack/methods/linear_regression/linear_regression.cpp
+++ b/src/mlpack/methods/linear_regression/linear_regression.cpp
@@ -96,10 +96,13 @@ void LinearRegression::Predict(const arma::mat& points, arma::vec& predictions)
 {
   if (intercept)
   {
-    // We want to be sure we have the correct number of dimensions in the dataset.
-    Log::Assert(points.n_rows == parameters.n_rows-1);
-    // Get the predictions, but this ignores the intercept value (parameters[0]).
-    predictions = arma::trans(arma::trans(parameters.subvec(1, parameters.n_elem - 1)) * points);
+    // We want to be sure we have the correct number of dimensions in the
+    // dataset.
+    Log::Assert(points.n_rows == parameters.n_rows - 1);
+    // Get the predictions, but this ignores the intercept value
+    // (parameters[0]).
+    predictions = arma::trans(arma::trans(parameters.subvec(1,
+        parameters.n_elem - 1)) * points);
     // Now add the intercept.
     predictions += parameters(0);
   }



More information about the mlpack-git mailing list