Repository navigation
Limit categories in output multinouli distribution - #487
Merged
Merged
Conversation
qubixes
requested changes
Oct 29, 2026
qubixes
left a comment
Member
There was a problem hiding this comment.
Thanks! It looks much better now. I think your proposal here is better than the alternative you mention. Otherwise it is going to take too much vertical space. Perhaps 10 is a little on the high side even, perhaps 7?
qubixes
reviewed
Oct 29, 2026
qubixes
requested changes
Nov 2, 2026
qubixes
left a comment
Member
There was a problem hiding this comment.
I have a few more questions, but otherwise it's good. Feel free to merge after these are addressed.
| sorted_indices = np.argsort(-self.probs) | ||
| top_indices = sorted_indices[:top_bottom_counts[0]] | ||
| bottom_indices = sorted_indices[-top_bottom_counts[1]:] | ||
| top_labels = ", ".join(repr(label) for label in self.labels[top_indices].tolist()) |
Member
There was a problem hiding this comment.
Why the repr(label) instead of just label?
Collaborator
Author
There was a problem hiding this comment.
To make sure if label is not a string it can be joined. Not sure if this could ever happen, but just in case.
Co-authored-by: qubixes <44498096+qubixes@users.noreply.github.com>
Co-authored-by: qubixes <44498096+qubixes@users.noreply.github.com>
qubixes
approved these changes
Nov 2, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #477
Limit the categories in output multinouli distribution to the 10(?) categories with the largest probabilities.
Output would be like this (for this output I temporarily changed the limit to 2):
Another option would be to change the output to something like this: