Questions tagged [cvxr]
39 questions
0
votes
1 answer
parameter to create MOSEK feasibility report with CVXR
I am using CVXR to solve an optimization problem in R using the MOSEK solver. CVXR has found the MOSEK SOLVER through ANACONDA and is working fine. However, I do not manage to generate the MOSEK feasibility report when the model is infeasible. This…

Michiel van Dijk
- 157
- 1
- 9
0
votes
1 answer
CVXR: addressing non-diagonal elements of a matrix of variables
Suppose that in CVXR I have a definition A <- Variable(3,3)
and would like to maximize the function "sum of the square roots of the non-diagonal elements". However, if I write something like
sum(sqrt(A))-sum(sqrt(diag(A))), the first function being…

Ilonpilaaja
- 1,169
- 2
- 15
- 26
0
votes
0 answers
Minimum value of optimzation variable is smaller than lower bound
I am trying to solve the following optimization problem in CVXR using MOSEK solver.
Objective_Fn
The input matrix is data_C2 (50 X 30) and clust_center_C2 is a column matrix ( 50 X 1).
S_C2 is the matrix (50 X 50) that I am trying to minimize.
This…

user98059
- 101
- 2
0
votes
1 answer
CVXR: subsetting certain variables
library("CVXR");
A <- Variable(3,3);
D <- matrix(c(A[1,1],0,0,0,A[2,2],0,0,0,A[3,3]),nrow=3);
A-D
Here, we have a matrix of variables, A (I am not sure if this is how to call the object correctly), and D as a matrix of variables, in which the…

Ilonpilaaja
- 1,169
- 2
- 15
- 26
0
votes
1 answer
Solve non-linear convex optimization problem with nonlinear constraints in R
I have an easy Economic Order Quantity (EOQ) optimization problem involving many variables and a few constraints.
The generalized objective function is sum(ai*x[i]+bi/[xi]) and the restrictions are:
x[i] >=1 for all "i" (at least 1 order)
x[i] <=24…

OBT
- 59
- 8
0
votes
1 answer
Extension to the CVXR example cvxr_kelly-strategy not DCP compliant?
I've been working through some of the example code trying to learn CVX and spinning my wheels trying to figure out the extension to the Kelly example in CVXR:
"Extensions:
As observed in some trajectories above, wealth tends to drop by a significant…

SCW
- 3
- 4
0
votes
1 answer
A comparison between CVXR and glmnet (elastic net)
I fit a model on a simulated data set to compare glmnet and CVXR results.
If I don't have a code mistake, the results are very different.
Explicitly glmnet yields results which are very close to the true parameters.
Why is this the…

mert
- 371
- 2
- 9
0
votes
1 answer
Log_sum_exp of a convex function is not dcp compliant?
I have a convex function f(b):
f(b) = log(pi) - lambda * log( t(r) %*% b)
dim(pi) = (n,1), lambda is a scalar constant, dim(r) = (n,n)
b is the parameter, dim(b) = (n,1)
The call to
is_convex(f)
is_dcp(f)
both return TRUE.
However, I don’t…

pvc
- 1
0
votes
1 answer
passing in options to solvers from cvxr solve function
I am using CVXR to solve a problem with constrains. The solver gives result that doesn't satisfy all constrains.
result <- solve(problem, solver='ECOS', verbose=TRUE, ecos.control(maxit=2000))
The last few lines of verbose output is like…

hlu58
- 115
- 6