Closed tomicapretto closed 1 year ago
Attention: Patch coverage is 87.50000%
with 6 lines
in your changes missing coverage. Please review.
Project coverage is 88.87%. Comparing base (
6268ccf
) to head (3f85e4f
). Report is 72 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
bambi/families/univariate.py | 77.77% | 6 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
This PR implements censored families. For example
where
time
is a survival time andstatus
is either"right"
or"none"
indicating right-censoring and no censoring, repsectively.But there's an additional feature I discuss below
In addition,
bmb.Model
gains an extra argument calledcenter_predictors
. By default, when there's an intercept, Bambi centers all the predictors in the design matrix. This usually results in better sampling speed because (if I'm correct) mitigates some correlation in the posterior.However, while I was testing the new censored models I was having lots of sampling initialization problems. I think it was due to a combination of the prior choice and the scale of the predictor variable, that when centered, caused the issue. So by doing
bmb.Model(..., center_predictors=False)
we get rid of the centering and the problem disappears.Notice the
center_predictors=False
may also be usefu.l to people that just want to make sure the intercept they select for the prior has the natural interpretation they expect. With automatic centering, the interpretation of the intercept is not what you think it is (unless all your predictors are centered around zero)