Skip to content

Commit 0c73279

Browse files
committed
remove QP and RcppML as did not speed up HE-NNLS convergence
1 parent 05cf1ce commit 0c73279

4 files changed

Lines changed: 4 additions & 42 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ URL: https://marionilab.github.io/miloR
1515
BugReports: https://github.com/MarioniLab/miloR/issues
1616
biocViews: SingleCell, MultipleComparison, FunctionalGenomics, Software
1717
LinkingTo: Rcpp,
18-
RcppArmadillo,
19-
RcppEigen,
20-
RcppML
18+
RcppArmadillo
2119
Depends: R (>= 4.0.0),
2220
edgeR
2321
Imports: BiocNeighbors,

src/paramEst.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "paramEst.h"
33
#include "computeMatrices.h"
44
#include "utils.h"
5-
#include "solveQP.h"
65
#include<RcppArmadillo.h>
76
#ifdef _OPENMP
87
#include <omp.h>
@@ -358,8 +357,7 @@ arma::vec estHasemanElstonConstrained(const arma::mat& Z, const arma::mat& PREML
358357
// solve by linear least squares
359358
arma::vec _he_update(c+1);
360359

361-
// use RcppML NNLS (needs casting Eigen <-> arma)
362-
// _he_update = solveQP(vecZ, Ybig, _he_update);
360+
// Tried RcppML NNLS but arma <> eigen cast is too expensive
363361
_he_update = nnlsSolve(vecZ, Ybig, _he_update, Iters);
364362

365363
return _he_update;
@@ -390,7 +388,6 @@ arma::vec estHasemanElstonConstrainedML(const arma::mat& Z, const Rcpp::List& u_
390388

391389
// solve by linear least squares
392390
arma::vec _he_update(c+1);
393-
// _he_update = solveQP(vecZ, Ybig, _he_update);
394391
_he_update = nnlsSolve(vecZ, Ybig, _he_update, Iters);
395392

396393
return _he_update;
@@ -424,7 +421,6 @@ arma::vec estHasemanElstonConstrainedGenetic(const arma::mat& Z, const arma::mat
424421
arma::mat vecZ = vectoriseZGenetic(Z, u_indices, PREML, PZ, Kin); // projection already applied
425422

426423
arma::vec _he_update(c+1);
427-
// _he_update = solveQP(vecZ, Ybig, _he_update);
428424
_he_update = nnlsSolve(vecZ, Ybig, _he_update, Iters);
429425

430426
return _he_update;
@@ -455,11 +451,10 @@ arma::vec estHasemanElstonConstrainedGeneticML(const arma::mat& Z,
455451
arma::mat vecZ = vectoriseZGeneticML(Z, u_indices, Kin); // projection already applied
456452

457453
arma::vec _he_update(c+1);
458-
// _he_update = solveQP(vecZ, Ybig, _he_update);
459454
_he_update = nnlsSolve(vecZ, Ybig, _he_update, Iters);
460455

461-
return _he_update;
462-
}
456+
return _he_update;}
457+
463458

464459

465460
arma::vec nnlsSolve(const arma::mat& vecZ, const arma::vec& Y, arma::vec nnls_update, const int& Iters){

src/solveQP.cpp

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/solveQP.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)