Filter löschen
Filter löschen

robustfitの​反復はどのような条件​の時に終了しますか?

1 Ansicht (letzte 30 Tage)
KK
KK am 12 Nov. 2018
Kommentiert: Kazuya am 12 Nov. 2018
robustfitの反復はどのような条件の時に終了しますか?

Akzeptierte Antwort

Kazuya
Kazuya am 12 Nov. 2018
ヘルプページには明記されていないですね。
edit robustfit
で関数の中身を確認すると、実際の処理は statrobustfit.m で実行されていることが分かります。。
edit statrobustfit
で中身を見ると(R2018b では・・ですが)
% Perform iteratively re-weighted least squares to get coefficient estimates
D = sqrt(eps(class(X)));
iter = 0;
iterlim = 50;
wxrank = xrank; % rank of weighted version of x
while((iter==0) || any(abs(b-b0) > D*max(abs(b),abs(b0))))
が見つかりますが、、この while 文の条件がお探しの条件かと見ていますが、、どうでしょう?基本的には 計算結果 b が変化しなくなるまで、といった条件みたいですが、反復回数は 50 回までという条件も見られます。
  2 Kommentare
KK
KK am 12 Nov. 2018
ありがとうございます。 2017aだとrobustfitの中身までしか見れなかったため、大変参考になりました。くわしくは2018bにアップデート後に確認してみようと思います。
Kazuya
Kazuya am 12 Nov. 2018
オリジナルのロバスト回帰を実装するような課題ですか?
statrobustfit 関数は private 関数なので
edit statrobustfit
では、開けませんね。
robustfit.m 内で statrobustfit 関数が実行されている箇所にて右クリック、メニューの中から「"statrobustfit" を開く」を選んで開いてみてください。

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 関数 finden Sie in Help Center und File Exchange

Produkte


Version

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!