-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
posterior_linpred()
for ordinal families: argument for taking the intercept into account
#1137
posterior_linpred()
for ordinal families: argument for taking the intercept into account
#1137
Conversation
… into account (in case of an ordinal family) which is required for the augmented-data approach in projpred.
Of course, you can delete the comment in this line if you agree that using |
thanks for working on this issue! I will to make some edits to the PR
before merging so it may take a couple of days.
the line you mentioned it correct as is.
Frank Weber ***@***.***> schrieb am Mo., 12. Apr. 2021, 13:17:
… Of course, you can delete the comment in this line
<https://github.com/fweber144/brms/blob/0a68dae163126b58beeef8fea008b048c1b1edcb/R/posterior_epred.R#L169>
if you agree that using sweep() with its recycling checks is preferable.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1137 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2ABHYTJEDV6JQFBUP3LTILJFLANCNFSM42ZCFZOQ>
.
|
Sure |
Thanks again for our call yesterday. I have taken the liberty to push my changes directly to this PR so that you can continue working on it as well. I have implemented the basic functionality for the envisioned There is some more work to do, which I don't have time for at the moment and I was hoping that perhaps you can continue with it, if you like and have time. Specifically, there are the following TODOs remaining:
|
Thanks a lot! The basic case works like a charm (see the test added in
I have started tests for these two special cases in I'll tackle the TODOs asap. |
Thanks! My implementation should handle these specials cases already. In fact these special cases are one reason my implementation is set up in the way it is. Please let me know if you find out why its not working and I am happy to fix it. |
Sure. I'm realizing that I forgot to take |
…with `disc ~ 1`).
… categories with NA, not zero.
I fixed the |
Good catch! The reason things are 0 is because the probability of them is 0. NA should be fine as well, but perhaps this can be done conditionally, that is |
Good idea, that should work.
|
…ntity" link, fill missing categories with NAs. Otherwise, fill with zeros.
thanks for checking it out! I switched to array syntax so that we can
handle the 3D linpred array directly and efficiently in these link
functions. I think that would make it easier down the line. if possible it
would be great to have that working for the other families as well.
Frank Weber ***@***.***> schrieb am Di., 4. Mai 2021, 10:17:
… Other question: In commit 837a8e5
<837a8e5>,
you switched from matrix syntax to a more general array syntax. Do you want
me to do so also for the other ordinal families?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1137 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCW2AEULO7JO52KZSMQVSLTL6UQZANCNFSM42ZCFZOQ>
.
|
Ah, yeah that's a good idea. I was too focused on the former matrix syntax to see how using arrays in the |
To get back to the comment from above:
Families |
Thanks. Glad to hear things are correctly implemented in brms. And indeed, we can worry about the unit test later and separately. |
Here are the commits with which I would consider this PR to be finished. But of course, if you want me to add or change something, that's no problem. Some notes:
|
Great, thank you so much!
|
I am running checks now. Once they pass, I will merge this PR. Thank you again for working on it! |
Great, thanks. And I'm glad to help. Concerning
I will perform such a speed comparison when I get the time. |
Concerning commit 5c2cdb4: I'm just realizing that you can probably replace |
Good catch. Fixed it and will merge now. |
…ive() and sratio() for the cloglog link (see <paul-buerkner#1137 (comment)>).
You can now find the speed comparison in PR #1155. |
This PR introduces an argument (
incl_thres
) toposterior_linpred()
for taking the intercept into account (in case of an ordinal family) which is required for the augmented-data approach in projpred.A different topic: In line
brms/R/posterior_epred.R
Line 106 in 76fcc83
ilink = TRUE
is used there (sincescale = "linear"
should also be possible there, right?). But I guess it's correct and I just don't get it. In case it's not correct: Do you want me to open an issue?