Define a Non linear objective function with 2 decision variables
显示 更早的评论
I have a matrix X (932x1404) and I want to find 2 matrices W(932x2) , H(2X1404) in order to minimize the error abs(X-WH) over W and H. It is similar to a non negative matrix factorization problem but I want to add specific constraints. The matrix X actually is a black and white image with values 0-255 and I want the W to have similar values (to represent the centroids of each class) and the matrix H to have values from 0 to 1 but with the sum of the values in each column to equal 1 (something like weights). So the problem I want to define in matlab is the following:
min_W,H (|X-W*H|) (o.f.)
under the constraints
Wik>=0 (c1)
Wik<=255 (c2)
Hkj>=0 (c3)
Hkj <= 1 (c4 , not neccessary I guess due ot the following constraint)
sum_k Hkj =1 for each column j of Matrix H (c5)
where i is the ith row and k the kth column of matrix W
and for matrix H the k denotes the kth row and j the jth column
the sum_k denotes the sum over all rows entries for a specific column j. for example for the first column we sum all the rows and so on.
Could you please let me know how I can formulate such a problem in matlab? I watched various tutorials for optimization toolbox but I have not figured it out yet.
Thank you in advance for your help
2 个评论
Matt J
2019-10-28
Is it important that it be min(abs(error)) or would you be just as happy with least squares?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multiobjective Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!