0
$\begingroup$

Sorry.I don't know enough about convex optimization.
How can I know this function for the $\theta$ vector
$(\theta_0+\theta_1x_1+\theta_2x_2-y_0)^2$
is a convex function?
The other variables are arbitrary constants.
Thanks in advance.

  • 0
    I still can make no sense of the question (perhaps my bad, though): what is $\,\theta\,$ and where does it appear in the question? What are $\,x_1\,,\,x_2\,,\,y_0$? What's the domain and what the range of this assumed function??2012-06-13

2 Answers 2

3

The function $f(\theta) = \theta_0+\theta_1x_1+\theta_2x_2-y_0$ is linear, and the function $\phi(t) = t^2$ is convex. It is straightforward to show the composition is convex. Suppose $\lambda \in [0,1]$:

$\phi(f(\lambda x +(1-\lambda)y)) = \phi(\lambda f(x)+(1-\lambda)f(y)) \leq \lambda \phi(f(x)) + (1-\lambda)\phi(f(y)).$

1

If a function $x \in \mathbb{R}^n \mapsto f(x) \in \mathbb{R}$ is convex then a function $y \in \mathbb{R}^m \mapsto f(Ay + b) = g(y)$ is also convex for any matrix $A \in \mathbb{R}^{n \times m}$ and any vector $b \in \mathbb{R}^n$ because $ g(\alpha y' + (1-\alpha)y'') \equiv f(A(\alpha y' + (1-\alpha)y'') + b) = \\ = f(\alpha(Ay' + b) + (1-\alpha)(Ay''+b)) \leqslant \alpha f(Ay'+b)+(1-\alpha)f(Ay''+b) = \\ = \alpha g(y') + (1-\alpha)g(y''). $ In your case function $f(x) = x^2$ is convex because $f''(x) = 2 > 0$, $A = (1,x_1,x_2)$, $b = -y_0$.