  In classical inverse linear optimization, one assumes a given solution is a
candidate to be optimal. Real data is imperfect and noisy, so there is no
guarantee this assumption is satisfied. Inspired by regression, this paper
presents a unified framework for cost function estimation in linear
optimization comprising a general inverse optimization model and a
corresponding goodness-of-fit metric. Although our inverse optimization model
is nonconvex, we derive a closed-form solution and present the geometric
intuition. Our goodness-of-fit metric, $\rho$, the coefficient of
complementarity, has similar properties to $R^2$ from regression and is
quasiconvex in the input data, leading to an intuitive geometric
interpretation. While $\rho$ is computable in polynomial-time, we derive a
lower bound that possesses the same properties, is tight for several important
model variations, and is even easier to compute. We demonstrate the application
of our framework for model estimation and evaluation in production planning and
cancer therapy.
