Chris1221 / coRge

Evaluation of Simultaneous Inference Methods for the Human Genome.
http://chrisbcole.me/coRge/
Apache License 2.0
0 stars 0 forks source link

[v0.6.3.9000] Singular Matrices in c(1, gen) #33

Closed Chris1221 closed 8 years ago

Chris1221 commented 8 years ago

Dealing with this by Moore-Penrose pseudo-inverse of matrix.

arma::pinv()

Chris1221 commented 8 years ago

Fixed by reporting 0 if vector is all 0, 1, or 2. See here.

bool zero = arma::all(X == 0);
bool one = arma::all(X == 1);
bool two = arma::all(X == 2);

bool singular = (zero || one || two);