22 #ifndef __MLPACK_CORE_MATH_LIN_ALG_HPP 23 #define __MLPACK_CORE_MATH_LIN_ALG_HPP 38 void VectorPower(arma::vec& vec,
const double power);
47 void Center(
const arma::mat& x, arma::mat& xCentered);
56 arma::mat& whiteningMatrix);
64 arma::mat& whiteningMatrix);
91 const std::vector<size_t>& rowsToRemove,
97 #endif // __MLPACK_CORE_MATH_LIN_ALG_HPP void Orthogonalize(const arma::mat &x, arma::mat &W)
Orthogonalize x and return the result in W, using eigendecomposition.
void VectorPower(arma::vec &vec, const double power)
Auxiliary function to raise vector elements to a specific power.
void RemoveRows(const arma::mat &input, const std::vector< size_t > &rowsToRemove, arma::mat &output)
Remove a certain set of rows in a matrix while copying to a second matrix.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void WhitenUsingEig(const arma::mat &x, arma::mat &xWhitened, arma::mat &whiteningMatrix)
Whitens a matrix using the eigendecomposition of the covariance matrix.
void WhitenUsingSVD(const arma::mat &x, arma::mat &xWhitened, arma::mat &whiteningMatrix)
Whitens a matrix using the singular value decomposition of the covariance matrix. ...
void RandVector(arma::vec &v)
Overwrites a dimension-N vector to a random vector on the unit sphere in R^N.
void Center(const arma::mat &x, arma::mat &xCentered)
Creates a centered matrix, where centering is done by subtracting the sum over the columns (a column ...