Search results
It is also possible to characterize concavity or convexity of functions in terms of the convexity of particular sets. Given the graph of a function, the hypograph of f,
- 227KB
- 12
A function f : S ⊂ Rn → R defined on a convex set S is concave if for any two points x1 x2 ∈ , S and for any λ ∈ [0, 1] we have: λx1 (1 − λ) x2 ≥ λf(x1) (1 − λ)f(x2) + +. is called strictly concave if for any two points x1 , x2 ∈ S and for any λ ∈ (0, 1) we have: λx1 (1 − λ) x2 > λf(x1) (1 − λ)f(x2) + +.
- Stephen Boyd
- Outline
- Cone program solvers
- Transforming problems to cone form
- a typical modeling system
- Disciplined convex programming
- What CVX does
- Composition rules
- Sets
- Objectives and constraints
- Defining new functions
- − x, x < −1
Electrical Engineering Department Stanford University Convex Optimization, Boyd & Vandenberghe
cone program solvers modeling systems disciplined convex programming CVX (CVXPY, Convex.jl)
LP solvers many, open source and commercial cone solvers each handles combinations of a subset of LP, SOCP, SDP, EXP cones open source: SDPT3, SeDuMi, CVXOPT, CSDP, ECOS, SCS, . . . commercial: Mosek, Gurobi, Cplex, . . . you’ll write a basic cone solver later in the course
lots of tricks for transforming a problem into an equivalent cone program introducing slack variables introducing new variables that upper bound expressions these tricks greatly extend the applicability of cone solvers writing code to carry out this transformation is painful modeling systems automate this step
automates transformation to cone form; supports declaring optimization variables describing the objective function describing the constraints choosing (and configuring) the solver when given a problem instance, calls the solver interprets and returns the solver’s status (optimal, infeasible, . . . ) (when solved) transforms the solution back to ori...
describe objective and constraints using expressions formed from a set of basic atoms (affine, convex, concave functions) a restricted set of operations or rules (that preserve convexity) modeling system keeps track of affine, convex, concave expressions rules ensure that expressions recognized as convex are convex but, some convex expressions are ...
after cvx_end, CVX transforms problem into an LP calls solver SDPT3 overwrites (object) x with (numeric) optimal value assigns problem optimal value to cvx_optval assigns problem status (which here is Solved) to cvx_status (had problem been infeasible, cvx_status would be Infeasible and x would be NaN)
can combine atoms using valid composition rules, e.g.: a convex function of an affine function is convex the negative of a convex function is concave a convex, nondecreasing function of a convex function is convex a concave, nondecreasing function of a concave function is concave
some constraints are more naturally expressed with convex sets sets in CVX work by creating unnamed variables constrained to the set examples: semidefinite(n) nonnegative(n) simplex(n) lorentz(n) semidefinite(n), say, returns an unnamed (symmetric matrix) variable that is constrained to be positive semidefinite
objective can be minimize(convex expression) maximize(concave expression) omitted (feasibility problem) constraints can be convex expression <= concave expression concave expression >= convex expression affine expression == affine expression omitted (unconstrained problem)
can make a new function using existing atoms example: the convex deadzone function
deadzone makes sense both within and outside of CVX
- 92KB
- 29
Anatomy of a Function def main(): mid = average(10.6, 7.2) print(mid) def average(a, b): sum = a + b return sum / 2 Think/Pair/Share: Find the function definition, function name, parameter(s), and return value in average.
- 1MB
- 116
A single variable function f is said to be convex if f λx + (1−λ)y ≤ λf (x) +(1− λ) f (y), (1.1) for 0 < λ < 1. Problem 1.1. Execute the following python script. Is lnx convex or concave? import numpy as np import matplotlib . pyplot as plt # Plotting log ( x ) x = np . linspace (1 ,8 ,50)# points on the x axis f=np . log (x ...
A function f is strictly convex if the line segment connecting any two points on the graph of f lies strictly above the graph (excluding the endpoints). Consequences for optimization:
People also ask
Is concavity a necessary condition for a function?
Why are concave functions important?
How do we generalize concave functions?
Is F a concave function?
How do you analyze concavity if n 1 is separable?
How do you know if a function is concave or convex?
Concavity of a function is a sufficient condition for this property, but not a necessary one. We define a family of functions by the convexity of their upper-level sets. Such functions are called quasi-concave functions. They are general-ized concave functions, since it is easy to show that every concave function is quasiconcave, but not ...