A pediatric hospital models length of stay from age and a surgery flag. Age has a much steeper link to stay for surgical patients than for other patients, and adding the two effects separately misses that pattern. Which added feature lets the two inputs matter together?
Select an answer to reveal the explanation.
Short Explanation
Age and surgery are like salt and heat: the meal changes when they act together, not when you sprinkle each one alone. An interaction lets the age slope differ for surgical patients, which is the pattern you saw in length of stay. The trap is a log of age by itself, which bends one input and still adds surgery as a flat shift.
Full Explanation
An interaction, or cross-term, is a feature built from two inputs so their joint effect can differ from the sum of their separate effects. Multiplying age by the surgery flag lets the model estimate one age slope for surgical patients and a different age slope for everyone else, which is the steeper surgical pattern the pediatric stay model missed. A logarithm of age alone can straighten a curved age relationship, but the surgery flag still adds the same shift for every patient. One-hot encoding of a binary surgery flag is just the flag itself; it marks surgery and does not let the age slope change. Decade bands replace exact age with brackets and still leave surgery as one added shift unless those bands are themselves crossed with surgery. Without that product, age and surgery each receive one coefficient, and the surgical age slope cannot become steeper on its own. Exam caveat: an interaction is a new feature you choose to add; it is not created automatically by including both original columns in an additive model. Operational check: fit the stay model with and without the age-by-surgery product and confirm the age slope for surgical patients differs from the slope for other patients.