cvxpy Questions
2
Fused Lasso (Tibshirani et al, 2005) encourages sparsity of the coefficients and also sparsity of their differences.
This is the formula for the loss function and regularization:
The first term ...
Kancler asked 17/11, 2019 at 19:39
2
In this bit of code:
import cvxpy as cvx
# Examples: linear programming
# Create two scalar optimization variables.
x = cvx.Variable()
y = cvx.Variable()
# Create 4 constraints.
constraints = [x...
Poultry asked 13/9, 2018 at 13:15
1
I want to perform the following least squares minimization problem in python using cvxpy:
import numpy as np
import cvxpy as cp
# Generate the data
m = 20
n = 15
A = np.random.randn(m, n+2)
b = np...
Arakawa asked 12/2, 2021 at 1:45
0
I've attempted to implement the Calafiore (2002) method of fitting ellipsoids to data using CVXPY as a wrapper to SCS to perform the semi-definite programming.
When I run this implementation, I ge...
Cascabel asked 24/5, 2020 at 21:7
3
Solved
Similar question as here but now on Python packages. Currently, the CVXPY is missing in Azure ML. I am also trying to get other solvers such as GLPK, CLP and COINMP working in Azure ML.
How can I i...
Isomeric asked 5/6, 2017 at 14:52
1
I have the data of the outside temperatures [8,2,10,13 ..] and I have the thermal inertia (8h) of my building. One of the constraints would be to keep an inside temperature of my building within 20...
1
I'm trying to solve an integer linear programming problem using the CVXPY but am struggling with some syntax and can not figure out a way of how to enforce my variable that I'm interested to solve ...
Astrogeology asked 16/5, 2019 at 16:1
1
Solved
How do I invert a matrix of variables in cvxpy?
I have a matrix of problem variables defined as follows:
import cvxpy as cp
A = cp.Variable(2,2)
and I want to solve a program with an objective ...
3
Solved
I'm trying to solve a Sudoku with cvxpy optimization package.
I'm really new to both optimization and cvxpy.
The constraints are:
all the values are between 1 to 9
sum of all rows = 45
sum of...
Salomone asked 13/2, 2019 at 20:49
1
Solved
I'm using cvxpy within python to solve a particular type of assignment problem. I'd like to assign M people to N groups in a way that minimizes cost, with the following constraints on groups:
Gro...
Carine asked 16/1, 2019 at 23:1
1
Solved
I just install the latest version of cvxpy using pip install and am working my way through the examples provided at http://nbviewer.jupyter.org/github/cvxgrp/cvx_short_course/blob/master/applicatio...
3
While trying to install cvxpy package using pip install on Mac, I get the following error message:
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to ...
Nellnella asked 28/10, 2018 at 15:35
1
Solved
I want to translate a LMI-constrained optimization problem from Matlab to Python. While reading the CVXPY documentation, I found that I can define an LMI-constrained problem by creating a matrix va...
Spancake asked 20/8, 2018 at 17:55
1
I am trying to resolve a portfolio optimization problem in Python using CVXPY but getting an error sum_entries is not defined. I am using Anaconda 2.7 and Jupyter notebook. I have installed cvxpy, ...
1
I am using CVXPY (version 1.0) to solve a quadratic program (QP) and I often get this exception:
SolverError: Solver 'xxx' failed. Try another solver.
which makes my program really fragile. I...
Marquis asked 13/4, 2018 at 8:51
1
I am trying to do element-wise multiplication in CVXPY in the objective function. Is this allowed as part of a convex problem?
X is a n x 1 variable.
V is a n x n constant.
I want to do the equi...
Bove asked 11/4, 2017 at 0:52
1
I want to solve this problem using CVXPY but I don't know why I get the following error message:
DCPError: Problem does not follow DCP rules.
I guess my constraints are not DCP. Is there any ...
Enthymeme asked 3/6, 2017 at 11:6
3
Suppose my constraint is the product of the first column and third column of the matrix variable is greater than one. How can I implement in CVXPY? Example:
w = Variable(4,3)
In Matlab, my cons...
Patentor asked 16/3, 2017 at 2:16
0
Least squares regression is defined as the minimization of the sum of squared residuals e.g.
Minimize(sum_squares(X * beta - y))
However, I'd like to propose a slight modification such that we a...
Crematory asked 20/8, 2017 at 18:17
1
Solved
I have a large problem defined in CVXPY modelling language. I want to solve series of this problems - still the same format but with different parameters (constants).
I found out that after calli...
Pipeline asked 30/5, 2017 at 13:38
1
I want to add many constraint in a optimization problem under cvxpy. In matlab I can do so by adding a line subject to and then use for loop to generate the constraints. How can I do the same work ...
Rhombus asked 9/3, 2017 at 22:15
4
Solved
What's the recommended package for constrained non-linear optimization in python ?
The specific problem I'm trying to solve is this:
I have an unknown X (Nx1), I have M (Nx1) u vectors and M (NxN...
Fleur asked 13/2, 2014 at 21:24
1
Solved
1
Solved
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 optimi...
Lumumba asked 6/6, 2013 at 23:55
1
© 2022 - 2025 — McMap. All rights reserved.