I have $k$ reasonably smooth functions $f_i : \mathbb{R}^n \to \mathbb{R}$ and corresponding targets $t_i \in \mathbb{R}$ as well as a regularization term $r : \mathbb{R}^n \to \mathbb{R}$. I want to find a position $x^* \in \mathbb{R}^n$ that makes each function hit their target value and minimizes the regularization term.
Assuming I have access to a constrained optimization algorithm, I could express this goal either via the objective function by minimizing the squared errors between the functions and their target values
$$ \begin{align} x^* = &\operatorname*{argmin}_{x \in \mathbb{R}^n} \left(\left(\sum_{i < k} (f_i(x) - t_i)^2\right) + \lambda r(x)\right)\\ &\text{st.} \: \text{True} \end{align} \tag{1} $$
or directly via the constraints $$ \begin{align} x^* = &\operatorname*{argmin}_{x \in \mathbb{R}^n} \: r(x) \:\:\\ &\text{st.} \: \forall \: i < k. f_i(x) = t_i \end{align} \tag{2} $$
- Which approach is better? My intuition tells me that (2) gives the optimizer more independent ($n$ separate constraints rather than single scalar value) and also more direct (no squaring of the values) access to the quantities of interest. If so, how can an optimization algorithm make use of this additional information?
- I assume that the answer to question 1 depends to some extent on the chosen optimization algorithm. If so, which algorithms would be best for this type of problem and/or each way of expressing it?
- Assuming that (2) is preferable, how can I deal with a situation in which the constraints are not completely satisfiable, but there is a solution that gets very close?