Getting domain error because of scaling set to 0.

49 views
Skip to first unread message

yd2612

unread,
Jul 8, 2017, 9:13:00 PM7/8/17
to CVXOPT
Hi,
I am getting "ValueError: domain error" in misc.py  on  W['di'] = W['d']**-1 . Any thoughts? Thanks.

Martin

unread,
Jul 9, 2017, 10:03:43 AM7/9/17
to CVXOPT
Do you have an example where this happens? Perhaps your problem is poorly scaled?

yd2612

unread,
Jul 9, 2017, 7:27:46 PM7/9/17
to CVXOPT
Hi,
PFA the pickle file containing the problem parameters in a dictionary. Problem is in the following form (min c^Tx s.t Ax=b , lo<=x<=hi). It is fit2d problem from the netlib dataset. I am also attaching small python script which I am using to run the optimization using cvxopt. Please let me know if you need anything else. Thanks a lot. 
cvxopt_fit2d.pkl
cvxopt_test.py

Martin

unread,
Jul 10, 2017, 2:16:06 PM7/10/17
to CVXOPT
Your problem is poorly scaled: some elements in h have magnitude around 1e20 while most elements of h are between 0 and 10. 
Message has been deleted

yd2612

unread,
Jul 10, 2017, 8:42:58 PM7/10/17
to CVXOPT
Hi,
Thanks, removing the redundant constraints worked(large upper bounds). But in a different problem I am getting "Terminated (singular KKT matrix)". From different post I found out that it could be scaling issue again, so I tried scaling A and G by l1 norm of rows, also tried diagonal sacling (where scale found out from the first run of the algorithm) but I am still getting the singular KKT problem. Any thoughts? I am attaching the problem and the script I am using(same format) in case you need them. Any help is greatly appreciated. Thanks.
cvxopt_osa07.pkl
cvxopt_test.py

Martin

unread,
Jul 11, 2017, 6:19:48 AM7/11/17
to CVXOPT
This is a similar issue: the elements of h are either close to zero or close to 1e20. If some of these constraints are essentially vacuous upper bounds on some variables, it is better to leave them out altogether.

yd2612

unread,
Jul 12, 2017, 7:12:03 PM7/12/17
to CVXOPT
Thanks. I was in the impression that I was setting entries of h also to zero but I was only setting entries of G to 0. Thanks a lot.
Reply all
Reply to author
Forward
0 new messages