Category : armadillo

I’m trying to calculate percentiles in c++. I’m already using the armadillo library for other calculations. I’ve found posts outlining the algorithm for Excel’s percentile.exc function. However, I’m wondering if anyone knows how to using an armadillo library function to do the same. Would using the ‘quantile’ function work? If so, do I input the ..

Read more

When i try to compile my code which uses eig_sym from Armadillo it gives this error Undefined symbols for architecture x86_64: "_wrapper2_dsyev_", referenced from: void arma::lapack::syev<double>(char*, char*, int*, double*, int*, double*, double*, int*, int*) in main-df43f9.o "_wrapper2_dsyevd_", referenced from: void arma::lapack::syevd<double>(char*, char*, int*, double*, int*, double*, double*, int*, int*, int*, int*) in main-df43f9.o ld: symbol(s) ..

Read more

According to Armadillo docs: .i() Member function of any matrix expression Provides an inverse of the matrix expression … However, when I try to compile this snippet: #include <armadillo> #include <iostream> arma::sp_mat linReg(arma::sp_mat X, arma::sp_mat Y) { return (X.t() * X).i() * X.t() * Y; } int main() { arma::sp_mat X = arma::sprandu(1000, 10, 0.3); ..

Read more