1
$\begingroup$

I am trying to understand which is the best way to construct the parameters using the cvxpy engine.

I have seen this post: more of list-like way of constructing constraints etc

and this post: more matrix-like notation way of constructing constraints etc.

I want to ask: is there any problem following either "notation" ?

Thanks

$\endgroup$
1
$\begingroup$

There is not difference but I would suggest using matrices as the optimization problems are more intuitive when looking at matrices. When I did this it helped to recognize what the diagonals of the matrix meant, etc. And for simple linear optimization Ax=b it is better to think of A as the matrix, and x and b as vectors (also matrices technically but whatever). Hope this helps. I would also use Python or R for these types of things. The optimizers are great in Python and I think it is more intuitive the inputs you will use

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.