Skip to content
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

DOC: Slightly more clarification about the expected target value indexing of pymc.OrderedLogistic #7422

Closed
Mithrillion opened this issue Jul 22, 2024 · 4 comments · Fixed by #7457
Labels

Comments

@Mithrillion
Copy link

Mithrillion commented Jul 22, 2024

Issue with current documentation:

While it is possible to deduce that OrderedLogistic expects the observed values to have the typical 0-based indexing as in regular Python, based on the documentation's example:
y = np.concatenate((1*np.ones(n1_c), 2*np.ones(n2_c), 3*np.ones(n3_c))) - 1
the initial line of the documentation Useful for regression on ordinal data values whose values range from 1 to K as a function of some predictor... makes it seem like the encoding should be "1,2,3,...K". This can be confusing for users, as this can result in logp=-inf error, which does not intuitively trace back to the source of the error here.

Idea or request for content:

Make it clearer that the target values ("observed") should be 0-based, like in regular Python. Similar change could also be made for OrderedProbit.

@ricardoV94
Copy link
Member

Sounds good @Mithrillion , wanna push a fix?

@androemeda
Copy link

@ricardoV94 please assign it to me , i would like to fix it

@charanbhatia
Copy link

@Mithrillion can you assign this issue to me?

@kdotmanoj
Copy link
Contributor

@Mithrillion @ricardoV94 Could you please review PR #7457 related to the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants