DataSlingers / MoMA

MoMA: Modern Multivariate Analysis in R
https://DataSlingers.github.io/MoMA
GNU General Public License v2.0
22 stars 4 forks source link

Remove MoMA::u, MoMA::v #35

Open Banana1530 opened 5 years ago

Banana1530 commented 5 years ago

At the very beginning, we include u and v as members of MoMA to facilitate warm-start. They are initialized to be the SVD of data matrix X, and they are updated in real time as the PG loop runs. Ideally, we want

problem = MoMA(X, lambda_u=0)
problem.solve()
arma::vec u1 = problem.u
arma::vec v1 = problem.v

problem.reset(lambda_v=0.1)
problem.solve() // warm-start
arma::vec u2 = problem.u
arma::vec v2 = problem.v

However, as the mix of BIC search and grid search comes into our design, the concept of warm-start becomes intricate. Furthermore, dependence on MoMA::u and MoMA::v as solutions to the current or last penalized SVD problem might be a gotcha.

So lets remove MoMA::u/v and let outside code (wrt to MoMA internal code) take care of warm-start.