Docsity

Optimizing Convex and Linear Functions: Convex Optimization and Unconstrained Optimization, Quizzes of Computer Science

Partial preview of the text

Download Optimizing Convex and Linear Functions: Convex Optimization and Unconstrained Optimization and more Quizzes Computer Science in PDF only on Docsity!

CSE 6740 Lecture 18

How Do I Optimize Convex/Linear Functions?

(Unconstrained Linear Optimization)

Alexander Gray [email protected] Georgia Institute of Technology CSE 6740 Lecture 18 – p.1/

Quiz Answers

1. Newton’s method requires the second derivative of the

function. T.

2. Levenberg-Marquardt is for sum-of-squares functions.

T.

3. The EM algorithm is for latent-variable functions. T.

CSE 6740 Lecture 18 – p.2/

Convex OptimizationProblems Problems with a convex objective function and, if there areconstraints, convex constraints.

CSE 6740 Lecture 18 – p.4/

Convex Functions

It used to be that optimization was divided into linear andnonlinear objective functions. Now the distinction isbetween convex and non-convex functions.A

convex set

C

has the property that for any two points

x 1

and

x 2

in

C

α

, a line segment

αx 1

α

x 2

C.

(1)

A

convex function

f

has the property that

dom f

, the domain

of

f

, is a convex set and for any two points in

dom f

f

αx 1

α

x 2

αf

x 1

α

f

x 2

(2)

This inequality is often called

Jensen’s inequality

f

is

concave

if

f

is convex.

CSE 6740 Lecture 18 – p.5/

Convex Functions

Suppose

f

is differentiable (its gradient

f

exists at each

point in

dom f

). Then

f

is convex iff

dom f

is convex and for

any two points in

dom f

f

x 2

f

x 1

f

x 1

T

x 2

x 1

(3)

Thus, if

f

x

, then for all

˜x

dom f

f

˜x

f

x

i.e.

x

is a

global

minimizer of

f

. This is what makes convex

functions special.If

f

is twice differentiable,

f

is convex iff

dom f

is convex and

its Hessian is positive definite (for all

x

dom f

2 f

x

or in 1 dimension,

f ′′

x

CSE 6740 Lecture 18 – p.7/

Least-Squares

Consider the least-squares problem

Find

x ∗ = arg min x ∈ R D

Ax

b

2 2

x T

A

T Ax

b T Ax

b T b. (4)

This is quadratic and unconstrained.It can be solved analytically as

x ∗

A

− 1 b

. So this is a

special “easy” case.

CSE 6740 Lecture 18 – p.8/

General Form

From now on, “convex optimization” refers to problemshaving convex objective functions and convex constraints.For such problems, we can find the global minimum, inpolynomial time.Recall the general form for an optimization problem:

Find

x ∗ = arg min x ∈ R D f

x

(6)

subject to

c i

x

i

,... , M

(7) d i

x

i

,... , N.

(8)

The domain is the intersection of the domains of theconstraint functions. A point is

feasible

if it satisfies the

constraints.

CSE 6740 Lecture 18 – p.10/

Unconstrained Optimization:Linear Algebraic Computational linear algebra can be seen as a special caseof unconstrained optimization that is very well-studied.

CSE 6740 Lecture 18 – p.11/

Types of Matrices

There are several special cases of matrices for which thereare often faster custom methods:

banded (diagonal, tridiagonal, triangular, Hessenberg...) block symmetric (

A

T

A

definite (positive, semi-) Vandermonde Toeplitz

Mostly, these allow different matrix decompositions, whichlead to different types of solutions.

CSE 6740 Lecture 18 – p.13/

Types of Matrices

These lead to implicit storage, and matrix multiplication:

sparse kernel

Examples:

Covariance matrices: symmetric positive definite,sometimes diagonal. AR models: Toeplitz. Kernel PCA: kernel matrix, or sparse.

CSE 6740 Lecture 18 – p.14/

Least Squares Problem

This has the form

min x

Ax

b

2

(13)

In linear algebra this is the standard linear

least-squares

problem

This is basically solving

Ax

b

when the system is

overdetermined

(more equations than unknowns). It can be

put in the form of

A

′ x

b ′^

with square

A

′^

as

A

T

A

x

A

T b, (14)

called the

normal equations

of the least-squares problem.

CSE 6740 Lecture 18 – p.16/

Optimization Form

Consider the linear system

Ax

b

. Assume for the moment

that

A

is symmetric and positive definite (thus square). Let’s

consider the best solution to the quadratic form

φ

x

x T Ax

x T b. (15)

Then the minimizer

x ∗

is exactly the solution to

Ax

b

CSE 6740 Lecture 18 – p.17/

Optimization Form

More simply, looking at the derivative we find that

φ

Ax

b. (19)

Clearly the only point at which the gradient is zero is thesolution of

Ax

b

. So the problem

Ax

b

can be written as

the optimization problem

φ

x

1 2 x T Ax

x T b

CSE 6740 Lecture 18 – p.19/

Steepest Descent

At the current guess

x k

, the function

φ

decreases most

rapidly in the direction of the negative gradient: −∇

φ

x k

b

Ax k

. If the

residual

r k

b

Ax k (20)

of

x k

is nonzero, there exists a positive

α

such that

φ

x k

α k r k

< φ

x k

The residual gives us our search direction,

p k

r k

. Now we

need the step size

α k

; determining it is called

line search

CSE 6740 Lecture 18 – p.20/