Search results
Definition 1. 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
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
May 22, 2024 · Concavity provides valuable insights into how a function curves, distinguishing between concave upward and concave downward shapes, while points of inflection mark locations where the curvature changes sign.
Math 260: Python programming in math. Fall 2020. Finite di erences: Boundary value problems and PDEs Here's an example of a linear algebra problem (with some ODE context)... Suppose we want to solve, for y(x), the boundary value problem y00 y = x; y(0) = 1; y(1) = e 1.
People also ask
Why is concavity important in mathematics?
How do you analyze concavity if n 1 is separable?
Is f g a concave function?
How do you know if a function is concave?
Is 0 1 A quasiconcave function?
Does Ty hold if f is concave?
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 ...