bv_cvxbook_extra_exercises

10 10 download the matlab les splinedatam and

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1, . . . , m, with xi , yi ∈ R. We will assume that xi are sorted, i.e., x1 < x2 < · · · < xm . Let a0 < a1 < a2 < · · · < aK be a set of fixed knot points, with a0 ≤ x1 and aK ≥ xm . Explain how to find the convex piecewise linear function f , defined over [a0 , aK ], with knot points ai , that minimizes the least-squares fitting criterion m i=1 (f (xi ) − yi )2 . You must explain what the variables are and how they parametrize f , and how you ensure convexity of f . Hints. One method to solve this problem is based on the Lagrange basis, f0 , . . . , fK , which are the piecewise linear functions that satisfy fj (ai ) = δij , i, j = 0, . . . , K. Another method is based on defining f (x) = αi x + βi , for x ∈ (ai−1 , ai ]. You then have to add conditions on the parameters αi and βi to ensure that f is continuous and convex. 43 Apply your method to the data in the file pwl_fit_data.m, which contains data with xj ∈ [0, 1]. Find the best affine fit (which corresponds to a = (0, 1)), and the best piecewise-linear convex function fit for...
View Full Document

Ask a homework question - tutors are online