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
1
vote
1 answer

Solving linear regression minimizing quadratic cost

I want to solve linear regression in the following way When I try with minimizing the sum of cost it works fine, import cvxpy as cp import numpy as np n = 5 np.random.seed(1) x = np.linspace(0, 20, n) y = np.random.rand(x.shape[0]) theta =…
GPrathap
  • 7,336
  • 7
  • 65
  • 83
1
vote
0 answers

Solving SDP problem with cvx - difference between MATLAB and R solution

I solved the following Linear Matrix Inequality (LMI) problem using cvx in Matlab: Lhs = [19.467593196, 1.82394007, 0.1625838, 0.01685267, 0.002495194; 1.823940068, 1.78664305, 0.9845668, 0.32951706, 0.010431878; 0.162583843, 0.98456679, 1.2333818,…
momomi
  • 23
  • 9
1
vote
0 answers

LBFGS: Accuracy of Hessian approximation

Does anybody know how useful LBFGS is for estimating the Hessian matrix in the case of many (>10 000) dimensions? When running scipy's implementation on a simple 100D quadratic form the algorithm does already seem to struggle. Are there any general…
1
vote
1 answer

Using cvxpy to solve a lasso like problem

It's not entirely lasso because I add an extra constraint but I'm not sure how I'm supposed to solve a problem like the following using cvxpy import cvxpy as cp import numpy as np A = np.random.rand(5000,1000) v0 = np.random.rand(1000,1) v =…
financial_physician
  • 1,672
  • 1
  • 14
  • 34
1
vote
1 answer

cvxpy + mosek: The lower bound specified is not a number (nan)

In below code snippet I am trying to do a very simple linear regression using cvxpy and mosek solver weight = df2['weight'].to_numpy() A = df2[ regressors ].to_numpy() x = cp.Variable(len(regressors )); R = df2['y'].to_numpy() cost = cp.sum_squares(…
1
vote
1 answer

CVXPY error when trying to solve a convex minimization / binary programming problem

I'm trying to solve a problem that I submitted to QSE, https://quant.stackexchange.com/questions/65680/find-k-of-n-assets-that-minimize-the-correlation-matrix/, but I'm running into an issue using the cvxpy lib. Namely, what I believe to be a…
1
vote
1 answer

Match two sets of objects

I am trying to figure out how to solve the following problem with a program: I have a set of objects A = [Ai] and another set of objects B = [Bj]. I also have a matrix C=[cij] calculating the similarity between A and B (which is fully dense). I want…
ysig
  • 447
  • 4
  • 18
1
vote
2 answers

Piecewise Linear Functions in CVXPY

I have a convex optimization problem with separable, convex, piecewise linear functions f_i(var_i) each defined by a list of points [(values, costs)] and a couple other terms that are also convex. I'm trying to figure out how two build those…
rhaskett
  • 1,864
  • 3
  • 29
  • 48
1
vote
1 answer

How to construct a SOCP problem and solve using cvxpy and cvxpylayers

I'm trying to solve a SOCP problem using cvxpy and integrating it to cvxpylayers. I'm looking at this SOCP problem (problem 11) (here is the scihub link in case you can't access), and here is a snippet of the problem (note min (p-t) comes from an…
ben
  • 159
  • 1
  • 4
  • 15
1
vote
0 answers

How can I solve this optimization problem using MATLAB CVX?

I used the following code to solve this problem %System parameters: N = 2; K = 8; M = 4; C_l=4; H = [0.1185 0.2811; 0.3550 0.8224; 0.3260 0.9644; 0.5333 0.6083; 0.6871 0.2298; 0.2594 0.8361; 0.1309 0.2454; 0.4715 0.2111]; %(K,N) matrix A = [-1 1; 1…
1
vote
0 answers

Closed form of convex optimization problem by using Least Squares Methods

I want to solve below optimization problem by using Least Squares methods. where is unknown convex function (e.g. ) and is convolution operator I want to know the closed form of above optimization problem by using Least Square Methods, but there…
1
vote
1 answer

Best way to do convex optimization in Haskell?

I'm looking to do some simple convex optimization in Haskell; nothing too fancy, just minimizing linear functions with some quadratic constraints. I've come across HVX and am just wondering if that is the best package for this purpose or if there is…
zjs
  • 327
  • 1
  • 9
1
vote
1 answer

Write Dirichlet Log Likelihood with DCP ruleset

I would like to write the log likelihood of the Dirichlet density as a disciplined convex programming (DCP) optimization problem with respect to the parameters of the Dirichlet distribution alpha. However, the log likelihood def…
Jon Deaton
  • 3,943
  • 6
  • 28
  • 41
1
vote
0 answers

Euclidean distance in convex constraint & optimization

Beginner style, general question regarding convex optimization. As part of the learning cvxpy specifically, and convex optimization in general, was trying a basic (imaginary) geometry (hopefully convex) optimization problem. Given two points in 2D…
1
vote
0 answers

what is the solution of the following optimization problem with linear and non linear constraints?

min x subject to: zeta_1>=b zeta_2>=h t*log(1+m_b*zeta_1)>=t_bh (1-t)*log(1+t*m_h*zeta_2)>=t_hb 0<=t<=1 ||y||=1, where zeta_1=(|transpose(a)*y|^2)*x, zeta_2= (|transpose(c)*y|^2)*x. m_b…
new
  • 23
  • 3