Questions tagged [cvxpy]

For mathematical questions about CVXPY; questions purely about the language, syntax, or runtime errors would likely be better received on Stack Overflow. CVXPY is a Python-embedded modeling language for convex optimization problems.

Filter by
Sorted by
Tagged with
2
votes
1answer
35 views

Problem formulation in CVX toolbox in Python

I have an optimization problem to solve, which is a constrained least squares. I am trying to solve it using CVX toolbox in Python. Here is the optimization problem: $$\hat{H} = \arg \min_H \vert \...
1
vote
1answer
72 views

Solving the multi-dimensional scaling problem in CVXPY

I want to use the CVXPY Python toolbox to solve the simple classical multi-dimensional scaling problem. Problem: Given $n$ points in $d$-dimensional space, i.e. $\mathbf{x}_i \in \mathbb{R}^d$. The ...
0
votes
0answers
55 views

Undefined infeasible point in a convex programming package like CVXOPT

I am using CVXOPT, particularly to solve a nonlinear convex optimization problem. Either the objective function or the constraints involve some functions that are only defined in a strict subset of $\...
0
votes
0answers
26 views

CVXPY Constraint reformulation

If, \begin{equation} \sqrt{1 + x^{2}}, \end{equation} can be written as cp.norm(cp.hstack([1, $x$]), 2) instead of cp.sqrt(1 + cp.square($x$)), what is the correct way of writing \begin{equation} \...
1
vote
1answer
97 views

Expressing positive semidefiniteness of block matrices in CVXPY [closed]

I am trying to solve a robust optimization problem using CVXPY. I am new to this package and also a beginner of Python. I don't know how to implement the constraint that makes a block decision ...
0
votes
0answers
53 views

Range constraints with a full rank matrix

I am trying to execute a quadratic program using cvxopt. My problem is a very simple issue related to matrix rank in the constraints. I want to enforce that some of my variables are in the range [0,1] ...
1
vote
1answer
132 views

How to convert a non-convex problem to a convex problem?

I am a graduate student just learned the convex optimization. I am solving a problem about convex using cvxpy. However when I structured the problem and used the solver model the compiler told me it ...
1
vote
0answers
411 views

cvxopt: Trying to do LP and get “Terminated (singular KKT matrix)”

I am new to cvxopt and am trying to understand this fairly cryptic error message "Terminated (singular KKT matrix)." (At least critic for me.) I am solving a ...
4
votes
1answer
489 views

How to solve quadratic optimization problem with two variables

I would like to solve the support vector regression problem. The formula for the optimization is the following: $$a_1^*, a_2^* = \max\sum_{i=1}^{n} (a_{1i}-a_{2i})y_{i} - eta\sum_{i=1}^{n}(a_{1i}+a_{...
0
votes
1answer
82 views

Lagrange multipliers and Maxima CAS

I am considering the system ...
1
vote
0answers
476 views

How to get around CVXPY's DCP constraints?

I am trying to use CVXPY on a mixed-integer program. One of my constraints is of the form $$y = \begin{cases} g(x) & f(x)\geqslant m\\ 0 & \text{otherwise} \end{cases}$$ for affine ...
3
votes
1answer
338 views

Minimal $\ell_\infty$ solution of underdetermined system of linear equations

[ Update: question solved, answer is at the end of the post] I need to solve this problem $$ \min \| x \|_{\infty} \; \text{s.t.} \; Ax = b $$ where $Ax = b$ is an underdetermined system, e.g., $A ...
3
votes
1answer
1k views

How to prove an expression of log-sum-exp type is convex in DCP?

In Disciplined Convex Programming (DCP) the user should give a certificate to the program that the function (sometimes multivariate) is convex. The user should use predefined set of functions like $...