Description Usage Arguments Value References Examples
Curvilinear search algorithm for optimization on Stiefel manifold based on Wen and Yin (2013). Used for estimating the envelope subspace.
1 | OptStiefelGBB(X, opts=NULL, fun, ...)
|
X |
n by k matrix such that X'X = I |
opts |
Option structure with fields: The default values are: |
fun |
Objective function and its gradient: |
... |
Additional input for |
X |
Solution |
Out |
Output information, inclusde estimation error, function value, iteration times etc. |
Wen, Z., & Yin, W. (2013). A feasible method for optimization with orthogonality constraints. Mathematical Programming, 142(1-2), 397-434.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | fun <- function(X, A) {
G = -2*(A %*% X)
F = sum(diag(t(X) %*% A %*% X))
return(list(F = F, G = G))
}
n = 1000; k = 6;
A = matrix(rnorm(n^2), n, n); A = t(A) %*% A
opts=c()
opts$record = 0;
opts$mxitr = 1000;
opts$xtol = 1e-5;
opts$gtol = 1e-5;
opts$ftol = 1e-8;
X0 = matrix(rnorm(n*k), n, k);
X0 = qr.Q(qr(X0));
eva <- OptStiefelGBB(X0, opts, fun, A)
X <- eva$X
out <- eva$out
out$fval = -2*out$fval;
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.