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

Replace predict_multinomial_logit with scipy.special.softmax. #279

Merged
merged 5 commits into from Oct 28, 2019

Conversation

tobiasraabe
Copy link
Member

@tobiasraabe tobiasraabe commented Oct 22, 2019

  • respy version used, if any: 2.0.0dev
  • Python version, if any: any
  • Operating System: any

Closes #279.

Current Behavior

We had predict_multinomial_probit, but it does not account for over and underflows and does the same as softmax.

Solution / Implementation

Use scipy.special.softmax which uses the log-sum-exp trick. The guvectorize is not necessary as the dot product and the scipy function are almost not measurable in line profilings.

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

Successfully merging this pull request may close these issues.

None yet

2 participants