CMPUT 466 566
Machine learning
Problem 1.
Let be the linear hypothesis class.
Prove that for, any in their linear combination
is also in where
Problem 2.
Consider a two dimensional space ℝ2 . Determine whether the following sets are convex or not. Prove or disprove.
Problem 3.
Consider the function
a) View x1as a variable and x2 as a constant. Determine whether f is convex in x1 and prove it.
b) View x2as a variable and x1 as a constant. Determine whether f is convex in x2 and prove it.
c) View f: ℝ2 → ℝ as a function of the input vector (x1, x2) . Determine whether f is convex in (x1, x2) and prove it.
Hints: For a) and b), treat one variable as a constant, and calculate the second-order derivative of a single-variable function.
For c), calculate the Hessian matrix H first and choose a point, say, (0,0). You may use numpy in Python to calculate the eigenvalue
import numpy as np
from numpy import linalg as LA
H = np.array ( [ [11, 12], [21, 22]]) # your values here
eigenval, eigenvec = LA.eig(H)
Print eigenval. If any number is less than 0, then the function is not convex. Otherwise, it is convex. Eigenvalues may also be calculated manually.
The example shows that an element-wise convex function may not be jointly convex.