Authors: Kohei Yoshikawa and Shuichi Kawano
This is an implementation of RVSManOpt in "Sparse Reduced-Rank Regression for Simultaneous Rank and Variable Selection via Manifold Optimization"
This is a simple example which shows how to use these codes.
library(secure)
source("R/rvsmanopt.R")
source("R/generate-dataset.R")
Set the following parameters, and generate a dataset.
- n: Sample size
- p: The dimension of the predictor vectors
- q: The dimension of the response vectors
- nrank: The true rank of the model
- s2n: Signal to noise ratio
- rho: The correlation of error vectors
n <- 400; p <- 120; q <- 60; nrank <- 12
s2n <- 0.5; rho <- 0.3
dataset <- generate.data(n, p , q, nrank, s2n, rho)
Now, you can perform the RVSManOpt.
rx <- qr(dataset$X)$rank
max.rank.est <- min(rx, dataset$q)
parameters <- rvs.manopt.parameters()
fit.rvs.manopt <- rvs.manopt.path(dataset$X, dataset$Y, nrank=max.rank.est, parameters)
These code are free, non-commercial and open source.