Clear Filters
Clear Filters

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

1 view (last 30 days)
KK
KK on 12 Nov 2018
Commented: Kazuya on 12 Nov 2018
robustfitの反復はどのような条件の時に終了しますか?

Accepted Answer

Kazuya
Kazuya on 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 Comments
KK
KK on 12 Nov 2018
ありがとうございます。 2017aだとrobustfitの中身までしか見れなかったため、大変参考になりました。くわしくは2018bにアップデート後に確認してみようと思います。
Kazuya
Kazuya on 12 Nov 2018
オリジナルのロバスト回帰を実装するような課題ですか?
statrobustfit 関数は private 関数なので
edit statrobustfit
では、開けませんね。
robustfit.m 内で statrobustfit 関数が実行されている箇所にて右クリック、メニューの中から「"statrobustfit" を開く」を選んで開いてみてください。

Sign in to comment.

More Answers (0)

Categories

Find more on 関数 in Help Center and File Exchange

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!