Integer programing for minimization
1 次查看(过去 30 天)
显示 更早的评论
- How to solve the following integer optimization problem :
Find B and D such that B,D = Min |Y- XDB|||
where the matrices X,Y are given.
The matrix D must be a diagonal matrix where its diagonal elements are 0 or 1.
2 个评论
Torsten
2016-5-25
Which norm do you use ?
Is it correct that the same B appears on both sides of the equation
B = Min |Y- XDB|
?
Best wishes
Torsten.
回答(1 个)
Nihar Deodhar
2016-6-23
Your problem could be solved using fmincon. See Matlab documentation on fmincon for more info.
Set up the objective function as
J = abs(Y- X*D*B);
where I guess X is a known matrix/vector.
Set up B using b1,b2,b3.... etc. the number of variables needed would depend on size of B. choose n number of elements d1,d2,....dn for the square matrix D based on its size.
for instance if B is 3x3, set up b1, b2, ......b9 and if D is 3x3 as well (which would have to be given the size of B) choose d1, d2 and d3 as optimization variables ad set the off diagonal elements in D = 0. So the problem will involve (9+3 = 12) optimization variables in this case. Now you said that diagonal of D should be populated by 1 or 0. Set this range for the parameter bounds in fmincon. It is possible that you might get fractions between 0 and 1 as the optimum, just round it up to either 0 or 1 in the end.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Operating on Diagonal Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!