Skip to content

Updating softmax in rethinking_2 chapter 11#240

Open
DamonCharlesRoberts wants to merge 3 commits into
pymc-devs:mainfrom
DamonCharlesRoberts:hotfix-issue-239
Open

Updating softmax in rethinking_2 chapter 11#240
DamonCharlesRoberts wants to merge 3 commits into
pymc-devs:mainfrom
DamonCharlesRoberts:hotfix-issue-239

Conversation

@DamonCharlesRoberts

Copy link
Copy Markdown

Addresses #239

  • Switches to pm.math.softmax() implementation for multinomial implementation of categorical model.
  • Adds axis=1 to the function.

… to the softmax function for rethinking_2 chapter 11 notebook.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ricardoV94

Copy link
Copy Markdown
Member

Can we also get rid of the at imports. those were for aesara, now if anything it should be import pytensor.tensor as pt

@ricardoV94

Copy link
Copy Markdown
Member

Also axis=-1, may be more readable (if it's indeed equivalent to axis=1)

@DamonCharlesRoberts

Copy link
Copy Markdown
Author

Can we also get rid of the at imports. those were for aesara, now if anything it should be import pytensor.tensor as pt

Removed the at imports. Using the pymc.math.softmax instead for the application of the softmax function on objects within the model. For simulated data, left the original scipy import for the softmax function.

@DamonCharlesRoberts

Copy link
Copy Markdown
Author

Also axis=-1, may be more readable (if it's indeed equivalent to axis=1)

Left as axis=1 to keep consistent style with other parts of the existing notebook.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants