[mlpack-svn] r15839 - mlpack/trunk/src/mlpack/methods/linear_regression
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Sep 26 10:35:26 EDT 2013
Author: rcurtin
Date: Thu Sep 26 10:35:26 2013
New Revision: 15839
Log:
Fix warning, add const.
Modified:
mlpack/trunk/src/mlpack/methods/linear_regression/linear_regression.cpp
Modified: mlpack/trunk/src/mlpack/methods/linear_regression/linear_regression.cpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/linear_regression/linear_regression.cpp (original)
+++ mlpack/trunk/src/mlpack/methods/linear_regression/linear_regression.cpp Thu Sep 26 10:35:26 2013
@@ -21,7 +21,7 @@
// We store the number of rows of the predictors.
// Reminder: Armadillo stores the data transposed from how we think of it,
// that is, columns are actually rows (see: column major order).
- size_t nCols = predictors.n_cols;
+ const size_t nCols = predictors.n_cols;
// Here we add the row of ones to the predictors.
arma::rowvec ones;
@@ -57,10 +57,6 @@
void LinearRegression::Predict(const arma::mat& points, arma::vec& predictions)
{
- // We get the number of columns and rows of the dataset.
- const size_t nCols = points.n_cols;
- const size_t nRows = points.n_rows;
-
// We want to be sure we have the correct number of dimensions in the dataset.
Log::Assert(points.n_rows == parameters.n_rows - 1);
More information about the mlpack-svn
mailing list