R による Supervised Learning:回帰
Nina Zumel and John Mount
Win-Vector, LLC
加法的関係の例:
plant_height ~ bacteria + sun
2変数が結果に与える同時影響は加法的ではない。
plant_height ~ bacteria + sun + bacteria:sun
2変数が結果に与える同時影響は加法的ではない。
plant_height ~ bacteria + sun + bacteria:sun
sun:カテゴリ変数 {"sun", "shade"}日なた用と日陰用、2つの別モデルのように機能する。
yield ~ Stress + SO2 + O3

Metabol ~ Gastric + Sex

交互作用 - コロン(:)
y ~ a:b
主効果と交互作用 - アスタリスク(*)
y ~ a*b
# 両者は同じ意味
y ~ a + b + a:b
2変数の積を表す - I
y ~ I(a*b)
$y \propto a b$ と同じ
| 式 | RMSE(交差検証) |
|---|---|
Metabol ~ Gastric + Sex |
1.46 |
Metabol ~ Gastric * Sex |
1.48 |
Metabol ~ Gastric + Gastric:Sex |
1.39 |
R による Supervised Learning:回帰