Skip to content
Permalink
Browse files

Merge pull request #2133 from aabghari/master

Removed using namespace std from pca_imp.hpp.
  • Loading branch information
zoq committed Jan 4, 2020
2 parents 594713a + 4cdac4f commit 16ee2fa60d6bfe36b5b4f7653e72f3a390a8e25b
Showing with 4 additions and 6 deletions.
  1. +4 −6 src/mlpack/methods/pca/pca_impl.hpp
@@ -20,8 +20,6 @@
#include <mlpack/core/math/lin_alg.hpp>
#include "pca.hpp"

using namespace std;

namespace mlpack {
namespace pca {

@@ -95,11 +93,11 @@ double PCA<DecompositionPolicy>::Apply(arma::mat& data,
// Parameter validation.
if (newDimension == 0)
Log::Fatal << "PCA::Apply(): newDimension (" << newDimension << ") cannot "
<< "be zero!" << endl;
<< "be zero!" << std::endl;
if (newDimension > data.n_rows)
Log::Fatal << "PCA::Apply(): newDimension (" << newDimension << ") cannot "
<< "be greater than the existing dimensionality of the data ("
<< data.n_rows << ")!" << endl;
<< data.n_rows << ")!" << std::endl;

arma::mat eigvec;
arma::vec eigVal;
@@ -146,10 +144,10 @@ double PCA<DecompositionPolicy>::Apply(arma::mat& data,
// Parameter validation.
if (varRetained < 0)
Log::Fatal << "PCA::Apply(): varRetained (" << varRetained << ") must be "
<< "greater than or equal to 0." << endl;
<< "greater than or equal to 0." << std::endl;
if (varRetained > 1)
Log::Fatal << "PCA::Apply(): varRetained (" << varRetained << ") should be "
<< "less than or equal to 1." << endl;
<< "less than or equal to 1." << std::endl;

arma::mat eigvec;
arma::vec eigVal;

0 comments on commit 16ee2fa

Please sign in to comment.
You can’t perform that action at this time.