Solving Optimisation Problem with Rank Constraint in MATLAB
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
I have a typical least squares problem, i.e I have to find the value of x that minimizes norm of C∗x(:)−d. C is 180x16 matrix(C is rank deficient,i.e rank(C)=7), x is 4x4 matrix & d is 180x1 vector. However, I have a constraint that rank(x)=1. If x was a 16x1 vector and didn't have rank constraint, this problem could be easily solved by using y = pinv(C)*d in MATLAB. But since x is a matrix and has rank constraint, I am not able to proceed further. I would be grateful if someone provides me hint or suggestion to tackle this problem.
채택된 답변
Torsten
2015년 11월 20일
1. Solve y=pinv(C)*d
2. Determine the best rank-1 - approximation x to y as discussed in the previous thread:
My guess is that x solves your original problem, but I'm not 100% certain.
Best wishes
Torsten.
댓글 수: 10
I had exactly done the same before, but I have noticed that estimate of x obtained after svd (like in the thread you posted) is not a perfect match of y. So I was wondering if there is some other technique to somehow obtain a better match!
To be sure, you could proceed as follows:
Write x as u*v' for two unknown 4x1-vectors u=(u1,u2,u3,u4) and v=(v1,v2,v3,v4).
Then use fminsearch to minimize |C*u*v'-d|_2 in the 8 unknowns u1,u2,u3,u4,v1,v2,v3,v4.
Best wishes
Torsten.
I appreciate your suggestion. I am using fminsearch now to solve it. But what value of "x0" should I give for this problem(x = fminsearch(fun,x0))?
I have written the function as follows:
function fun = optim(x,A,b)
residuals = (A*x) - b;
fun = sum(residuals.^2);
end
function main
A=...;
b=...;
x0=ones(8,1);
x=fminsearch(@)(x)optim(x,A,b),x0);
function fun=optim(x,A,b)
u(1:4,1) = x(1:4);
v(1:4,1) = x(5:8);
rank1 = u*v';
y = reshape(rank1,[16,1]);
residuals = A*y-b;
fun = sum(residuals.^2);
Best wishes
Torsten.
thank you :)
Try A and b real-valued first.
For complex A and b, the program has to be adapted.
Best wishes
Torsten.
Well real values work but I think complex values would provide a better estimate (because A and b in general are complex numbers ;) ). What should be added in the case of complex valued A and b?
I did not test it, but maybe something like
function main
A=...;
b=...;
x0=ones(16,1);
x=fminsearch(@)(x)optim(x,A,b),x0);
function fun=optim(x,A,b)
realu(1:4,1) = x(1:4);
imagu(1:4,1) = x(5:8);
realv(1:4,1) = x(9:12);
imagv(1:4,1) = x(13:16);
u=complex(realu,imagu);
v=complex(realv,imagv);
rank1 = u*v';
y = reshape(rank1,[16,1]);
residuals = A*y-b;
fun = abs(residuals);
Best wishes
Torsten.
thank you so much :)
In the last line of the code, you will have to replace
fun = abs(residuals)
by
fun = residuals'*residuals
or
fun = norm(residuals)
Best wishes
Torsten.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Linear Least Squares에 대해 자세히 알아보기
참고 항목
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
