athena.kas.KernelActiveSubspaces._compute_bootstrap_ranges

KernelActiveSubspaces._compute_bootstrap_ranges(gradients, weights, metric=None)

Compute bootstrap ranges for eigenvalues and subspaces.

An implementation of the nonparametric bootstrap that we use in conjunction with the subspace estimation methods to estimate the errors in the eigenvalues and subspaces.

Parameters
  • gradients (numpy.ndarray) – n_samples-by-n_params matrix containing the gradient samples oriented as rows.

  • weights (numpy.ndarray) – n_samples-by-1 weight vector, corresponds to numerical quadrature rule used to estimate matrix whose eigenspaces define the active subspace.

  • metric (numpy.ndarray) – metric matrix output_dim-by-output-dim for vectorial active subspaces.

Returns

array e_br is a m-by-2 matrix, first column contains bootstrap lower bound on eigenvalues, second column contains bootstrap upper bound on eigenvalues; array sub_br is a (m-1)-by-3 matrix, first column contains bootstrap lower bound on estimated subspace error, second column contains estimated mean of subspace error (a reasonable subspace error estimate), third column contains estimated upper bound on subspace error.

Return type

numpy.ndarray, numpy.ndarray