-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Ordinal regression docs #719
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
edbfa6b
ordinal model with cumulative link notebook
GStechschulte 6d89eb4
ordinal model with cumulative link function
GStechschulte a2167bc
unified explanation for cumulative and sequential models
7f9b118
sratio model and data
GStechschulte 3dffcce
code review changes
GStechschulte f7a1826
remove intercept in models
GStechschulte e27194f
zero mu vector prior for sratio family
GStechschulte 6f357f2
code review and add section on default priors
GStechschulte 0521b01
explicit explanation of K and k and added summary section
GStechschulte 32e49fd
Zero inflated docs (#725)
GStechschulte ff9c044
ordinal model with cumulative link function
GStechschulte d7acdeb
use plot_ppc_discrete for posterior predictive samples
GStechschulte 075f537
add plots explaining the ordinal outcome of the dataset
GStechschulte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If sequential models assume that for every response level there is a latent continuous variable$Z_k$ , then wouldn't we need each response level? Thus,
mu
should bemu = response_level_n
and notresponse_level_n - 1
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, I think you're right!
I'm thinking why the current approach is working and not failing. Is it because it's not considering the probability of Y being larger than the largest observed category? I think it would make sense for the years example, but I'm not sure if it would make sense for cases where there is a pre-specified set of categories.
I wrote that as I was looking at this visualization from the ordinal tutorial by Bürkner and Vuorre:
and I wonder: Do we always have a Pr(Y > K)? (as in the Y > 3 in the figure)
@GStechschulte if you make that modification and run the example, does it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove the
-1
, I getValueError: Incompatible Elemwise input shapes [(35,), (36,)]
.This makes sense as I stated in the docs because the sequential model is a product of probabilities, i.e., the probability that$Y$ is equal to category $k$ is equal to the probability that it did not fall in one of the former categories $1: k-1$ multiplied by the probability that the sequential process stopped at $k$ .
In the case of the attrition dataset, there are 36 response categories. Because of the statement above, this makes sense why the probability of category 36 is 1. There is no category after 36, so once you multiply all of the previous probabilities with the current category, you get 1. Thus, you don't need a parameter (threshold) for it.