Documentation for /Users/balarsen/Documents/idl/larsen/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

stats/

optbins.pro

Routines

result = post_prob_optbins(M)
result = optbins(data [, minM_in] [, maxM] [, HIST=HIST] [, PLOT=PLOT] [, _EXTRA=_EXTRA])

calculate the optimum number of histogram bins by balancing the likelihood function and the prior probability of the model.

Routine details

toppost_prob_optbins

result = post_prob_optbins(M)

Parameters

M

Statistics

Lines: 10
McCabe complexity:

topoptbins

stats

result = optbins(data [, minM_in] [, maxM] [, HIST=HIST] [, PLOT=PLOT] [, _EXTRA=_EXTRA])

calculate the optimum number of histogram bins by balancing the likelihood function and the prior probability of the model. Method is from Optimal Data-Based Binning for Histograms Kevin H. Knuth arXiv:physics/0605197v1 [physics.data-an] 23 May 2006

FUNC_optbins, data2, N, minM, hist2

This is not generalized to 2-d histograms yet

Return value

optimal number of histogram bins

Parameters

data in required

the array to find the optimal number of histogram bins for

minM_in in optional

minimum number of bins to consider (default 5)

maxM in optional

maximum number of bins to consider (default 100)

Keywords

HIST in optional

the histogram of the data

PLOT in optional

Use David Fannings Histoplot to plot the histogram

_EXTRA in optional

_strict_extra keywords to histoplot

Examples

IDL> print, optbins(randomn(seed, 1000), /plot) 9

Author information

History:

Sun Jul 27 15:46:01 2008, Brian Larsen written and tested

Statistics

Lines: 38
McCabe complexity:

File attributes

Modifcation date: Mon Sep 22 12:41:16 2008
Lines: 104