3次以上の線形回帰の解析ができますか?

2 views (last 30 days)
Takafumi
Takafumi on 2 May 2017
Answered: Takafumi on 2 May 2017
fitlm関数では、線形、2次式、交互作用ありの2次式が可能なようですが、3次式以上で可能か知りたいです。

Accepted Answer

Takafumi
Takafumi on 2 May 2017
可能です。 x1,x2,x3 の3変数で、3次の回帰式を定義したい場合、以下のコマンドで対応します。
fitlm(X,Y,'poly333')
あと、交互作用なしの設定も可能で、次数を行列で指定することで可能です。
fitlm(X,Y,[0 0 0;1 0 0; 0 1 0; 0 0 1; 2 0 0;0 2 0; 0 0 2;3 0 0; 0 3 0; 0 0 3])

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!