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
0
votes
0 answers

cvxpy solve attribute returns none

I have written the following code import cvxpy import numpy as np def missingMat(A, mask):##true and false for known and missing entries M=np.array(A) for i in range(0, mask.shape[0]): for j in range(0, mask.shape[1]): …
Manish Bhanu
  • 53
  • 10
0
votes
1 answer

'sum_entries / axis' related error

I am new to cvxpy and would be grateful for your help with the following issue. I wrote the following simple optimization code: import cvxpy as cvx import numpy as np m = 4 n = 3 c = np.array([[2, 3, 0], [4, 0, 5], [2, 3, 4], [5, 0, 3]]) s =…
yavigol
  • 1
  • 1
0
votes
1 answer

Is negative quadratic function quasiconvex

I read in book (Convex Optimization, boyd) that quasiconvex (or unimodal) if its domain and all its sublevel sets Sα = {x ∈ dom f | f(x) ≤ α}, for α ∈ R, are convex. And if and only if f(x) is non-decreasing or non-increasing, f(x) is…
Newb
  • 111
  • 8
0
votes
0 answers

Minimum jerk trajectory with CVXPY

I am trying to numerically solve the problem of generating a 1D minimum jerk trajectory using cvxpy (version 0.4.9). Here is the basic statement of the problem, 'x' is the vector of position as a function of time. 'D' is the matrix for calculating…
siva82kb
  • 1,910
  • 4
  • 19
  • 28
0
votes
1 answer

Package CVXR: Error in as.vector(data): no method for coercing this S4 class to a vector

I am trying to use the package CVXR to do my optimization. I am following the instructions from this page: https://rviews.rstudio.com/2017/11/27/introduction-to-cvxr/ My problem is a little complicated to I want to put my coefficient variables (the…
TDo
  • 686
  • 4
  • 9
  • 22
0
votes
1 answer

is there a simpler, early termination condition in primal dual algorithm for constrained quadratic function

Currently, I'm using a primal-dual method to minimize a quadratic problem with simple linear constraints (specifically, x >= 0). For the termination condition, I'm currently using the standard: ie error "e" term must be less than a threshold…
0
votes
1 answer

How to find the complexity of solving a 0-1 second order cone programming?

I have a 0-1 second order cone (SOC) problem and I need to know the complexity of solving this problem if branch and cut (B&C) method is used?. The way I addressed this question is as following: The 0-1 SOC problem can be solved using B&C method…
0
votes
1 answer

Cannot impose a constraint of positive semi-definiteness on a matrix variable in PICOS optimization

I am trying to solve the following semi-definite program using Picos package. In fact, this is a SDP relaxation for solving the maxcut problem for the case of 3 subgraphs. import picos as pic maxcut = pic.Problem() …
0
votes
1 answer

Python Quadratic Programming with CVXOPT

I am looking for a definitive guide on formulating a CVXOPT quadratic programming problem with quadratic constraints. There are good documents provided here: The problem statement I am dealing with is identical to the problem here: What is the…
Jared
  • 3,651
  • 11
  • 39
  • 64
0
votes
3 answers

Sub Gradient of One Dimensional Least Absolute Difference / Deviation (LAD)

I am trying to solve the following one-dimensional least absolute difference (LAD) optimization problem and I am using bisection method to find the best beta (a scalar). I have the following code: import numpy as np x = np.random.randn(10) y =…
Jing
  • 895
  • 6
  • 14
  • 38
0
votes
1 answer

Why my batch gradient descent for linear regression don't converge?

I want to write a LinearRegression model similar to sklearn.linear_model.LinearRegression. To start with, I train a standard linear regression model using sklearn.linear_model.LinearRegression: import numpy as np import matplotlib.pyplot as plt from…
0
votes
2 answers

Constraint functions on FMIN_COBYLA (scipy optimize)

I'm on Scipy Optimize, using the fmin_cobyla function. I've struggled to write constraint functions that: make sure all items sum up to 1 make sure all items >= 0 Does anyone have insight? For fmin_slsqp, for example, I had a function: def…
0
votes
0 answers

How to leverage Convex Optimization for Portfolio Optimization in Julia

I'm trying to use Julia (0.5) and Convex.jl (with ECOS solver) to figure out, given a portfolio of 2 stocks, how can I distribute my allocations (in percent) across both stocks such that I maximize my portfolio return and minimize my risk (std dev…
bauhaus9
  • 181
  • 1
  • 12
0
votes
1 answer

Fast CVX solvers in Matlab

I am wondering what is the fastest convex optimizer in Matlab or is there any way to speed up current solvers? I'm using CVX, but it's taking forever to solve the optimization problem I have. The optimization I have is to solve minimize norm(Ax-b,…
Erin
  • 177
  • 3
  • 14
0
votes
0 answers

Finding largest Rectangles in Images, through Optimization

The problem: I have a binary image, with multiple objects. I need to find a way to fit the largest possible Square in these irregular objects. see image attached below I tried to formulate this as an optimization problem using boundingbox of each…