I'm trying to best express a cost function and I'm unclear on how to properly add an interval-based constraint. The cost function is used to minimize a cubic function.
My cost function has 3 components:
Quadratic $\frac{1}{N} \sum_{i=1}^N{(\hat{y}-y})^2$
L2 Regularization $\lambda\sum_{i=2}^kw_i^2$
Interval-based constraint $\sigma_{f(x)}, x\epsilon(80,\infty)$
Is the following a clear way to express this? I'm concerned that the notation is not clear.
$min \frac{1}{N} \sum_{i=1}^N{(\hat{y}-y})^2 + \lambda\sum_{i=2}^kw_i^2 + \sigma_{f(x)}, x\epsilon(80,\infty)$
This is indeed not clear (to me). This is what I think you mean.
Call your three terms $A$, $B$ and $C$. Then $$ \text{cost}(x) = \min\begin{cases} A + B \quad\quad\quad \text{ if } x \le 80 \\ A+B+C \quad \text{ if } x > 80 \end{cases} $$
For clarity, I would in fact define $A$, $B$ and $C$ first rather than inlining them in the
\casesstatement.