Questions tagged [cvxopt]

A Python package for convex optimization, including solvers for linear programming, quadratic programming, semidefinite programming and more.

There is an official web site of the CVXOPT package. The official description of the package is given there as follows:

CVXOPT is a free software package for convex optimization based on the Python programming language. It can be used with the interactive Python interpreter, on the command line by executing Python scripts, or integrated in other software via Python extension modules. Its main purpose is to make the development of software for convex optimization applications straightforward by building on Python’s extensive standard library and on the strengths of Python as a high-level programming language.

227 questions
2
votes
1 answer

How do I choose the package to solve this convex optimization in Python?

My problem is defined as below, minΣ(||xi-Xci||^2+ λ||ci||), s.t cii = 0, where X is a matrix of shape d * n and C is of the shape n * n, xi and ci means a column of X and C separately. X is known here and based on X we want to find C. I got…
xxx222
  • 2,980
  • 5
  • 34
  • 53
2
votes
2 answers

Python cvxopt glpk ilp return first feasible solution

I am using cvxopt.glpk.ilp to solve a very complicated Mixed Integer Program. I was wondering if there is a way to get the program to terminate after finding the first solution? It takes too long and a feasible solution would work fine for my…
GoBlue_MathMan
  • 1,048
  • 2
  • 13
  • 20
2
votes
1 answer

CVXPY country/sector/industry like constraints for min variance optimization

I am trying to implement a portfolio optimization that uses constraints to define e.g. max exposure to country/ sector/ industry etc. I have implemented the following code below, where I pass in a 'africa' vector to map stocks to country africa, in…
ThatQuantDude
  • 759
  • 1
  • 9
  • 26
2
votes
0 answers

CVXOPT requirement ignored

I'm trying to solve quadratic problem in cvxopt, but it seems that one of the requirements is ignored I want to solve this set of equations: G = [-1.00e+00 -0.00e+00 -0.00e+00 -0.00e+00] [-0.00e+00 -1.00e+00 -0.00e+00 -0.00e+00] …
asdfgh
  • 2,823
  • 4
  • 21
  • 26
2
votes
2 answers

Need to help solving least sparse linear with some known values

I have the problem describe below I need to find value of x1', x2', x3', x4', x5' that make (x1-x1')^2+(x2-x2')^2+(x3-x3')^2+(x4-x4')^2+(x5-x5')^2 = mininum value and x1' + x2' + x3' + x4' + x5' = 1 x1 + x2 + x3 + x4 + x5 = 1 Note: we know value…
2
votes
1 answer

ImportError: No module named svmcmpl

I'm studing SVM and I found an interesting example here. I already have installed the cvxopt but the svmcmpl isn't installed together cvxopt and I not found how to install it. In the page is metioned the chompack but I also have it installed. >>>…
ademar111190
  • 14,215
  • 14
  • 85
  • 114
2
votes
2 answers

How to interpret the result of cvxopt.solvers.qp?

There is no enough documentation and my math knowledge is limited. The model sol = solvers.qp(P=P, q=q,G=G,h=h, A=L, b=t) pcost dcost gap pres dres 0: 6.3316e+08 6.3316e+08 7e+00 3e+00 7e-10 1: 6.3316e+08 6.3316e+08 …
Hello lad
  • 17,344
  • 46
  • 127
  • 200
2
votes
0 answers

Minimize absolute deviation from volatility target - portfolio optimization - Python

I have the below portfolio optimization problem that I need to specify in python (using cvxopt or any other optimization package). I am unable to figure out how to specify a problem containing absolute value in the objective function. The problem…
2
votes
0 answers

cvxopt installation on windows 7/64bit

I'm trying to install cvxopt package on python 3.4. I'm using pip but I get the error message "command 'c:\MinGW\bin\gcc.exe' failed with exit status 1" I tried numerous stuff like installing numpy+mkl which is not running as well I don't know why,…
rado
  • 401
  • 3
  • 8
  • 16
2
votes
1 answer

Convex programming with CVXOPT or CVXPY

I need to solve an optimization problem with CVXOPT or CVXPY in Python and I have run into difficulties. The objective function is Minimize Sum(a*x^2+b/x) subject to the following constraints 5 <= x < 40; sum(v/d)<=T where vector x is the…
2
votes
1 answer

Kernel Matching Pursuit on CVXPY

I am writing code for Kernel Matching pursuit.In that, I have used to cvxpy for convex optimization.I have to minimize following objective which is based on this paper:http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6815769 and code is as…
Gunjan naik
  • 501
  • 1
  • 7
  • 18
2
votes
1 answer

Python: porting to cvxopt quadratic programming from MATLAB's quadprog

I am porting a MATLAB script to Python that uses the quadprog function. The best equivalent seems to be qp. I can work out the equivalent notation with the doc and a bit of time, but I'm lazy and it would be nice to just copy-paste some code instead…
FvD
  • 1,286
  • 13
  • 25
1
vote
0 answers

cannot find -llapack and -lblas on Alpine Linux

I'm trying to install the cvxopt library on Alpine Linux, which is required library for pm4py. My docker file adds: apk add --no-cache \ gfortran \ cmake \ python3 \ py3-scipy \ py3-numpy \ graphviz \ xdg-utils \ libxml2-dev \ …
Felix
  • 46
  • 4
1
vote
1 answer

How to fill a contingency table from the marginal distributions given some optimization constraints?

I need to find the cells of a contingency table given the marginal…
1
vote
0 answers

When using cvxopt, I get theAthrimeticError and ValueError: Rank(A) < p or Rank([P; A; G]) < n

I'm a novice in Python. I just applied an existing Positive-unlabeled learning package online to my data. However, although it ran well before, recently I got such errors for the first time. Does anybody know what might be wrong and how to fix…
Lexi
  • 11
  • 1