Supervised Learning ใน R: การถดถอย
Nina Zumel and John Mount
Win-Vector, LLC
ตัวอย่างความสัมพันธ์แบบบวก:
plant_height ~ bacteria + sun
อิทธิพลร่วมของตัวแปรสองตัวต่อผลลัพธ์ไม่เป็นแบบบวก
plant_height ~ bacteria + sun + bacteria:sun
อิทธิพลร่วมของตัวแปรสองตัวต่อผลลัพธ์ไม่เป็นแบบบวก
plant_height ~ bacteria + sun + bacteria:sun
sun: categorical {"sun", "shade"}เหมือนสร้างโมเดลแยกกันสองตัว: ตัวหนึ่งสำหรับที่มีแสง อีกตัวสำหรับที่ร่ม
yield ~ Stress + SO2 + O3

Metabol ~ Gastric + Sex

Interaction - โคลอน (:)
y ~ a:b
Main effects และ interaction - เครื่องหมายดอกจัน (*)
y ~ a*b
# Both mean the same
y ~ a + b + a:b
การแสดงผลคูณของตัวแปรสองตัว - I
y ~ I(a*b)
เหมือนกับ $y \propto a b$
| Formula | RMSE (cross validation) |
|---|---|
Metabol ~ Gastric + Sex |
1.46 |
Metabol ~ Gastric * Sex |
1.48 |
Metabol ~ Gastric + Gastric:Sex |
1.39 |
Supervised Learning ใน R: การถดถอย