Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mode of a dataset #1014

Discussion options

Is there a package that computes a dataset's mode (the most frequent element)?

You must be logged in to vote

Not yet implemented.

Disclaimer

  • This answer was generated with the help of AI and is not guaranteed to be correct. We will review the answer and update it if necessary.
  • You can also ask follow-up questions to clarify the answer or request additional information by leaving a comment on this issue starting with /ask.

Replies: 4 comments 1 reply

Comment options

Yes, the @stdlib/stats/base/dists/ package provides functions to compute the mode of several common distributions, including the hypergeometric, binomial, and Poisson distributions.

References

Disclaimer

  • This answer was generated with the help of AI and is not guaranteed to be correct. We will review the answer and update it if necessary.
  • You can also ask follow-up questions to clarify the answer or request additional information by leaving a comment on this issue starting with /ask.
You must be logged in to vote
1 reply
Comment options

/ask Is there a package that computes a mode of an array of strings/numbers?

Comment options

Not yet implemented.

Disclaimer

  • This answer was generated with the help of AI and is not guaranteed to be correct. We will review the answer and update it if necessary.
  • You can also ask follow-up questions to clarify the answer or request additional information by leaving a comment on this issue starting with /ask.
You must be logged in to vote
0 replies
Answer selected by romanstetsyk
Comment options

Hey @romanstetsyk, while we don't have a capacity in stdlib yet to calculate the mode of a dataset, you may try the following package of ours if it's sufficient for you to calculate the mode of an array:

https://github.com/compute-io/mode

You must be logged in to vote
0 replies
Comment options

@Planeshifter That's exactly what I need; thanks a lot!
I also noticed that there are a lot of packages in compute org with similar functionality to stdlib.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /