fps: Fantope Projection and Selection

Description Usage Arguments Details Value Examples

Description

This function computes a solution path of the Fantope Projection and Selection (FPS) estimator. It takes a symmetric matrix S as input and returns an object containing a list of projection matrices estimated by FPS over a sequence of regularization parameter values.

Fantope Project and Select

Usage

1
2
3
fps(S, ndim, nsol = 50L, maxnvar = -1L, lambdamin = -1,
  lambda = as.numeric(c()), maxiter = 100L, tolerance = 0.001,
  verbose = 0L)

Arguments

S

Input matrix (assumed to be symmetric)

ndim

Target subspace dimension (can be fractional)

nsol

Number of solutions to compute

maxnvar

Suggested maximum number of variables to include (ignored if maxnvar <= 0)

lambdamin

Minimum value of lambda (set automatically if lambdamin < 0)

lambda

Vector of regularization parameter values; overrides //' nsol, maxnvar, and lambdamin if nonempty

maxiter

Maximum number of iterations for each solution

tolerance

Convergence threshold

verbose

Level of verbosity; Silent if verbose = 0, otherwise display more messages and progress indicators as verbose increases

Details

By default, a sensible minimum value of the regularization parameter is automatically chosen so that the minimally regularized solution is different from PCA.

For large input matrices (1000-by-1000 or larger) it is recommended that the maxnvar argument be set to a reasonably small number.

Value

An S3 object of class fps which is a list with the following components:

ndim

trace (dimension) of the estimate

lambda

a vector containing the regularization parameters of each estimate

projection

a list containing the the projection matrix estimates

leverage

a matrix whose columns are the diagonal entries of the projection matrix estimates

L1

a vector of the sum of absolute values of each estimate

var.explained

variance explained by each estimate (trace inner product of the projection and S)

var.total

total variance (trace of S)

niter

a vector containing the number of ADMM iterations for each estimate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Apply FPS to the standardized wine data from the UCI ML repository
data(wine)
out <- fps(cor(wine), ndim = 2)
print(out)
plot(out)

# Create a synthetic dataset by adding noise variables to the wine data
j <- sample(1:ncol(wine), size = 500 - ncol(wine), replace = TRUE)
noise <- apply(wine[, j], 2, sample, replace = TRUE)
colnames(noise) <- rep('noise', ncol(noise))
x <- cbind(wine, noise)
out <- fps(cor(x), ndim = 2, maxnvar = 50, verbose = 1)

## Not run: 
# Choose lambda by cross-validation (this may take a few minutes)
cvout <- cv(out, x, FUN = cor, verbose = 1)
plot(cvout)
v <- coef(out, lambda = cvout$lambda.cv)
print(v)

## End(Not run)

vqv/fps documentation built on May 3, 2019, 6:41 p.m.