Homework 1 (a and b) Convex Sets and Convex Functions

Similar documents
Lecture 2: August 29, 2018

Fall 2017: Numerical Methods I Assignment 1 (due Sep. 21, 2017)

Lecture 4: Convexity

Lecture 2: August 29, 2018

CS446: Machine Learning Fall Problem Set 4. Handed Out: October 17, 2013 Due: October 31 th, w T x i w

Convex Optimization MLSS 2015

Homework 3 Solutions

Lecture 2: August 31

Computational Machine Learning, Fall 2015 Homework 4: stochastic gradient algorithms

Convex Optimization / Homework 2, due Oct 3

Online Algorithm Comparison points

CSE 547: Machine Learning for Big Data Spring Problem Set 2. Please read the homework submission policies.

Homework /681: Artificial Intelligence (Fall 2017) Out: October 18, 2017 Due: October 29, 2017 at 11:59PM

Introduction to Machine Learning

General Instructions. Questions

Tutorial on Convex Optimization for Engineers

4.3, Math 1410 Name: And now for something completely different... Well, not really.

60 2 Convex sets. {x a T x b} {x ã T x b}

CS446: Machine Learning Spring Problem Set 1

Convexity I: Sets and Functions

CMU-Q Lecture 9: Optimization II: Constrained,Unconstrained Optimization Convex optimization. Teacher: Gianni A. Di Caro

Convexity Theory and Gradient Methods

CSE 21 Spring 2016 Homework 5. Instructions

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

CS675: Convex and Combinatorial Optimization Fall 2014 Convex Functions. Instructor: Shaddin Dughmi

Machine Learning and Computational Statistics, Spring 2016 Homework 1: Ridge Regression and SGD

Lecture 19: Convex Non-Smooth Optimization. April 2, 2007

HMC CS 158, Fall 2017 Problem Set 3 Programming: Regularized Polynomial Regression

CS2223: Algorithms D- Term, Homework I. Teams: To be done individually. Due date: 03/27/2015 (1:50 PM) Submission: Electronic submission only

Homework 4: Clustering, Recommenders, Dim. Reduction, ML and Graph Mining (due November 19 th, 2014, 2:30pm, in class hard-copy please)

DOWNLOAD PDF BIG IDEAS MATH VERTICAL SHRINK OF A PARABOLA

Introduction to Modern Control Systems

Image warping , , Computational Photography Fall 2017, Lecture 10

Homework #5 Algorithms I Spring 2017

Shiqian Ma, MAT-258A: Numerical Optimization 1. Chapter 2. Convex Optimization

Mathematical Programming and Research Methods (Part II)

Lecture 2 - Introduction to Polytopes

CS261: Problem Set #2

EC422 Mathematical Economics 2

2. A Bernoulli distribution has the following likelihood function for a data set D: N 1 N 1 + N 0

18.02 Final Exam. y = 0

Convexity and Optimization

CSE 21 Spring 2016 Homework 5. Instructions

CSCI 2200 Foundations of Computer Science (FoCS) Homework 6 (document version 1.0) This homework is due by 11:59:59 PM on Friday, March 23, 2018.

2 Geometry Solutions

Homework 2. Sample Solution. Due Date: Thursday, May 31, 11:59 pm

Homework 6: Pose Tracking EE267 Virtual Reality 2018

Homework 2. Due: March 2, 2018 at 7:00PM. p = 1 m. (x i ). i=1

CPSC 340: Machine Learning and Data Mining. Robust Regression Fall 2015

Convex sets and convex functions

Lecture 5: Properties of convex sets

Machine Learning for Signal Processing Lecture 4: Optimization

Optimization. Industrial AI Lab.

CSC 418/2504 Computer Graphics, Winter 2012 Assignment 1 (10% of course grade)

CSE 252A Computer Vision Homework 3 Instructor: Ben Ochoa Due : Monday, November 21, 2016, 11:59 PM

Convex Optimization Lecture 2

Domain Specific Languages for Convex Optimization

Lecture VIII. Global Approximation Methods: I

Machine Learning and Computational Statistics, Spring 2015 Homework 1: Ridge Regression and SGD

No more questions will be added

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel.

Programming Exercise 3: Multi-class Classification and Neural Networks

Exercise 1: Tail Sum of Squares (2 points) Homework 3 READ THIS BEFORE YOU BEGIN:

Symbolic Subdifferentiation in Python

EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling

CS 4800: Algorithms & Data. Lecture 1 January 10, 2017

Chapter 3 Numerical Methods

CS103 Handout 13 Fall 2012 May 4, 2012 Problem Set 5

minimise f(x) subject to g(x) = b, x X. inf f(x) = inf L(x,

Lecture 3: Convex sets

Unconstrained Optimization

Convex sets and convex functions

AQA GCSE Further Maths Topic Areas

Math 250A (Fall 2009) - Lab I: Estimate Integrals Numerically with Matlab. Due Date: Monday, September 21, INSTRUCTIONS

Introduction to CVX. Olivier Fercoq and Rachael Tappenden. 24 June pm, ICMS Newhaven Lecture Theatre

Tangents of Parametric Curves

Convexity and Optimization

Gradient and Directional Derivatives

MA 323 Geometric Modelling Course Notes: Day 21 Three Dimensional Bezier Curves, Projections and Rational Bezier Curves

CPSC 121: Models of Computation Assignment #5

Convexization in Markov Chain Monte Carlo

CS 374 Fall 2014 Homework 2 Due Tuesday, September 16, 2014 at noon

Neural Nets. General Model Building

CS 161 Computer Security

Algebra 2 Honors Lesson 10 Translating Functions

Homework No. 6 (40 points). Due on Blackboard before 8:00 am on Friday, October 13th.

Intensity Transformations and Spatial Filtering

College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007

Differential Geometry: Circle Patterns (Part 1) [Discrete Conformal Mappinngs via Circle Patterns. Kharevych, Springborn and Schröder]

Chapter III.C Analysis of The Second Derivative Draft Version 4/19/14 Martin Flashman 2005

Math 2250 Lab #3: Landing on Target

18.02 Multivariable Calculus Fall 2007

Lec13p1, ORF363/COS323

Problem Set 4 Solutions

Problem Pts Score Grader Problem Pts Score Grader

Introduction to Computer Graphics and Computer Vision Assignment 3: Due 7/27/2015

Alternating Projections

Numerical Optimization

Homework 4 Solutions

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017

Transcription:

Homework 1 (a and b) Convex Sets and Convex Functions CMU 10-725/36-725: Convex Optimization (Fall 2017) OUT: Sep 1 DUE: Prob 1-3 Sep 11, 5:00 PM; Prob 4 Sep 15, 5:00 PM START HERE: Instructions Collaboration policy: Collaboration on solving the homework is allowed, after you have thought about the problems on your own. It is also OK to get clarification (but not solutions) from books or online resources, again after you have thought about the problems on your own. There are two requirements: first, cite your collaborators fully and completely (e.g., Jane explained to me what is asked in Question 3.4 ). Second, write your solution independently: close the book and all of your notes, and send collaborators out of the room, so that the solution comes from you only. Submitting your work: Assignments should be submitted as PDFs using Gradescope unless explicitly stated otherwise. Each derivation/proof should be completed on a separate page. Submissions can be handwritten, but should be labeled and clearly legible. Else, submissions can be written in LaTeX. Upon submission, label each question using the template provided by Gradescope. Please refer to Piazza for detailed instruction for joining Gradescope and submitting your homework. Programming: All programming portions of the assignments should be submitted to Gradescope as well. We will not be using this for autograding, meaning you may use any language which you like to submit. 1

Problem 1: Convex Set (Hongyang - 20 pts) 1. [5pts] (Definition of convexity) Denote by C R n a convex set. Let x 1,..., x k C, and θ 1,..., θ k R satisfy θ i 0 and k i=1 θ i = 1. Show that θ 1 x 1 +... + θ k x k C for arbitrary k (Recall that in the class, we define the convexity by the case of k = 2.) 2. (Example of convex set) (a) [5pts] Show that if a, b 0 and 0 θ 1, then a θ b 1 θ θa + (1 θ)b. Hint: Use concavity of log functions. (b) [5pts] Show that S n = {x R n + n i=1 x i 1} is convex. 3. [5pts] (Operations that preserve convexity) Suppose that S 1 and S 2 are convex sets in R m+n. Show that their partial sum is a convex set. S = {(x, y 1 + y 2 ) x R m, y 1, y 2 R n, (x, y 1 ) S 1, (x, y 2 ) S 2 } 2

Problem 2: Convex Functions (Devendra - 20 pts) 1. [5pts] Suppose that a non-convex function f(x) is given as a sum of terms of the form g : R++ n R, g(x) = βx α1 1..xαn n, β > 0, α i R. Show that the substitution y i = log x i can transform f(x), into a into a convex function in y. (Hint: Use a simple example such as f(x 1, x 2 ) = x 2 1 + (x 1 x 2 ) 1 3 + 2x 4 2, x 1 > 0, x 2 > 0 to prove the claim and then generalize it) 2. Show that the following functions are convex [5pts] f : R++ n R, f(x) = n i=1 x i log x i, such that n i=1 x i = 1. This is also called negative entropy function. [5pts] f : R n ++ R, f(x) = ( n i=1 xa i ) 1 a, given that a < 1, a 0. [5pts] f : R + R f(x) = { 1 x x 0 g(y)dy if x > 0 0 if x = 0 given that g : R + R is a convex, non-negative function and g(0) = 0. 3

Problem 3: Lipschitz gradients and strong convexity (Yifeng - 30 pts) Let f be convex and twice differentiable. 1. [6pts] Prove the monotonicity of gradient f, i.e., f is convex if and only if ( f(x) f(y)) T (x y) 0, for all x, y. (Note: Feel free to use this property in the proof of problem 2 or 3 if necessary.) 2. [12pts] (Smoothness of f) Show that the following statements are equivalent. i. f is Lipschitz with constant L; ii. ( f(x) f(y)) T (x y) L x y 2 2 for all x, y; iii. 2 f(x) LI for all x; iv. f(y) f(x) + f(x) T (y x) + L 2 y x 2 2 for all x, y. 3. [12pts](Curvature of f) Show that the following statements are equivalent. i. f is strongly convex with constant m; ii. ( f(x) f(y)) T (x y) m x y 2 2 for all x, y; iii. 2 f(x) mi for all x; iv. f(y) f(x) + f(x) T (y x) + m 2 y x 2 2 for all x, y. 4

Programming Problem: Solving optimization problems with CVX (Hao - 30 pts) CVX is a fantastic framework for disciplined convex programming - its rarely the fastest tool for the job, but its widely applicable, and so its a great tool to be comfortable with. In this exercise, we will set up the CVX environment and solve a convex optimization problem. In this class, your solution to coding problems should include plots and whatever explanation necessary to answer the questions asked. In addition, full code should be submitted as an appendix to the homework document. CVX variants are available for each of the major numerical programming languages. There are some minor syntactic and functional differences between the variants but all provide essentially the same functionality. The Matlab version (and by extension, the R version which calls Matlab under the covers) is the most mature but all should be sufficient for the purposes of this class. Download the CVX variant of your choosing: Matlab - http://cvxr.com/cvx/ Python - http://www.cvxpy.org/en/latest/ Julia - https://github.com/juliaopt/convex.jl R - http://faculty.bscb.cornell.edu/ bien/cvxfromr.html and consult the documentation to understand the basic functionality. To feel comfortable with CVX, make sure that you can solve the least squares problem for a vector y and matrix X. Check your answer by comparing with the analytic least squares solution. You do not need to submit answers for the least squares part. The following will be graded. 1. Using CVX, we can solve the SVM model discussed in Lecture 1: min w,b w 2 + C ( 1 (w T ) x i + b)y i (x i,y i) E The set E is the set of data points in the training set. a) [9pts] Load the training set from train.csv and solve the SVM model with C = 1. Report the objective value obtained at the solution. Load the test set from test.csv and use the trained SVM model to predict the class of each data point. Report the error rate of SVM on the train and test set. b) [6pts] Next, we consider how the solution changes as we vary C. Use the same data set as (1) and solve the SVM model for this training set for C {10 k/2 : k = 8,..., 3, 2, 1, 0, 1, 2, 3,..., 8}. Plot the curve of train and test error rate with the varying C. What changes in test error you can observe with varying C? 2. [15pts] Disciplined convex programming or DCP is a system for composing functions while ensuring their convexity. It is the language that underlies CVX. Essentially, each node in the parse tree for a convex expression is tagged with attributes for curvature (convex, concave, affine, constant) and sign (positive, negative) allowing for reasoning about the convexity of entire expressions. The website http://dcp.stanford.edu/ provides visualization and analysis of simple expressions. Typically, writing problems in the DCP form is natural, but in some cases manipulation is required to construct expressions that satisfy the rules. For each set of mathematical expressions below, give equivalent DCP expressions and specify whether this equation or inequality defines a convex set. DCP expressions should be given in a form that passes analysis at http://dcp.stanford. edu/analyzer. (a) (x, y) 3 1 5x + 7y (b) 2 x + 9 z y 3, x > 0, y < z +. 5

(c) max(x, y, z) < 2 x, x > 0 ) (d) log (e 3 x + e 2z e 5y, x 0 (e) (2x 3y, y + x) 1 = 0 6