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
5
votes
2 answers

Local and global minima of the cost function in logistic regression

I'm misunderstanding the idea behind the minima in the derivation of the logistic regression formula. The idea is to increase the hypothesis as much as possible (i.e correct prediction probability close to 1 as possible), which in turn requires…
5
votes
0 answers

Julia - Optimisation of Complex Valued Variable

I'm trying to solve a simple optimisation problem, we want to have a complex valued hermitan matrix as it's variable (topic is quantum mechanics) using Convex #load the optimization solvers using SCS # define pauli-y+ projector # by construction a…
5
votes
1 answer

Convex optimixation with cvxopt in python with complex coefficients

I am trying to solve a convex optimization problem wherein the coefficients can be complex. The native implementation in cvxopt QP doest not seem to support that. I always get the following error: TypeError: 'q' must be a 'd' matrix with one…
5
votes
1 answer

Check constraints are ok in cvxpy with actual values

When solving optimisation problems in cvxpy, is there a nice way to check that the constraints are valid by substituing in actual values for the optimisation variables? I have a complicated optimisation problem (100+ constraints), but I know what…
mjeppesen
  • 1,040
  • 1
  • 10
  • 14
5
votes
1 answer

Minimization of L1-Regularized system, converging on non-minimum location?

This is my first post to stackoverflow, so if this isn't the correct area I apologize. I am working on minimizing a L1-Regularized System. This weekend is my first dive into optimization, I have a basic linear system Y = X*B, X is an n-by-p matrix,…
4
votes
0 answers

Violated constraint in CVXPY

I have a problem that can sometimes be infeasible. The desired behaviour is relax the constraint that was violated and continue, but alert the user that a constraint was violated. I noticed that CVXPY 1.0 has a new violation() method that looks to…
swmfg
  • 1,279
  • 1
  • 10
  • 18
4
votes
0 answers

L1 convex optimization with equality constraints in python

I need to minimize L_1(x) subject to Mx = y. x is a vector with dimension b, y is a vector with dimension a, and M is a matrix with dimensions (a,b). After some reading I determined to use scipy.optimize.minimize: import numpy as np from…
kevinkayaks
  • 2,636
  • 1
  • 14
  • 30
4
votes
4 answers

How to calculate weight to minimize variance?

given several vectors: x1 = [3 4 6] x2 = [2 8 1] x3 = [5 5 4] x4 = [6 2 1] I wanna find weight w1, w2, w3 to each item, and get the weighted sum of each vector: yi = w1*i1 + w2*i2 + w3*i3. for example, y1 = 3*w1 + 4*w2 + 6*w3 to make the variance…
MarStarck
  • 433
  • 7
  • 14
4
votes
2 answers

Why does CVXOPT give a rank error for this nonlinear network flow optimisation?

I'm considering using cvxopt to solve some nonlinear network flow optimisation problems. In order to understand the basics, I am trying it with a very simple test network with just 4 vertices and 5 edges. My network looks like this. The blue and…
4
votes
1 answer

Are there any fixed relationships between mini batch gradient decent and gradient decent

For convex optimization, like as logistic regression. For example I have 100 training samples. In mini batch gradient decent I set batch size equal to 10. So after 10 times of mini batch gradient decent updating. Can I get the same result with one…
Samuel
  • 5,977
  • 14
  • 55
  • 77
4
votes
3 answers

Getting more details from optim function from R

I'm not very familiar with the optim function, and I wanted to get these informations from its results: a) how many iterations were needed for achieving the result? and b) to plot the sequence of partial solutions, that is, the solution obtained in…
gcolucci
  • 438
  • 1
  • 5
  • 21
3
votes
2 answers

The largest aligned rectangular with fixed aspect ratio in an arbitrary convex polygon?

How to calculate the width / height of the largest aligned rectangular with fixed aspect ratio in an arbitrary convex polygon? The examples of such rectangles (red) in the different convex polygons (black) are presented on this image: . I found…
3
votes
0 answers

matrix exponential in cvxpy

I am trying to implement the following convex-optimization problem in cvxpy: A = a given matrix of dimension dim x dim B = a given matrix of dimension dim x dim X = cp.variable((dim, dim)) distance = cp.norm(exp(X)-A, 'fro') delta= some…
EmFed
  • 31
  • 2
3
votes
0 answers

How to define parameters which change value depending on variable in CXYPY

I'm trying to solve a convex optimisation problem using CVXPY. I've values x, y which are 150 and 60. These are the initial demand of 2 timeslots. The objective is to minimise the total cost. Total cost = x * price1 + y * price2 + penalty Penalty =…
3
votes
4 answers

Polygon Decomposition - Removing Concave Points to Form Convex Polygons

I would like to deconstruct the following polygon shown in blue removing all of the points from the polygon that cause concavity. Currently, what I have been attempting to do is: Take each point out of the polygon Test the point to see if it falls…
1
2
3
20 21