[ncl-talk] compute mode?
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Tue Dec 3 18:06:54 MST 2019
If your data are considered to be a continuous distribution, then compute
the probability density function with NCL's pdfx function. Then maxind()
gives the position of the largest bin (i.e. highest density), which
contains the mode. You may need to adjust the number of bins to get the
desired precision.
See NCL examples pdf_1 and pdf_2 to get the general idea of PDF's. Also
refer to this Wikipedia page on mode:
https://en.wikipedia.org/wiki/Mode_(statistics)
Discrete distributions (counts, etc.) must be handled a little differently.
On Tue, Dec 3, 2019 at 11:55 AM Lesley Smith - NOAA Affiliate via ncl-talk <
ncl-talk at ucar.edu> wrote:
> Greetings NCL folks!
> Is there a way to compute the mode (most frequent value) of
> data using NCL?
> I'm not seeing anything...
> Thanks so much!
> Cheers,
> -Lesley
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191203/545669e4/attachment.html>
More information about the ncl-talk
mailing list