Github user sethah commented on the issue:
https://github.com/apache/spark/pull/16699
@actuaryzhang This is looking pretty good overall. Regarding the prediction
logic, R glm does not allow you to predict with offsets, correct? I notice that
statsmodels in Python _does_ allow it. For, e.g. Poisson regression, predicting
with offsets is a _slight_ convenience, I guess. The point of training with
offsets in this case is to effectively model _rates_ instead of _counts_, and
so when you predict you'd be interested in the rates and predicting without
offsets, that's exactly what you get. If you want to apply those rates to a
specific exposure time, then you just take your predictions and multiply them
with `exposure * y_hat` where y_hat is the predicted rate. I think I have that
correct. My question then, is do we need to support prediction with offset? It
makes things clunkier in the code, so there is some reason not to. Since you
presumably have more experience with using GLMs, I'd like to hear your thoughts.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]