Questions tagged [convex-optimization]

Convex minimization, a subfield of optimization, studies the problem of minimizing convex functions over convex sets. The convexity property can make optimization in some sense "easier" than the general case - for example, any local minimum must be a global minimum.

Applications:

  • automatic control systems
  • estimation and signal processing
  • communications and networks,
  • electronic circuit design
  • data analysis and modeling
  • statistics
  • finance
305 questions
2
votes
2 answers

Semidefinite embedding in python based on cvxopt

I am trying to implement the semidefinite embedding algorithm (see here) in python based on the package cvxopt for solving semidefinite programming. I am having some problems mapping the definition of the semidefinite program to cvxopt's interface…
1
vote
1 answer

Minimizing 1/x such that x>=1 and x<=10 using CVXPY

I am trying to solve the following problem using CVXPY: # Define the variable x = cp.Variable() # Define the objective function objective = cp.Minimize(1/x) # Define the constraints constraints = [x >= 1, x <= 10] # Formulate the problem problem…
1
vote
0 answers

How do I avoid NaNs from CVXPY when optimizing L1 norm of entries of a 100x100 matrix?

I am trying to run an optimization using CVXPY for a large problem. I'm trying to optimize the L1 norm of some of the entries of a $100\times 100$ matrix, under constraints that restrict the set of feasible matrices to a $100(99)/2=4950$ dimensional…
xu_pi
  • 11
  • 2
1
vote
1 answer

Maximum Variance Unfolding with CVXPY

I am trying to reproduce the results from this paper (Weinberger and Saul, 2004, doi/10.5555/1597348.1597471), in which the authors use Maximum Variance Unfolding (MVU) to learn a low dimensional representation of a few distributions. The general…
1
vote
1 answer

CVXPY Quadratic Programming - ArpackNoConvergence error and AssertionError

I am trying to use the Python package CVXPY to solve a quadratic problem but I keep getting errors. Could you help me? Here is my code: p = lasso.p # This is a number Sigma_opt = lasso.Sigma_opt # This is a positive semi-definite matrix of shape…
1
vote
1 answer

CVXPY convex but getting DCP error for constraint y^2/x + z <= 1

Crossposted on Mathematics SE I have a convex objective function and a convex constraint of the form $y^2/x + z \leq 1$ on the domain $x \geq 0$. But I'm not sure how to encode this constraint in a way that cvxpy will accept it. It seems to be…
JEK
  • 11
  • 3
1
vote
1 answer

CVXR incorrectly claiming problem is infeasible?

I want to solve the following convex optimization problem, where b is a matrix of variables and p is a vector of variables. The matrix u is a matrix of fixed non-negative values. Here is my formulation in R, using the CVXR package. When I run it,…
grapher
  • 43
  • 4
1
vote
1 answer

How to use a parameter and its reciprocal in a CVXPY DPP?

In the following test program import cvxpy as cp def cp_log_ratio_norm(a, b): # Both `a * cp.inv_pos(b)` and `a / b` make this problem non-DPP return cp.maximum(a * b, b * cp.inv_pos(a)) var = cp.Variable(pos=True) param =…
Richard
  • 56,349
  • 34
  • 180
  • 251
1
vote
0 answers

Linear problem solving with matrix constraints in Rust

I am trying to rewrite a fairness ranking algorithm (source: https://arxiv.org/abs/1802.07281) from Python to Rust. The objective is finding a document-ranking probability matrix that is doubly stochastic and, by use of an utility vector (i.e. the…
Lowroad
  • 153
  • 1
  • 10
1
vote
1 answer

Python - portfolio opimisation using CVXPY - DCP rules not followed

I have a problem related to portfolio opimisation, I am trying to maximise an objective which is: say I have column A, and solution weights, my objective is to minimise the sum of [(weights - column A)^ 2 / column A], in other words, it's a problem…
1
vote
1 answer

Constraint of cvxpy: How to constrain only some elements of the variable to be nonzero?

I have a variable made of 961 elements. And I have a constraint like this: only 8 elements of the variable are nonzero, and the others are 0. I don't know how to express this constraint in cvxpy. I tried this: import cvxpy as cp K = cp.Variable(961,…
1
vote
1 answer

Computing the Analytic Center of a Polytope in Python

I have a polytope described by a set of inequalities and equalities that are given as numpy arrays. These arrays will usually be quite large, as they describe the LP-relaxation of an MIPLIB problem. I want to compute the analytic center of this…
1
vote
0 answers

DCP analysis rules for the constraints in CVXPY

Why is cvxpy.square(x) >= 0 in the constraints not DCP (disciplined convex programming; explicit rules can be found here), whereas the expression cvxpy.square(x) as an objective is DCP? A more general question would be: what role does >= play in the…
1
vote
0 answers

Optimal Way of Verifying a 3D Mesh Convex

There are numerous questions on stack overflow similar to this problem already, but most are creating a convex hull, or checking in 2D Space. I already have created an algorithm to create a 3D Convex Hull given the original Mesh's vertices, and…
1
vote
0 answers

CVXPY) Maximum diagonal entry of the inverse matrix

Currently what I am doing is: S(v) is a d-dimensional positive definite matrix determined by the d-dimensional vector v. I want to optimize the maximum diagonal entry of the inverse of S(v) subject to entrywise-sum of v equal to 1. (See…