Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

If you fit a linear model for the coffee making problem and one of the parameters is temperature and the coefficient for the temperature in the linear model is positive, does that mean if you keep increasing the temperature without limit, the probability of making a good cup of coffee increases as well without limit?

In reality the temperature is required to be a certain exact value within a range.



But this is just a criticism of extrapolation beyond support, not of any particular class of model. The extrapolation would be equally nonsensical with a linear probability model or any sigmoid transformation, because in reality the problem is only defined within a support (or else is a hinge problem, where everything outside the support has a fixed value). This doesn't make the model useless, it makes it useless for particular out of support extrapolations. This is why inference is both a quantitative and qualitative problem.


Yes and no. The actual probability Doesn’t increase but the predicted probability does.

If you start adding data points for very high temperatures, then your linear model will probably end up ignoring the temperature.

You would need a non-linear transformation of the temperature that can capture that the further away from the sweet spot the worse the coffee is.


Yes, you are correct. In other words, the relationship between temperature and quality is not linear, so directly using the temperature in a linear model gives wrong results. (To be pedantic, the probability will approach 1 as the temperature goes to infinity)


Well, in the real world you can only boil water so the highest temperature of (uncontained) water at nominal pressures is ~100C no matter how long you wait or how much heat you apply. Even in an espresso maker the max pressure sets the max temp. So it might be that the maximum temperature is the right answer (not infinity) for a good cup.


The example problem seems to be completely inappropriate then for the article/model.


I think it's a little more complicated then that. A variable might not be linear in general but may be approximately linear within a certain range of values. You might fit the model on values only within that linear range and thus get a good fit. The model may be very useful inside the range of fitted values but garbage at extrapolation. As long as you understand the limitations it can still be a useful model.


While you’re right, the original post is meant to be pedagogical. Someone who doesn’t understand the fundamentals of model selection might learn the wrong lesson(s).

You kinda have to expect a student to use the examples you give.

There’s really no upside to using that example.


If I were the author, I would drop things like temperature unless I am willing to discuss nonlinear transformations thereof.

Instead, why not simplify it down to D=Freshness of Coffee Beans ?


Just have your features be temp^2 and (212-temp)^2




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: