GG asked in 電腦與網際網路程式設計 · 1 decade ago

matlab 迴歸問題

當我再跑程式時

某些迴歸式

係數都是0

然後會出現下面的對話

Warning: X is rank deficient to within machine precision.

> In regress at 82

查詢的結果是 :

[Q,R,perm] = qr(X,0);

p = sum(abs(diag(R)) > max(n,ncolX)*eps(R(1)));

if p < ncolX

warning('stats:regress:RankDefDesignMat', ...

'X is rank deficient to within machine precision.');

R = R(1:p,1:p);

Q = Q(:,1:p);

perm = perm(1:p);

end

請問有哪位高手 可以幫我解惑?? 謝謝 !!

1 Answer

Rating
  • Chaos
    Lv 7
    1 decade ago
    Favorite Answer

    rank deficient 表示你的矩陣rank小於直欄(column)數目

    通常是說你可能會有不定解(underdetermined)的問題,就是說你要解的變數(欄數)比你的獨立式子(rank)多,你可能會有無限多組解

    Source(s): numerical linear algebra by Lloyd Trefethen & David Bau
Still have questions? Get your answers by asking now.