Blurb::
Use the Constantine diagnostic to truncate subspace

Description::
Uses a criterion based on the variability of the subspace estimate. 
Eigenvectors are computed for bootstrap samples of the gradient matrix. The 
subspace size associated with the minimum distance between bootstrap 
eigenvectors and the nominal eigenvectors is the estimated active subspace
size.

<b> Usage Tips </b>

If this automated diagnostic does not yield desirable results, consider
using the explicit \ref model-active_subspace-dimension truncation option or one of the other
truncation methods.

Topics::

Examples::
Theory::
Below is a brief outline of the Constantine method of active subspace 
identification. The first two steps are common to all active subspace 
truncation methods.

1. Compute the gradient of the quantity of interest, \f$q = f(\mathbf{x})\f$,
    at several locations sampled from the input space,
    \f[\nabla_{\mathbf{x}} f_i = \nabla f(\mathbf{x}_i).\f]

2. Compute the eigendecomposition of the matrix \f$\hat{\mathbf{C}}\f$,
    \f[\hat{\mathbf{C}} = \frac{1}{M}\sum_{i=1}^{M}\nabla_{\mathbf{x}} f_i\nabla_{\mathbf{x}} f_i^T = \hat{\mathbf{W}}\hat{\mathbf{\Lambda}}\hat{\mathbf{W}}^T,\f]
    where \f$\hat{\mathbf{W}}\f$ has eigenvectors as columns, 
    \f$\hat{\mathbf{\Lambda}} = \text{diag}(\hat{\lambda}_1,\:\ldots\:,\hat{\lambda}_N)\f$
    contains eigenvalues, and \f$N\f$ is the total number of parameters.

3. Use bootstrap sampling of the gradients found in step 1 to compute replicate
    eigendecompositions,
    \f[\hat{\mathbf{C}}_j^* = \hat{\mathbf{W}}_j^*\hat{\mathbf{\Lambda}}_j^*\left(\hat{\mathbf{W}}_j^*\right)^T.\f]

4. Compute the average distance between nominal and bootstrap subspaces,
    \f[e^*_n = \frac{1}{M_{boot}}\sum_j^{M_{boot}} \text{dist}(\text{ran}(\hat{\mathbf{W}}_n), \text{ran}(\hat{\mathbf{W}}_{j,n}^*)) = \frac{1}{M_{boot}}\sum_j^{M_{boot}} \left\| \hat{\mathbf{W}}_n\hat{\mathbf{W}}_n^T - \hat{\mathbf{W}}_{j,n}^*\left(\hat{\mathbf{W}}_{j,n}^*\right)^T\right\|,\f]
    where \f$M_{boot}\f$ is the number of bootstrap samples, 
    \f$\hat{\mathbf{W}}_n\f$ and \f$\hat{\mathbf{W}}_{j,n}^*\f$ both contain 
    only the first \f$n\f$ eigenvectors, and \f$n < N\f$.

5. The estimated subspace rank, \f$r\f$, is then,
    \f[r = \operatorname*{arg\,min}_n \, e^*_n.\f]

For additional information, see Constantine, Paul G. "Active Subspaces: Emerging Ideas for Dimension Reduction in Parameter Studies". Vol. 2. SIAM, 2015.

Faq::
See_Also::
