Many data analysis tasks can be represented or approximated as sensitivity analyses, including frequentist covariance estimates, linear response Bayesian covariances, local sensitivity to priors, data, or hyperparameters, approximate leave-k-out estimators, and the infinitesimal jackknife. In the past, sensitivity analysis typically require laborious and error-prone manual computation of derivatives, but with modern automatic differentiation (autograd
) and parameter wrapping (paragami
), sensitivity analysis can be automated for a wide class of problems. The vittles
package provides, at its core, a class for efficiently calculating arbitrarily high-order Taylor series approximations to dependence of the solution of an optimization problem on its hyperparameters, encompassing the above-mentioned applications and more as special cases.
https://github.com/rgiordan/vittles, or just $ pip install vittles