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
3
votes
1 answer

Minimising log function in cvxpy

I am trying to simulate an exact line search experiment using CVXPY. objective = cvx.Minimize(func(x+s*grad(x))) s = cvx.Variable() constraints = [ s >= 0] prob = cvx.Problem(objective, constraints) obj = cvx.Minimize(prob) (cvxbook byod…
Krishna Kalyan
  • 1,672
  • 2
  • 20
  • 43
3
votes
1 answer

CVXOPT L1 norm approximation - Illegal value of ldB

Following the example on L1 norm approximation given here, with the following code, from l1 import l1 from cvxopt import normal m, n = 500, 100 P, q = normal(m,n), normal(m,1) u = l1(P,q) everything works okay. However when I change m to be…
3
votes
3 answers

How to implement convex optimization package?

I fully realize that Convex Optimization packages, like Linear Algebra packages, should be things you use, not implement. However, for purely education purposes -- is there any good resource -- link / book on how to implement a convex optimization…
anon
  • 41,035
  • 53
  • 197
  • 293
3
votes
1 answer

Using fminunc function

I am trying to use the fminunc function for convex optimization. However, in my case I am taking the gradient with respect with logx. Let my objective function be F. Then the gradient will be dF/dx = (dF/dlogx) * (1/x) = > dF/dlogx = (dF/dx) *…
rajan sthapit
  • 4,194
  • 10
  • 42
  • 66
2
votes
1 answer

Fminunc returns indefinite Hessian matrix for a convex objective

In minimizing a convex objective function, does it mean that the Hessian matrix at minimizer should be PSD? If fminunc in Matlab returns a hessian which is not psd what does it mean? am I using a wrong objective?
2
votes
2 answers

Two matrix multiplication operations in CVXPY gives UNKNOWN curvature and makes the problem not DCP

I want to solve the following optimization problem using cvxpy: Maximize(y @ A @ x) where A is a (n,m)-size matrix of positive valued elements; x is boolean vector of is length m; y is boolean vector is length n. The constraints are: sum(x)==1 and…
2
votes
3 answers

feasiblity problem in CPLEX

Is there an api to solve the feasibility problem (whether a feasible point exists) for a set of convex restraints in CPLEX.
2
votes
0 answers

Python - solving for risk budget portfolio using cvxpy

I'm looking to write a set of code that allows me to set risk budget constraints to individual positions in a portfolio, i.e. each position to contribute a set amount of risk to the portfolio, and I'm looking to do it specifically in CVXPY as I have…
Dazz W
  • 113
  • 8
2
votes
0 answers

Errors in computing the Euclidian distance between point and convex polytope using cvxpy

I am trying to find the euclidian distance between a d-dimensional polytope defined as A x <= b and a point, called point in the code below, that I am certain is outside of the polytope. This is a convex quadratic minimization problem. I would like…
Patrickens
  • 321
  • 3
  • 14
2
votes
1 answer

TypeError: tri() missing 1 required positional argument: 'N'

I can't get past the error: > --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () 7 d_unpair =…
2
votes
2 answers

cvxpy is solving to produce empty answer

I am working with the following code: import sys, numpy as np import cvxpy as cvx if __name__ == '__main__': sims = np.random.randint(20, 30, size=500) center = 30 n = [500, 1] # minimize p'*log(p) # subject to # …
Zanam
  • 4,607
  • 13
  • 67
  • 143
2
votes
0 answers

Mixed integer semi-definite programming (MISDP) solvers in Python

It just came to my realization that MOSEK does not support mixed-integer convex programming (MICP) problems when there are semi-definite constraints. Wrapper functions are available in MATLAB (YALMIP) and Julia (Pajarito). I was wondering whether…
mmy_ubc
  • 21
  • 1
2
votes
2 answers

Finding the Hessian matrix of this function

Hi I have the following function: sum from 1 to 5000 -log(1−(xi)^2) -log(1-(a_i)^t*x), where a_i is a random vector and we are trying to minimize this function's value via Netwon's method. I need a way to calculate the Hessian matrix with respect to…
2
votes
0 answers

In CVXR, how to use an external c++ function?

I am using CVXR to code a penalized linear regression. My global loss is composed of 4 elements: two differents SSE losses loss_u, loss_b on two different data sets, a ridge penalty and a specific distance D. The code works if I use the 'distance ==…
Malex
  • 41
  • 4
2
votes
1 answer

CVXPY returns Infeasible/Inaccurate on Quadratic Programming Optimization Problem

I am trying to use CVXPY to solve a nonnegative least squares problem (with the additional constraint that the sum of entries in the solution vector must equal 1). However, when I run CVXPY on this simple quadratic program using the SCS solver, I…
1 2
3
20 21